query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/ /Symbol output visitor /
private void outputSymbol(RebaseFile rf,RebaseJavaSymbol rs,IvyXmlWriter xw) { rs.outputNameData(rf,xw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String symbol();", "Character symbolStackWrite();", "@Override\n public String visit(Label n) {\n // 注意进入这里的只会有开头的标识 Label\n // 屏蔽 Procedure/CJUMP/JUMP/SimpleExp\n String _ret = null;\n Global.outputString += n.f0.tokenImage + \":\";\n return _ret;\n }", "public abstract String getSymbol();", "String getSymbol();", "public String getSymbol() {\n }", "private void putSymbol(String symbol, String type, String eqn){\n System.out.println(symbol+ \" \"+ type + \" \"+ eqn);\n }", "ISymbolStreamComp getSymbolStream();", "@Override\r\n\tpublic String toString() {\r\n\t\treturn getSymbol().toString();\r\n\t}", "public String visit(Procedure n, Object argu) \r\n\t{\r\n\t\t\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\".text \\n\");\r\n\t\tMipsOutPut.add(n.f0.f0.tokenImage+\": \\n\");\r\n\t MipsOutPut.add(MipsOutPut.Space+\"sw $fp, -8($sp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"move $fp, $sp \\n\");\r\n int stackLength = (Integer.parseInt(n.f5.f0.tokenImage)+2)*4;\r\n MipsOutPut.add(MipsOutPut.Space+\"subu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"sw $ra, -4($fp) \\n\");\r\n\t\tn.f10.accept(this,argu);\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $ra, -4($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $fp, -8($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"addu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"j $ra \\n\");\r\n\t\treturn null;\r\n\t}", "CharacterTarget put(char symbol) throws PrintingException;", "long getSymbol();", "@Override public String symbol() {\n return symbol;\n }", "public void emit(OpCode opcode){\n\t\t\n\t}", "public String getSymbol( )\n {\n return symbol;\n }", "public String getSymbol(){\n return this.symbol;\n }", "@Override\n public String visit(HStoreStmt n) {\n String _ret = null;\n String r1 = this.reg[n.f1.f0.which];\n String offset = n.f2.f0.tokenImage;\n String r2 = this.reg[n.f3.f0.which];\n Global.outputString += \"sw $\" + r2 + \", \" + offset + \"($\" + r1 + \")\\n\";\n return _ret;\n }", "private Token symbol(TOKEN_TYPE t){\t\n\t\tntk++;\n\t\treturn new Token(t, yytext(), yyline+1, yycolumn+1); // yytext() é o lexema\n\t}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return new Symbol (sym.EOF); \n }", "public Symbol getSymbol() {\r\n\t\treturn symbol;\r\n\t}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return s.next_token(); \n }", "@Override\n public String getSymbol() {\n return SYMBOL;\n }", "public String getSymbol() {\n return this.symbol ;\n }", "char getSymbol();", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return lexer.nextToken(); \n }", "public String getSymbol() {\r\n\t\treturn symbol;\r\n\t}", "public String getSymbol() {\r\n\t\treturn symbol;\r\n\t}", "protected char getSymbol(){\r\n\t\treturn this.symbol;\r\n\t}", "@Override\n\tpublic void visitXdef(Xsymbol p) {\n\n\t}", "public String getSymbol() {\n return symbol;\n }", "@Override\n public String visit(CJumpStmt n) {\n String _ret = null;\n Global.outputString += \"beqz $\" + this.reg[n.f1.f0.which] + \", \"\n + n.f2.f0.tokenImage + '\\n';\n return _ret;\n }", "public String getSymbol() {\n\t\treturn symbol;\n\t}", "public String getSymbol() {\n return symbol;\n }", "@Override\n public String visit(JumpStmt n) {\n String _ret = null;\n Global.outputString += \"j \" + n.f1.f0.tokenImage + '\\n';\n return _ret;\n }", "public char getSymbol() {\n return symbol;\n }", "public void PrintMe(){\r\n\t\t/* AST NODE TYPE = AST SUBSCRIPT VAR */\r\n\t\t/*************************************/\r\n\t\tSystem.out.print(\"AST NODE PAREN EXP\\n\");\r\n \r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\t\"(exp)\");\r\n\t\tif (e != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,e.SerialNumber);\r\n \r\n }", "public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}", "@Override\n public String visit(AStoreStmt n) {\n String r1 = this.reg[n.f2.f0.which];\n int offset = Integer.parseInt(n.f1.f1.f0.tokenImage);\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 3) * 4)\n + \"($fp)\\n\";\n return null;\n }", "@Override\n\tvoid output() {\n\t\t\n\t}", "public Symbol getSymbol() {\n\n return this.symbol;\n }", "@Override\n\tpublic String asText() {\n\t\treturn symbol;\n\t}", "public interface Symbols {\n /* terminals */\n public static final int BAG = 68;\n public static final int RETRIEVE = 93;\n public static final int AS = 34;\n public static final int TIMES = 13;\n public static final int LCURLY = 54;\n public static final int TYPE = 58;\n public static final int LEAVESBY = 91;\n public static final int LOWEREQUALS = 33;\n public static final int LAZY_FAILURE = 97;\n public static final int CLOSEUNIQUEBY = 90;\n public static final int NAME = 7;\n public static final int ENUM = 70;\n public static final int FORSOME = 41;\n public static final int CATCH = 114;\n public static final int DATEPREC = 109;\n public static final int COMMA = 29;\n public static final int VIRTUAL = 99;\n public static final int RANDOM = 110;\n public static final int DOUBLE_LITERAL = 4;\n public static final int SUM = 48;\n public static final int THROW = 116;\n public static final int JOIN = 28;\n public static final int RPAREN = 19;\n public static final int ON_NAVIGATE = 106;\n public static final int STRUCT = 69;\n public static final int NOT_MATCH_STRING = 23;\n public static final int LPAREN = 18;\n public static final int NOW = 108;\n public static final int INTEGER_LITERAL = 2;\n public static final int NOT = 24;\n public static final int VIEW = 98;\n public static final int INSTANCE = 73;\n public static final int DIFFERENT = 21;\n public static final int DATE_LITERAL = 6;\n public static final int MIN = 43;\n public static final int THEN = 65;\n public static final int EXTERNAL = 67;\n public static final int RECORD = 57;\n public static final int SEROID = 120;\n public static final int REVERSE = 107;\n public static final int ON_UPDATE = 103;\n public static final int LOWER = 31;\n public static final int INSERTCOPY = 83;\n public static final int BOOLEAN_LITERAL = 5;\n public static final int TEMPORAL = 80;\n public static final int CLASS = 71;\n public static final int SEED = 101;\n public static final int IMPLEMENT = 95;\n public static final int MODULO = 17;\n public static final int UNIQUEREF = 47;\n public static final int PLUS = 10;\n public static final int FORALL = 42;\n public static final int DIVIDE = 14;\n public static final int EXISTS = 49;\n public static final int GREATEREQUALS = 32;\n public static final int WHILE = 84;\n public static final int UNION = 16;\n public static final int DELETE = 77;\n public static final int EXTENDS = 72;\n public static final int MODULE = 53;\n public static final int INTERFACE = 117;\n public static final int ASSIGN = 61;\n public static final int RSQUARE = 52;\n public static final int FOR = 86;\n public static final int DO = 85;\n public static final int SCHEMADEF = 96;\n public static final int MATCH_STRING = 22;\n public static final int GREATER = 30;\n public static final int RANGEAS = 119;\n public static final int MAX = 44;\n public static final int RETURN = 60;\n public static final int TRY = 113;\n public static final int ELSE = 66;\n public static final int DOTDOT = 50;\n public static final int BREAK = 87;\n public static final int DOT = 26;\n public static final int PERMANENT = 79;\n public static final int AVG = 45;\n public static final int TRANSACTION_ABORT = 112;\n public static final int STRING_LITERAL = 3;\n public static final int EOF = 0;\n public static final int SEMICOLON = 8;\n public static final int INTERSECT = 15;\n public static final int LSQUARE = 51;\n public static final int WHERE = 27;\n public static final int COUNT = 25;\n public static final int LOCAL = 81;\n public static final int IMPORT = 56;\n public static final int IS = 59;\n public static final int UNIQUE = 46;\n public static final int IN = 36;\n public static final int OR = 39;\n public static final int error = 1;\n public static final int HYPHEN = 11;\n public static final int LEAVESUNIQUEBY = 92;\n public static final int FINALLY = 115;\n public static final int CONTINUE = 88;\n public static final int INSTANCEOF = 74;\n public static final int IF = 64;\n public static final int CONTAINS = 37;\n public static final int COLON = 9;\n public static final int SUBTRACT = 12;\n public static final int CREATE = 78;\n public static final int DEREF = 62;\n public static final int FOREACH = 63;\n public static final int REF = 75;\n public static final int ON_DELETE = 104;\n public static final int DESEROID = 121;\n public static final int CLOSEBY = 89;\n public static final int RENAME = 122;\n public static final int UPDATE = 94;\n public static final int INSERT = 82;\n public static final int OBJECTS = 100;\n public static final int AND = 40;\n public static final int SESSION = 76;\n public static final int ON_RETRIEVE = 102;\n public static final int GROUPAS = 35;\n public static final int ON_NEW = 105;\n public static final int ORDERBY = 38;\n public static final int DISTINCT = 118;\n public static final int RCURLY = 55;\n public static final int EQUALS = 20;\n public static final int TRANSACTION_CAPABLE = 111;\n}", "CharacterTarget put(char[] symbols) throws PrintingException;", "public java_cup.runtime.Symbol scan()\r\n throws java.lang.Exception\r\n {\r\n\r\n\tSymbol s = this.getScanner().next_token();\r\n\tif (s != null && s.value != null) \r\n\t\tlog.info(s.toString() + \" \" + s.value.toString());\r\n\treturn s;\r\n\r\n }", "public void print() {\n // char letter = (char)\n // (this.registers.get(this.registerPointer).intValue());\n char letter = (char) this.registers[this.registerPointer];\n this.intOutput.add(this.registers[this.registerPointer]);\n // System.out.println(\"print: \" + this.registers[this.registerPointer]);\n this.output.add(Character.toString(letter));\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }", "@Override\r\n\tpublic void translateToAsm(PrintWriter writer, Memory stack) {\n\t\t\r\n\t}", "@Override\n public String visit(CallStmt n) {\n String simpleExp = n.f1.accept(this);\n // 判断一下是寄存器还是Label\n if (simpleExp.charAt(0) == '$')\n Global.outputString += \"jalr \" + simpleExp + '\\n';\n else\n Global.outputString += \"jal \" + simpleExp + '\\n';\n return null;\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public abstract Object getOutput ();", "@Override\n\tpublic Object visit(ASTDot node, Object data) {\n\t\tSystem.out.print(\".\");\n\t\treturn null;\n\t}", "public String visit(AStoreStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*Integer.parseInt(n.f1.f1.f0.tokenImage);\r\n int RegNum = n.f2.f0.which;\r\n MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegNum] +\", \" + stackPos + \"($sp) \\n\");\r\n return null;\r\n\t }", "public void executeOUT(){\n\t\tint asciiVal = mRegisters[0].getValue();\n\t\tchar toPrint = (char)asciiVal;\n\t\tSystem.out.print(toPrint);\n\t}", "public String getSymbolName() {\n return this.name;\n }", "public String getSymbol() {\n return symbol.get();\n }", "@Override\n public void codegen(Emitter output) {\n }", "public interface ITerminalSymbols {\n\n\tint TokenNameWHITESPACE = 1000;\n\tint TokenNameCOMMENT_LINE = 1001;\n\tint TokenNameCOMMENT_BLOCK = 1002;\n\tint TokenNameCOMMENT_JAVADOC = 1003;\n\n\tint TokenNameIdentifier = 5;\n\tint TokenNameabstract = 98;\n\n /**\n * \"assert\" token (added in J2SE 1.4).\n */\n\tint TokenNameassert = 118;\n\tint TokenNameboolean = 18;\n\tint TokenNamebreak = 119;\n\tint TokenNamebyte = 19;\n\tint TokenNamecase = 211;\n\tint TokenNamecatch = 225;\n\tint TokenNamechar = 20;\n\tint TokenNameclass = 165;\n\tint TokenNamecontinue = 120;\n\tint TokenNamedefault = 212;\n\tint TokenNamedo = 121;\n\tint TokenNamedouble = 21;\n\tint TokenNameelse = 213;\n\tint TokenNameextends = 243;\n\tint TokenNamefalse = 37;\n\tint TokenNamefinal = 99;\n\tint TokenNamefinally = 226;\n\tint TokenNamefloat = 22;\n\tint TokenNamefor = 122;\n\tint TokenNameif = 123;\n\tint TokenNameimplements = 268;\n\tint TokenNameimport = 191;\n\tint TokenNameinstanceof = 65;\n\tint TokenNameint = 23;\n\tint TokenNameinterface = 180;\n\tint TokenNamelong = 24;\n\tint TokenNamenative = 100;\n\tint TokenNamenew = 32;\n\tint TokenNamenull = 38;\n\tint TokenNamepackage = 214;\n\tint TokenNameprivate = 101;\n\tint TokenNameprotected = 102;\n\tint TokenNamepublic = 103;\n\tint TokenNamereturn = 124;\n\tint TokenNameshort = 25;\n\tint TokenNamestatic = 94;\n\tint TokenNamestrictfp = 104;\n\tint TokenNamesuper = 33;\n\tint TokenNameswitch = 125;\n\tint TokenNamesynchronized = 85;\n\tint TokenNamethis = 34;\n\tint TokenNamethrow = 126;\n\tint TokenNamethrows = 227;\n\tint TokenNametransient = 105;\n\tint TokenNametrue = 39;\n\tint TokenNametry = 127;\n\tint TokenNamevoid = 26;\n\tint TokenNamevolatile = 106;\n\tint TokenNamewhile = 117;\n\tint TokenNameIntegerLiteral = 40;\n\tint TokenNameLongLiteral = 41;\n\tint TokenNameFloatingPointLiteral = 42;\n\tint TokenNameDoubleLiteral = 43;\n\tint TokenNameCharacterLiteral = 44;\n\tint TokenNameStringLiteral = 45;\n\tint TokenNamePLUS_PLUS = 1;\n\tint TokenNameMINUS_MINUS = 2;\n\tint TokenNameEQUAL_EQUAL = 35;\n\tint TokenNameLESS_EQUAL = 66;\n\tint TokenNameGREATER_EQUAL = 67;\n\tint TokenNameNOT_EQUAL = 36;\n\tint TokenNameLEFT_SHIFT = 14;\n\tint TokenNameRIGHT_SHIFT = 11;\n\tint TokenNameUNSIGNED_RIGHT_SHIFT = 12;\n\tint TokenNamePLUS_EQUAL = 168;\n\tint TokenNameMINUS_EQUAL = 169;\n\tint TokenNameMULTIPLY_EQUAL = 170;\n\tint TokenNameDIVIDE_EQUAL = 171;\n\tint TokenNameAND_EQUAL = 172;\n\tint TokenNameOR_EQUAL = 173;\n\tint TokenNameXOR_EQUAL = 174;\n\tint TokenNameREMAINDER_EQUAL = 175;\n\tint TokenNameLEFT_SHIFT_EQUAL = 176;\n\tint TokenNameRIGHT_SHIFT_EQUAL = 177;\n\tint TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 178;\n\tint TokenNameOR_OR = 80;\n\tint TokenNameAND_AND = 79;\n\tint TokenNamePLUS = 3;\n\tint TokenNameMINUS = 4;\n\tint TokenNameNOT = 71;\n\tint TokenNameREMAINDER = 9;\n\tint TokenNameXOR = 63;\n\tint TokenNameAND = 62;\n\tint TokenNameMULTIPLY = 8;\n\tint TokenNameOR = 70;\n\tint TokenNameTWIDDLE = 72;\n\tint TokenNameDIVIDE = 10;\n\tint TokenNameGREATER = 68;\n\tint TokenNameLESS = 69;\n\tint TokenNameLPAREN = 7;\n\tint TokenNameRPAREN = 86;\n\tint TokenNameLBRACE = 110;\n\tint TokenNameRBRACE = 95;\n\tint TokenNameLBRACKET = 15;\n\tint TokenNameRBRACKET = 166;\n\tint TokenNameSEMICOLON = 64;\n\tint TokenNameQUESTION = 81;\n\tint TokenNameCOLON = 154;\n\tint TokenNameCOMMA = 90;\n\tint TokenNameDOT = 6;\n\tint TokenNameEQUAL = 167;\n\tint TokenNameEOF = 158;\n\tint TokenNameERROR = 309;\n\n /**\n * \"enum\" keyword (added in J2SE 1.5).\n * @since 3.0\n */\n\tint TokenNameenum = 400;\n\n /**\n * \"@\" token (added in J2SE 1.5).\n * @since 3.0\n */\n\tint TokenNameAT = 401;\n\n /**\n * \"...\" token (added in J2SE 1.5).\n * @since 3.0\n */\n\tint TokenNameELLIPSIS = 402;\n\n\t/**\n\t * @since 3.1\n\t */\n\tint TokenNameconst = 403;\n\n\t/**\n\t * @since 3.1\n\t */\n\tint TokenNamegoto = 404; // goto not found in Java ? :)\n\n\t/**\n\t * @since 3.10\n\t */\n\tint TokenNameARROW = 405;\n\t/**\n\t * @since 3.10\n\t */\n\tint TokenNameCOLON_COLON = 406;\n\t\n\t\n}", "public char getSymbol() {\n\t\treturn this.symbol;\n\t}", "@Override\n public String toString() {\n return this.symbol + super.toString();\n }", "@Override\n public String visit(Procedure n) {\n String _ret = null;\n this.procedureName = n.f0.f0.tokenImage;\n this.calcStackSize(Integer.parseInt(n.f2.f0.tokenImage),\n Integer.parseInt(n.f5.f0.tokenImage),\n Integer.parseInt(n.f8.f0.tokenImage));\n this.addProcedureHead();\n n.f10.accept(this);\n this.addProcedureTail();\n return _ret;\n }", "Character getSymbol(Environment environment);", "abstract String junctionSymbol();", "public void PrintMe()\r\n\t{\r\n\t\t/*************************************************/\r\n\t\t/* AST NODE TYPE = AST NODE FUNCTION DECLARATION */\r\n\t\t/*************************************************/\r\n\t\tSystem.out.format(\"CALL(%s)\\nWITH:\\n\",funcName);\r\n\r\n\t\t/***************************************/\r\n\t\t/* RECURSIVELY PRINT params + body ... */\r\n\t\t/***************************************/\r\n\t\tif (params != null) params.PrintMe();\r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"CALL(%s)\\nWITH\",funcName));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tif (params != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,params.SerialNumber);\t\t\r\n\t}", "public String toString() {\n\n return this.symbol;\n }", "@Override\n public void saveSymbol(SecuritySymbols symbol) {\n\n }", "public String visit(HStoreStmt n, Object argu)\r\n\t {\r\n int RegRsNum = n.f3.f0.which;\r\n\t\t int RegRtNum = n.f1.f0.which;\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegRsNum ] +\", \"+ n.f2.f0.toString() + \"(\" + Regs.RegList[RegRtNum] +\") \\n\");\r\n\t\t return null;\r\n\t }", "public Void visit(NasmAddress operand){\n return null;\n }", "public Snippet visit(PrintStatement n, Snippet argu) {\n\t\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 _ret.returnTemp = generateTabs(blockDepth)+\"System.out.print(\"+f2.returnTemp+\");\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public abstract String getVertexSymbol(int vertexIndex);", "@Override\n public void emitOutput() {\n }", "public String visit(PrintStatement n, LLVMRedux argu) throws Exception {\n\n u.println(\"call void (i32) @print_int(i32 \"+n.f2.accept(this, argu)+\")\");\n return null;\n }", "protected void interfaceMethod (Hashtable symbolTable, MethodEntry m, PrintWriter stream)\n {\n this.symbolTable = symbolTable;\n this.m = m;\n this.stream = stream;\n if (m.comment () != null)\n m.comment ().generate (\" \", stream);\n stream.print (\" \");\n writeMethodSignature ();\n stream.println (\";\");\n }", "public void PrintMe()\r\n\t{\r\n\t\t/************************************/\r\n\t\t/* AST NODE TYPE = EXP NIL AST NODE */\r\n\t\t/************************************/\r\n\t\tSystem.out.print(\"AST NODE EXP NIL\\n\");\r\n\r\n\t\t\r\n\t\t/*********************************/\r\n\t\t/* Print to AST GRAPHIZ DOT file */\r\n\t\t/*********************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\t\"EXP\\nNIL\");\r\n\t\t\t\r\n\t}", "public String toString(){\n return String.valueOf(symbol);\n }", "public void writeReturn() {\n writer.println(\"@LCL\");\n writer.println(\"D=M\");\n writer.println(\"@R13\");\n writer.println(\"M=D\");\n\n //RET = *(FRAME - 5)\n writer.println(\"@5\");\n writer.println(\"D=A\");\n writer.println(\"@R13\");\n writer.println(\"A=M-D\"); //A-REG => MEM(LCL-5) => 312\n writer.println(\"D=M\"); //D-REG => 9\n writer.println(\"@R14\");\n writer.println(\"M=D\"); //R14 = 9\n\n //*ARG = POP();\n decStackPtr();\n writer.println(\"A=M\");\n writer.println(\"D=M\"); //store result in d reg.\n\n writer.println(\"@ARG\"); //@2\n writer.println(\"A=M\"); //A-REG = RAM[2]\n writer.println(\"M=D\"); //ram[A-reg] = D\n \n //SP = ARG+1\n writer.println(\"@ARG\");\n writer.println(\"D=M\");\n writer.println(\"@SP\");\n writer.println(\"M=D+1\");\n\n //That = *(FRAME-1)\n pushSymbol(1, \"THAT\");\n\n //THIS = *(FRAME-2)\n pushSymbol(2, \"THIS\");\n\n //ARG\n pushSymbol(3, \"ARG\");\n\n //LCL\n pushSymbol(4, \"LCL\");\n\n //goto ret\n writer.println(\"@R14\"); //This was the problem!! had R13 instead of 14!\n writer.println(\"A=M\");\n writer.println(\"0;JMP\");\n \n }", "public void setSymbol(Symbol symbol) {\r\n\t\tthis.symbol = symbol;\r\n\t}", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "private Symbol parse(Expression e) {\n Symbol ret = null;\n if (e instanceof AccessExpression) {\n ret = new AccessSymbol((AccessExpression)e);\n } else if (e instanceof Identifier) {\n ret = ((Identifier)e).getSymbol();\n } else if (e instanceof ArrayAccess) {\n ret = parse(((ArrayAccess)e).getArrayName());\n } else if (e instanceof Typecast) {\n ret = parse((Expression)e.getChildren().get(0));\n ////////////////////////////////////////////////////////////////////////\n // ConditionalExpression, FunctionCall, CommaExpression, and\n // BinaryExpression is not handled in general. Temporarily, the most\n // representative expression is parsed, which may be incorrect, so the\n // high-level passes that uses AccessSymbol must handle these cases\n // properly.\n } else if (e instanceof ConditionalExpression) {\n PrintTools.printlnStatus(1, \"[WARNING] Symbol is obscure for\", e);\n ret = parse(((ConditionalExpression)e).getTrueExpression());\n } else if (e instanceof FunctionCall) {\n PrintTools.printlnStatus(1, \"[WARNING] Symbol is obscure for\", e);\n ret = parse(((FunctionCall)e).getName());\n } else if (e instanceof CommaExpression) {\n PrintTools.printlnStatus(1, \"[WARNING] Symbol is obscure for\", e);\n ret = parse((Expression)e.getChildren().get(\n e.getChildren().size() - 1));\n } else if (e instanceof BinaryExpression) {\n PrintTools.printlnStatus(1, \"[WARNING] Symbol is obscure for\", e);\n ret = parse(((BinaryExpression)e).getLHS());\n ////////////////////////////////////////////////////////////////////////\n } else if (e instanceof UnaryExpression) {\n UnaryOperator op = ((UnaryExpression)e).getOperator();\n Expression ue = ((UnaryExpression)e).getExpression();\n ret = parse(ue);\n if (op == UnaryOperator.DEREFERENCE) {\n ret = new DerefSymbol(ret);\n }\n } else {\n throw new InternalError(\"failed to parse \" + e + \"(\" +\n e.getClass().getName() + \")\");\n }\n return ret;\n }", "public void setSymbol(String symbol) {\n this.symbol = symbol;\n }", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "@Override\n\tpublic String getSymbolName()\n\t{\n\t\treturn getFormattedText();\n\t}", "public String getSymbol()\n {\n return annot.getString(COSName.SY);\n }", "public String getTentSymbol(){ return tentSymbol;}", "public void PrintMe()\r\n\t{\r\n\t\t/********************************************/\r\n\t\t/* AST NODE TYPE = AST VAR.PARAM_FUNC EXPRESSION */\r\n\t\t/********************************************/\r\n\t\tSystem.out.print(\"AST NODE VAR.PARAM_FUNC EXPRESSION \\n\");\r\n\r\n\t\t/***********************************/\r\n\t\t/* RECURSIVELY PRINT var + expList ... */\r\n\t\t/***********************************/\r\n\t\tif (var != null) var.PrintMe();\r\n//\t\tif (expList != null) expList.PrintMe();\r\n\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"EXP VAR PARAM FUNC\\n()%S\", name));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber,var.SerialNumber);\r\n//\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber,expList.SerialNumber);\r\n\t}", "public String returnSymbol(Token token) {\n\n\t\tswitch (token.getType()) {\n\n\t\t\tcase L_ROUND:\n\t\t\t\treturn \"(\";\n\n\t\t\tcase R_ROUND:\n\t\t\t\treturn \")\";\n\n\n\n\t\t\tcase L_CURLY:\n\t\t\t\treturn \"{\";\n\n\n\t\t\tcase R_CURLY:\n\t\t\t\treturn \"}\";\n\n\t\t\tcase ASSIGN:\n\t\t\t\treturn \"=\";\n\n\t\t\tcase NEGATIVE:\n\t\t\t\treturn \"-\";\n\n\t\t\tcase EQ:\n\t\t\t\treturn \"==\";\n\n\t\t\tcase NEQ:\n\t\t\t\treturn \"^\";\n\n\t\t\tcase LT_EQ:\n\t\t\t\treturn \"<=\";\n\n\t\t\tcase GT_EQ:\n\t\t\t\treturn \">=\";\n\n\t\t\tcase PLUS:\n\t\t\t\treturn \"+\";\n\n\n\t\t\tcase MINUS:\n\t\t\t\treturn \"-\";\n\n\t\t\tcase MULTIPLY:\n\t\t\t\treturn \"*\";\n\n\t\t\tcase DIVIDE:\n\t\t\t\treturn \"/\";\n\n\t\t\tdefault:\n\n\t\t\t\treturn \"\";\n\t\t}\n\t}", "com.google.protobuf.ByteString\n getSymbolBytes();", "public R visit(Procedure n) {\n R _ret=null;\n coming_from_stmt_list=0;\n coming_from_procedure=1;\n String s0 = (String)n.f0.accept(this);\n coming_from_stmt_list=0; \n n.f1.accept(this);\n String s2 = (String)n.f2.accept(this);\n System.out.println(\" [ \"+s2+\" ] \");\n System.out.println(\"BEGIN\");\n n.f3.accept(this);\n String s4 = (String)n.f4.accept(this);\n System.out.println(\"RETURN \"+s4);\n System.out.println(\"END\");\n return _ret;\n }", "private void outputParseFunction(PrintWriter out, String startRuleName) {\n\t\t\n\t\tString tokenname = prefix + \"Token\";\n\t\t\n\t\tout.println(\" public \" + node(startRuleName) + \" parse() throws \" + prefix + \"ParserException, \" + prefix + \"TokenizerException {\");\n\t\tout.println(\" \" + tokenname + \" curToken;\");\n\t\tout.println();\n\t\tout.println(\" GrammarState curState;\");\n\t\tout.println();\n\t\tout.println(\" Stack<GrammarState> stateStack = new Stack<GrammarState>();\");\n\t\tout.println();\n\t\tout.println(\" \" + node(startRuleName) + \" parseTree = null;\");\n\t\tout.println(\" \" + prefix + \"ASTNode curNode = null;\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(new GrammarState(startRuleName, GrammarState.RULE));\");\n\t\tout.println();\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" while ( true ) {\");\n\t\tout.println();\n\t\tout.println(\" curState = stateStack.pop();\");\n\t\tout.println();\n\t\tout.println(\" if (curState == null) {\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode nextNode = curNode.getParent();\");\n\t\tout.println();\n\t\tout.println(\" if (curNode.isMultiChild() && curNode.numChildren() == 1) {\");\n\t\tout.println(\" \" + prefix + \"ASTNode parentNode = curNode.getParent();\");\n\t\tout.println(\" parentNode.removeChild(curNode);\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode childNode = curNode.getChild(0);\");\n\t\tout.println(\" curNode.removeChild(childNode);\");\n\t\tout.println(\" parentNode.addChild(childNode);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curNode.numChildren() == 0) {\");\n\t\tout.println(\" curNode.getParent().removeChild(curNode);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" curNode = nextNode;\");\n\t\tout.println();\n\t\tout.println(\" }\"); \n\t\tout.println(\" else if (curState.type == GrammarState.TOKEN) {\");\n\t\tout.println();\n\t\tout.println(\" if (!curState.name.equals(curToken.name)) {\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\"), expected token (\\\" + curState.name + \\\")\\\"\t, curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (curToken.name.equals(\\\"eof\\\")) break;\");\n\t\tout.println();\n\t\tout.println(\" curNode.addChild(new \" + prefix + \"ASTToken(curToken.name, curToken.value));\");\n\t\tout.println();\t\t\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.RULE) {\");\n\t\tout.println();\n\t\tout.println(\" GrammarRule newrule = table.get(curState.name).get(curToken.name);\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" if (newrule == null) {\");\n\t\tout.println(\" String expected = \\\"\\\";\");\n\t\tout.println(\" for (String t : table.get(curState.name).keySet()) if (t != null) expected += t + \\\", \\\";\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\") for rule \\\\\\\"\\\" + curState.name.replaceAll(\\\"\\\\\\\\{.*\\\", \\\"\\\") + \\\"\\\\\\\", expected one of (\\\" + expected.substring(0, expected.length()-2) + \\\")\\\", curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (!newrule.subrule) {\");\n\t\tout.println(\" if (parseTree == null) {\");\n\t\tout.println(\" curNode = parseTree = new \" + node(startRuleName) + \"(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" } else {\");\n\t\tout.println(\" \" + prefix + \"ASTNode newnode = makenode(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" curNode.addChild(newnode);\");\n\t\tout.println(\" curNode = newnode;\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(null);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" for (int i = newrule.graph.length-1; i >= 0; i--) {\");\n\t\tout.println(\" stateStack.push(newrule.graph[i]);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.EPSILON) {\");\n\t\tout.println(\" continue; //do nothing\");\n\t\tout.println(\" }\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" return parseTree;\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\t\n\t}", "public static String getSymbol() {\n\t\t\t\n\t\t\treturn \"The Sequence has no characters...\";\n\t\t}", "private void sout() {\n\t\t\n\t}", "public void visit(ClassDeclSimple n) \n\t{\n\t\tsymbolTable.addClass(n.i.toString());\n\t\tcurrentScope = symbolTable.enterScope(n.i.toString());\n\t\t\n\t\t//Add System.out.println\n\t\tString[] paramNames = {\"output\"};\n\t\tString[] paramTypes = {\"int\"};\n\t\t\n\t\tClassSymbolTable cst = (ClassSymbolTable)currentScope;\n\t\tcst.addMethod(\"System.out.println\", paramNames, paramTypes, \"void\");\n\t\t\n\t\tn.i.accept(this);\n \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.ml.size(); i++ ) \n\t\t{\n\t\t\tn.ml.elementAt(i).accept(this);\n\t\t}\n\t\n\t\tcurrentScope = currentScope.exitScope();\n\t}", "public static void generateProperIRAndPrintToStream(OutputStream out,\n\t\t\tSymbolTable rSymbolTable, \n\t\t\tGeneration g,\n\t\t\tICodeGenerator registerAllocator,\n\t\t\tICodeGenerator instructionSelector,\n\t\t\tObject ... extraArgs\n\t\t\t) throws IOException {\n\t\tString lineSep = System.getProperty(\"line.separator\");\n\n\t\tout.write((\"#Assembly generated by TIGGER on \"\n\t\t\t\t+ (new Date()).toString() + lineSep).getBytes());\n\n\t\t/* first, we need to output the proper data segment header */\n\t\tout.write((\".data\"+lineSep).getBytes());\n\n\t\t//write our special identifier ___linefeed which we will use to print\n\t\t//newlines.\n\t\tout.write((\"___linefeed:.asciiz \\\"\\n\\\"\" + lineSep).getBytes());\n\t\t\n\t\tIterable<VarEntry> toWrite = \n\t\t\t\tIterables.concat(rSymbolTable.getAllVarEntriesForThisAndKids(),\n\t\t\t\tg.getTempSymbolTable().getAllVarEntriesForThisAndKids());\n\t\t\n\t\tfor (VarEntry e : toWrite) {\n\t\t\tif (e.getTigerType().isArray()) {\n\t\t\t\t/* then let's output a .space instruction to make room */\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" \n\t\t\t\t\t\t+ \".align\\t 2\" + lineSep\n\t\t\t\t\t\t+ \".space\\t\"\n\t\t\t\t\t\t+ e.getTotalNumberOfElementsForArrayVar()*4 + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t} else { // let's output a .word instruction to reserve one slot\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" + \".word\\t\" + \"0\" + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t}\n\t\t}\n\t\n\t\t/* second, we need to output the proper code! */\n\t\tout.write((\".text\"+lineSep).getBytes());\n\t\tList<IRInstruction> irCode = g.getCodeList();\n\n\t\tList<IRInstruction> regInstrs = registerAllocator \n\t\t\t\t.generateCode(irCode, rSymbolTable, g, extraArgs);\n\n\t\tList<IRInstruction> codeInstrs = instructionSelector\n\t\t\t\t.generateCode(regInstrs, rSymbolTable, g);\n\n\t\tfor (IRInstruction c : codeInstrs) {\n\t\t\tout.write((c.toString() + lineSep).getBytes());\n\t\t}\n\t\t\n\t}", "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "@Override\n public void define(Symbol symbol) {\n }", "@Override\n public void define(Symbol symbol) {\n }", "public String visit(JumpStmt n, Object argu)\r\n\t {\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"j \" + n.f1.f0.toString()+\"\\n\");\r\n\t return null;\r\n\t }", "void define(Symbol sym);", "public void printAst(){\n explore(ctx);\n }", "Character symbolStackRead();" ]
[ "0.68102914", "0.67927533", "0.67514706", "0.66608644", "0.66408557", "0.64843106", "0.6482354", "0.6422899", "0.6404931", "0.6359241", "0.62970406", "0.62883687", "0.6274971", "0.62656707", "0.62324435", "0.62296206", "0.62233156", "0.6213019", "0.6195711", "0.617837", "0.6177355", "0.6174701", "0.615049", "0.61435676", "0.613509", "0.6118343", "0.6118343", "0.6111423", "0.6096137", "0.6087114", "0.6052688", "0.6028908", "0.60149574", "0.6007753", "0.599723", "0.59590405", "0.59471107", "0.5927805", "0.59219307", "0.59208447", "0.59203565", "0.59100884", "0.5891825", "0.58574945", "0.5849433", "0.583068", "0.5830404", "0.5803898", "0.5797563", "0.5797563", "0.5797422", "0.57922494", "0.5778542", "0.577447", "0.57731205", "0.57631874", "0.5757496", "0.5753512", "0.5710726", "0.569921", "0.5689802", "0.56875384", "0.5672189", "0.5661471", "0.5660331", "0.5639886", "0.5633848", "0.56319416", "0.5625627", "0.56248826", "0.5618809", "0.5617728", "0.5606121", "0.5605834", "0.56050116", "0.55984765", "0.5583733", "0.55821496", "0.55788374", "0.55751544", "0.55730766", "0.55725217", "0.5570817", "0.5570063", "0.55667734", "0.5550241", "0.5534927", "0.5526032", "0.55256015", "0.55170524", "0.55123377", "0.55075717", "0.55063415", "0.5505812", "0.55044395", "0.55044395", "0.5503077", "0.5496031", "0.5483134", "0.5478853" ]
0.6616246
5
/ /Handle outputing container for locations /
@Override public void outputContainer(RebaseFile rf,int soff,int eoff,IvyXmlWriter xw) { resolve(); RebaseJavaSymbol sym = null; for (RebaseJavaFile jf : file_nodes) { if (jf.getFile() != rf) continue; sym = getContainer(jf.getAstNode(),soff,eoff); break; } if (sym == null) return; sym.outputNameData(rf,xw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getAllContainers() {\n AID ams = getAMS();\n QueryPlatformLocationsAction queryPlatformLocationsAction = new QueryPlatformLocationsAction();\n sendRequest(new Action(ams, queryPlatformLocationsAction));\n MessageTemplate mt = MessageTemplate.and(\n MessageTemplate.MatchSender(getAMS()),\n MessageTemplate.MatchPerformative(ACLMessage.INFORM));\n ACLMessage resp = blockingReceive(mt);\n ContentElement ce = null;\n try {\n ce = getContentManager().extractContent(resp);\n } catch (Codec.CodecException e) {\n e.printStackTrace();\n } catch (OntologyException e) {\n e.printStackTrace();\n }\n Result result = (Result) ce;\n jade.util.leap.Iterator it = result.getItems().iterator();\n while (it.hasNext()) {\n Location loc = (Location) it.next();\n containersOnPlatform.put(loc.getName(), loc);\n }\n }", "public static void pipeOutputToFile(String location) {\n\t\tPrintStream fileOut;\n\t\ttry {\n\t\t\tfileOut = new PrintStream(new File(location));\n\t\t\tSystem.setOut(fileOut);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void DumpLocationCoordinatestoKMLRevised(Places places) throws IOException{\n\n String filen = folder_path+\"loc2kmlRevised.txt\";\n File file = new File(filen);\n if (!file.exists()) {\n file.createNewFile();\n }\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n\n for(int i=0;i<places.places.size();i++){\n LocationCluster locationcls=places.places.get(i);\n output.write(locationcls.placeID+\"~\");\n\n List<UserPhoto> sublist=locationcls.getIdenticalsubLocations();\n if(sublist.size()>2){\n\n for(int j=0;j<sublist.size()-1;j++){\n\n output.write(sublist.get(j).geotag.lat+\",\"+sublist.get(j).geotag.lng);\n if(j<sublist.size()-2){\n output.write(\"|\");\n }\n }\n\n }\n else{\n\n GeoTag center =locationcls.GetCentriod();\n output.write(center.lat+\",\"+center.lng);\n }\n\n\n output.write(\"\\n\");\n\n\n\n\n }\noutput.flush();\n\n }", "void examineContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif (!(this.receptacle.get(i) instanceof SpecialtyContainer))//if it's a hidden container, you don't know it's there, but it is...\n\t\t\t\t\t\tSystem.out.print(this.receptacle.get(i).contName + \", \");\n\t\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n PreparedQuery results = getQuery();\n\n // Add tracked locations as MapImage objects to a List.\n List<MapImage> formLocationOptions = convertMetdataToMapImages(results);\n\n Gson gson = new Gson();\n String jsonLocations = gson.toJson(formLocationOptions);\n response.setContentType(\"application/json\");\n response.getWriter().println(jsonLocations);\n }", "String getDockerFilelocation();", "private static void writeLocations(XMLStreamWriter w, RepositoryConnection con) throws XMLStreamException {\n\t\tint nr = 0;\n\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(null, RDF.TYPE, DCTERMS.LOCATION)) {\n\t\t\twhile (res.hasNext()) {\n\t\t\t\tIRI iri = (IRI) res.next().getSubject();\n\n\t\t\t\tValue bbox = null;\n\t\t\t\tRepositoryResult<Statement> bboxes = con.getStatements(iri, DCAT.BBOX, null);\n\t\t\t\twhile (bboxes.hasNext()) {\n\t\t\t\t\tValue val = bboxes.next().getObject();\n\t\t\t\t\tif (val.stringValue().startsWith(\"POLYGON\")) {\n\t\t\t\t\t\tbbox = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bbox != null) {\n\t\t\t\t\tnr++;\n\t\t\t\t\tw.writeStartElement(\"dct:Location\");\n\t\t\t\t\tw.writeAttribute(\"rdf:about\", iri.toString());\n\t\t\t\t\twriteLiteral(w, \"dcat:bbox\", bbox);\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOG.info(\"Wrote {} locations\", nr);\n\t}", "public List<DataLocation> getOutputDataLocations(){\n\treturn defaultDataLocations();\n }", "private void returnDriverLocationstoMaps() {\n }", "public void testGetContainerForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertEquals(\"1.0\", root, root.getContainerForLocation(root.getLocation()));\n \n \t}", "private void logConfigLocations() {\n\t\tlogger.info(\"XD config location: \" + environment.resolvePlaceholders(XD_CONFIG_LOCATION));\n\t\tlogger.info(\"XD config names: \" + environment.resolvePlaceholders(XD_CONFIG_NAME));\n\t\tlogger.info(\"XD module config location: \" + environment.resolvePlaceholders(XD_MODULE_CONFIG_LOCATION));\n\t\tlogger.info(\"XD module config name: \" + environment.resolvePlaceholders(XD_MODULE_CONFIG_NAME));\n\t}", "public void startOutput(Response response, Writer writer) throws ScalarActionException {\r\n\t\ttry {\r\n\t\t\t// We send back a serialized object rather than an array to avoid JS hijacking\r\n\t\t\t// and prefix for JS cross-site hacking prevention\r\n\t\t\twriter.write(\"/*{\" + getRootName() + \":{\");\r\n\r\n\t\t\t// Output metatdata\r\n\t\t\twriter.write(getMetadataName());\r\n\t\t\twriter.write(\":{\");\r\n\r\n\t\t\tboolean comma = false;\r\n\t\t\tMap<String, String> data = getMetaData(response);\r\n\t\t\tfor ( Map.Entry<String, String> entry : data.entrySet() ) {\r\n\t\t\t\taddOutputAttribute(entry.getKey(), entry.getValue(), writer, comma);\r\n\t\t\t\tcomma = true;\r\n\t\t\t}\r\n\r\n\t\t\twriter.write(\"},\");\r\n\r\n\t\t\t// Start container\r\n\t\t\twriter.write(getContainerName());\r\n\t\t\twriter.write(\":{\");\r\n\r\n\t\t\tcomma = false;\r\n\t\t\tdata = getContainerAttributes(response);\r\n\t\t\tfor ( Map.Entry<String, String> entry : data.entrySet() ) {\r\n\t\t\t\taddOutputAttribute(entry.getKey(), entry.getValue(), writer, comma);\r\n\t\t\t\tcomma = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( comma ) {\r\n\t\t\t\twriter.write(',');\r\n\t\t\t}\r\n\r\n\t\t\twriter.write(\"data:[\");\r\n\t\t} catch ( IOException e ) {\r\n MsgObject msgObject = MsgObjectUtil.getMsgObject(FrameworkResource.BASE_NAME, FrameworkResource.WRITE_OUTPUT_FAILURE);\r\n\t\t\tthrow ScalarActionException.create(msgObject, e);\r\n\t\t}\r\n\t}", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "public String showLocationContent() {\n\t\tContent content = null;\n printHeader();\n \n\t\tfor (Map.Entry<Integer, List<Content>> entry : contentMap.entrySet()) {\n\t\t\tList<Content> contentLst = entry.getValue();\n\n\t\t\tfor (int i = 0; i < contentListCapacity; i++) {\n\t\t\t\tif (contentLst == null)\n\t\t\t\t\tprintEmptyPlaceHolder(contentListCapacity);\n\t\t\t\telse {\n\t\t\t\t\tcontent = i < contentLst.size() ? contentLst.get(i) : null;\n\t\t\t\t\tif (content == null)\n\t\t\t\t\t\tSystem.out.printf(\"%5s\",\"\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.printf(\"%5s\",content.getBarcode() );\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn \" Smart Robot Arm! \";\n\n\t}", "private static void printLocations(Collection<ProcessModel> processModels) {\n processModels.stream()\n .filter(Automaton.class::isInstance)\n .map(Automaton.class::cast)\n .map(a -> \"Owners for \" + a.getId() + \" are: \" + a.getOwners())\n .forEach(System.out::println);\n }", "public void processOutput() {\n\n\t}", "@Override\n\tprotected String doExecute(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws SQLException, Exception {\n\t\tIProviderLocationDAO providerDAO = getOracleDaoFactory().getProviderLocationDAO();\n\t\tArrayList<ProviderLocation> locations = providerDAO.find(1, MAX_PROVIDER_LOCATIONS_TO_DISPLAY);\n\t\trequest.getSession().setAttribute(\"providers\", locations);\n String json = new Gson().toJson(locations);\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n response.getWriter().write(json);\n\t\treturn null;\n\t}", "public void generateOutputFile(String inputFilePath) {\n \n String outputFile = properties.getProperty(\"output.directory\")\n + properties.getProperty(\"output.file.token.search.locations\");\n \n ArrayList<String> lines = new ArrayList<String>();\n \n try ( PrintWriter outputWriter =\n new PrintWriter(new BufferedWriter(new FileWriter(outputFile)))) {\n \n //using the map.entry for the key-value pair and to ensure we can work with the map entry. Entryset method will return the map entries\n // iterating over the entry set of the locations. key and value \n for (Map.Entry<String, List<Integer>> entry : getFoundLocations().entrySet()) {\n // If the key is empty - it gets ignored and continues on.\n if (entry.getKey().trim().length() < 1) {\n //found continue https://www.javatpoint.com/java-continue - was looking for a way to continue if the entry is less than 1\n continue;\n }\n //using the getKey method to fetch the set of entries\n String line = entry.getKey() + \" =\";\n // adding the line to the string arraylist\n lines.add(line);\n line = \"[\";\n // If the location list is empty we add the line and close off the locations. \n if (entry.getValue().size() == 0) {\n line += \"]\";\n lines.add(line);\n lines.add(\"\");\n } else {\n // loop through all the locations and keep line under 80 characters. Checking all the values and size\n for (int i = 0; i < entry.getValue().size(); i++) {\n //Declaring location as the value\n String location = \"\" + entry.getValue().get(i);\n // if i is equal to 0, then you are displaying the first of the positions in the list so you can append it to the position\n if (i == 0) {\n line += location;\n }\n //Added the else if if you are about to exceed 80 characters in your line, then you close the line and begin a new line\n else if (line.length() + location.length() + 2 > 80) {\n lines.add(line);\n line = location;\n }\n //Added the else if you are not at the beginning of the locations nor at the end of the line, you just append a comma and space and the location.\n else {\n line += \", \" + location;\n }\n //Checking to see if that was the last entry then close the bracket\n if (i == (entry.getValue().size() - 1)) {\n line += \"]\";\n lines.add(line);\n lines.add(\"\");\n }\n }\n }\n }\n for (String line : lines) {\n //Trying out this typechar character for automatic string conversion\n outputWriter.printf(\"%s\\n\", line);\n }\n outputWriter.println();\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public abstract List<LocationDto> viewAll();", "public String artifactsLocationTemplate() {\n String pipeline = get(\"GO_PIPELINE_NAME\");\n String stageName = get(\"GO_STAGE_NAME\");\n String jobName = get(\"GO_JOB_NAME\");\n\n String pipelineCounter = get(\"GO_PIPELINE_COUNTER\");\n String stageCounter = get(\"GO_STAGE_COUNTER\");\n return artifactsLocationTemplate(pipeline, stageName, jobName, pipelineCounter, stageCounter);\n }", "public int getViewAreas(Map<String, ViewArea> _output)\n/* 207: */ {\n/* 208:281 */ if (_output != null) {\n/* 209:282 */ _output.put(\"_origin_VA\", this._origin_VA);\n/* 210: */ }\n/* 211:284 */ return 1 + super.getViewAreas(_output);\n/* 212: */ }", "protected void addLocation(ULPanel ul, LocationResult locationResult, ClickHandler handler, boolean showCategories) {\n if (MyWebApp.isDesktop()) {\n ListItem li = new ListItem();\n ComplexPanel vp = getLocationPanel(locationResult, handler, showCategories);\n li.add(vp);\n ul.add(li);\n } else {\n Image image = new Image(getSpotImage());\n Location location = locationResult.getLocation();\n //tags display\n FlowPanel tagsPanel = new FlowPanel();\n tagsPanel.setStyleName(\"tags\");\n //we do not want to show categories when we are showing spots that we are picking from\n if (showCategories) {\n if ((location.getFactualCategories() != null) && (location.getFactualCategories().length() > 0)) {\n String[] cats = location.getFactualCategories().split(\">\");\n for (String cat : cats) {\n String trimCat = cat.trim();\n TagHolder tagHolder = new TagHolder(trimCat);\n InlineLabel inlineLabel = new InlineLabel(tagHolder.getName());\n tagsPanel.add(inlineLabel);\n }\n }\n }\n LocationResultComposite locationResultComposite = new LocationResultComposite( image, tagsPanel);\n locationResultComposite.addClickHandler(handler);\n clickMapLocation.put(locationResultComposite, locationResult);\n StringBuffer sb = new StringBuffer();\n add(sb, \"\", location.getName());\n add(sb, \", \", location.getAddress1());\n add(sb, \", \", location.getCity());\n add(sb, \", \", location.getState());\n add(sb, \" \", location.getZipcode());\n locationResultComposite.setLocationDescription(sb.toString());\n\n processDistance(locationResult,locationResultComposite);\n ul.add(locationResultComposite);\n }\n }", "List<String> locations();", "@GetMapping(\"/locations\")\n public List<Location> getLocations(){\n return service.getAll();\n }", "void placeArtifacts(IO io)\r\n\t{\r\n\t\t\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t if (! (value.getName().isEmpty()))\r\n\t\t\t {\r\n\t\t\t\t io.display( value.getName().trim() + \", \");\r\n\t\t\t }\r\n\r\n\t\t\t \r\n\t\t\t// System.out.print( value.getName().trim() + \", \");\r\n\t\t}\r\n\t}", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void generateOutputHTML() {\n\n\t\t\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"data/web/template.html\"));\n\t\t\tPrintStream out = new PrintStream(\"data/web/output\"+count+\".html\");\n\t\t\tSystem.setOut(out);\n\t\t\t\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tSystem.out.print(line);\n\t\t\t\t\n\t\t\t\tif (line.equals(\"<title>\")) System.out.println(\"Path #\" +count);\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (line.equals(\"<body>\")) { \t\t\t\t// this is where all the good stuff goes..\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<div class='bodyHeader'>\");\n\t\t\t\t\tSystem.out.println(\"<p><strong>in order path for driver #\" +count+ \" \" + \"</strong></p>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<br><br><hr class='hrStyle'/>\");\n\t\t\t\t\t\n\t\t\t\t\t// Creating info about the path in a table format\n\t\t\t\t\tSystem.out.println(\"<div class='pathInfo'>\");\n\t\t\t\t\tSystem.out.println(\"<table class='infoTable' cellpadding='3' cellspacing='10'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>City: </td><td> \" + list.get(0).getCity()+ \" - \" + list.get(0).getState() + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Number of stops: </td><td> \" + (list.size()-1) + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Store: </td><td> \" + list.get(1).getName().toUpperCase()+ \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"</table>\");\n\t\t\t\t\t\n//TODO: get starting address --- System.out.println(\"Starting address: \" + list.get(0).getAddress());\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\n\t\t\t\t\t//create ordered table/list of path\n\t\t\t\t\tSystem.out.println(\"<div class='pathList'>\");\t\n\t\t\t\t\tSystem.out.println(\"<table class='pathTable' cellspacing='15'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><th>Order</th><th>Address</th><th></th><th>Latitude , Longitude</th></tr>\");\n\t\t\t\t\tint i = 1;\n\t\t\t\t\tfor (Location c: list) {\n\t\t\t\t\t// creating table row for each stop in route\n\t\t\t\t\t\tSystem.out.println(\"<tr>\" + \"<td>\"+(i++)+\"</td>\" + c.toHTMLString() +\"</tr>\");\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</ol>\");\n\t\t\t\t\tSystem.out.println(\"<br>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\t//opening html file to the default browser in the system\n\t\t\tFile htmlFile = new File(\"data/web/output\"+count+\".html\");\n\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t} \n\t}", "private void showFinalPath() // run after end dest has been set\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(cities.get(i));\n }", "private void createLocation() throws CoreException {\n \t\tFile file = location.append(F_META_AREA).toFile();\n \t\ttry {\n \t\t\tfile.mkdirs();\n \t\t} catch (Exception e) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_couldNotCreate, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, e));\n \t\t}\n \t\tif (!file.canWrite()) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_readonly, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t}\n \t\t// set the log file location now that we created the data area\n \t\tIPath logPath = location.append(F_META_AREA).append(F_LOG);\n \t\ttry {\n \t\t\tActivator activator = Activator.getDefault();\n \t\t\tif (activator != null) {\n \t\t\t\tFrameworkLog log = activator.getFrameworkLog();\n \t\t\t\tif (log != null)\n \t\t\t\t\tlog.setFile(logPath.toFile(), true);\n \t\t\t\telse if (debug())\n \t\t\t\t\tSystem.out.println(\"ERROR: Unable to acquire log service. Application will proceed, but logging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// set the trace file location now that we created the data area\n \t\tIPath tracePath = location.append(F_META_AREA).append(F_TRACE);\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator != null) {\n \t\t\tDebugOptions debugOptions = activator.getDebugOptions();\n \t\t\tif (debugOptions != null) {\n \t\t\t\tdebugOptions.setFile(tracePath.toFile());\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"ERROR: Unable to acquire debug service. Application will proceed, but debugging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}", "void printPlaceArtifacts()\r\n\t{\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t // System.out.println(\"Place Name: \" + this.name());\r\n\t\t\t \r\n\t\t\t System.out.println(\" Artifact Name----->\" + value.getName());\r\n\t\t\t System.out.println(\"Size-----> \" + value.getSize());\r\n\t\t\t System.out.println(\"Value-----> \" + value.getValue() + \" \\n\");\t\r\n\t\t}\r\n\t}", "@Override\n public List<String> getCmsLocations() {\n return Collections.emptyList();\n }", "private void _writeLocators(final String name, final Set<Locator> locators) throws IOException {\n if (locators.isEmpty()) {\n return;\n }\n _out.key(name);\n _out.startArray();\n for (Locator loc: locators) {\n _out.value(loc.toExternalForm());\n }\n _out.endArray();\n }", "java.util.List<phaseI.Hdfs.DataNodeLocation> \n getLocationsList();", "@Override\n protected void cleanup(Context context) throws IOException, InterruptedException {\n logger.info(\"Cleanup\");\n super.cleanup(context);\n for (java.util.Map.Entry<String, FullImageMetadata> entry : indexer.getEntries().entrySet()) {\n String surt = entry.getKey();\n context.write(new Text(surt), entry.getValue());\n }\n }", "public static void main(String[] args) {\n File plasmadb = new File(\"D:\\\\dev\\\\proxy\\\\DATA\\\\PLASMADB\");\r\n File indexdb = new File(\"D:\\\\dev\\\\proxy\\\\DATA\\\\INDEX\");\r\n try {\r\n plasmaWordIndex index = new plasmaWordIndex(plasmadb, indexdb, true, 555, 1000, new serverLog(\"TESTAPP\"), false);\r\n Iterator containerIter = index.wordContainers(\"5A8yhZMh_Kmv\", plasmaWordIndex.RL_WORDFILES, true);\r\n while (containerIter.hasNext()) {\r\n System.out.println(\"File: \" + (indexContainer) containerIter.next());\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n }", "private static String formatActualLocation(String location, Map<String, String> dataCollector) {\n final String parentLocation = location.substring(0, location.lastIndexOf(\".\"));\n\n //get current length of array\n final Long currentParentLength = Long.parseLong(dataCollector.getOrDefault(String.format(\"%s.$length\", parentLocation), \"0\"));\n\n final String toReplace = \"*\";\n final int start = parentLocation.lastIndexOf(toReplace);\n\n return new StringBuilder()\n .append(location.substring(0, start))\n .append(currentParentLength - 1)\n .append(location.substring(start + toReplace.length()))\n .toString();\n\n }", "public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}", "void placeArtifacts()\r\n\t{\r\n\t\t\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t System.out.print( value.getName().trim() + \", \");\r\n\t\t\t \r\n\t\t\t/* if (! (value.getName().isEmpty()))\r\n\t\t\t {\r\n\t\t\t\t io.display( value.getName().trim() + \", \");\r\n\t\t\t } */\r\n \r\n\t\t\t// System.out.print( value.getName().trim() + \", \");\r\n\t\t}\r\n\t}", "protected void storeDataPath(FSDataOutputStream output, DataEntry storageEntry) throws IOException {\n OBJECT_MAPPER.writeValue(output, storageEntry);\n }", "private void writeToFiles(Context resultContext) throws IOException {\n\t\tMap<String, Map<Object, ArrayList<Object>>> keyValMappingByBaseOutputPath = resultContext.getKeyValMappingsByBaseOutputPath(); \n\t\t//Write key & value to each baseOutputPath's \n\t\tPath targetOutputDir = null;\n\t\tMap<Object, ArrayList<Object>> keyValMapping = null;\n\t\tPath finalOutputBaseDir = this.config.getFinalOutputDir();\n\t\tfor (String baseOutputPath: keyValMappingByBaseOutputPath.keySet()) {\n\t\t\tif (baseOutputPath.equals(\"\")) {\n\t\t\t\t//Regular output goes into the mapper output buffer directory.\n\t\t\t\ttargetOutputDir = this.config.getMapOutputBufferDir();\n\t\t\t}else {\n\t\t\t\t//Multiple output to a particular outputPath which was \n\t\t\t\t//specified by user goes into the final output directory. \n\t\t\t\ttargetOutputDir = Paths.get(finalOutputBaseDir.toString(), baseOutputPath);\n\t\t\t}\n\t\t\tkeyValMapping = keyValMappingByBaseOutputPath.get(baseOutputPath);\n\t\t\tthis.writeEachMapping(targetOutputDir, keyValMapping);\n\t\t};\n\t}", "phaseI.Hdfs.DataNodeLocation getLocation();", "phaseI.Hdfs.DataNodeLocation getLocations(int index);", "@Override\n\tvoid output() {\n\t\t\n\t}", "private Output() {}", "protected abstract void getAllUniformLocations();", "public void printMapping() {\n LogDumper.out(sourceOutputMap);\n }", "@Override\n\tpublic void outputData() {\n\t\tSystem.out.println(\"输出显示器中的相对物理坐标!\");\n\t}", "private void printMap() {\n\t\tfor(Integer key: location.keySet()){\n\t\t\tString val= location.get(key).toString();\n\t\t\tSystem.out.println(\"(\" + key.toString() + \", \" + val+ \")\");\n\t\t}\n\t}", "@Override\n\tpublic void outputToSmartDashboard() {\n\t\t\n\t}", "@Override\n public void onLocationResult(LocationResult locationResult) {\n Log.d(TAG, \"onSuccess: Location : \" + locationResult);\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n // Update UI with location data\n Toast.makeText(MainActivity.this, \"Location : \" + location, Toast.LENGTH_SHORT).show();\n }\n }", "public void OutputToSmartDashboard()\n\t{\n\t\t\n\t}", "TemplateOutputStream getOutput();", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "Output getOutputs();", "protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearImgs.readDirectory(new File(Objects.requireNonNull(classLoader.getResource(\"assets/gear-tiles\")).getPath()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n for (i = 0; i < GEARTILES; i++) {\n list.add(new Location(LocationType.GEAR).withImg(gearImgs.popImg()));\n }\n list.get((int)(Math.random()*list.size())).toggleStartingLoc();\n\n Image waterImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-tile.jpg\")).toString());\n for (i = 0; i < WATERTILES; i++) {\n list.add(new Location(LocationType.WELL).withImg(waterImg));\n }\n\n Image waterFakeImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-fake-tile.jpg\")).toString());\n for (i = 0; i < WATERFAKETILES; i++) {\n list.add(new Location(LocationType.MIRAGE).withImg(waterFakeImg));\n }\n\n //TODO: Finish images\n for (i = 0; i < LANDINGPADTILES; i++) {\n list.add(new Location(LocationType.LANDINGPAD).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/landing-pad.jpg\")).toString())));\n }\n for (i = 0; i < TUNNELTILES; i++) {\n list.add(new Location(LocationType.TUNNEL).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/tunnel.jpg\")).toString())));\n }\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-LR.jpg\")).toString())));\n\n return list;\n }", "@Test\n public void treeOutputsFromLocalFileSystem_works() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n // Test that tree artifact generated locally can be consumed by other actions.\n // See https://github.com/bazelbuild/bazel/issues/16789\n\n // Disable remote execution so tree outputs are generated locally\n addOptions(\"--modify_execution_info=OutputDir=+no-remote-exec\");\n setDownloadToplevel();\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1'},\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo)/file-1 > $@ && echo bar >> $@',\",\n \")\");\n\n buildTarget(\"//:foobar\");\n waitDownloads();\n\n assertValidOutputFile(\"out/foobar.txt\", \"1bar\\n\");\n }", "public LocOutput getLocation(final LocInput in) throws LocationException {\n // check to see if the input is valid\n if (!in.isValid()) {\n ArrayList<String> errorList = in.getErrors();\n\n // combine the errors into a single string\n String errorString = \"\";\n for (int i = 0; i < errorList.size(); i++) {\n errorString += \" \" + errorList.get(i);\n }\n\n LOGGER.severe(\"Invalid input: \" + errorString);\n throw new LocationException(\"Invalid Input\");\n }\n\n // make sure we have an earth model\n if (in.EarthModel == null) {\n in.EarthModel = \"ak135\";\n }\n\n // setup the event\n Event event = new Event(in.EarthModel);\n event.input(in);\n\n // print input for debugging\n LOGGER.info(\"Input: \\n\" + event.getHydraInput(false));\n\n // make sure we have a slab resolution\n if (in.SlabResolution == null) {\n in.SlabResolution = \"2spd\";\n }\n\n // Get a locator with the required slab model resolution\n Locate loc = null;\n try {\n loc = locLocal.getLocate(event, ttLocal, in.SlabResolution);\n } catch (ClassNotFoundException | IOException e) {\n LOGGER.severe(\"Unable to read slab model data.\");\n e.printStackTrace();\n throw new LocationException(\"Unable to read slab model data.\");\n }\n\n // perform the location\n LocStatus status = loc.doLocation();\n event.setLocatorExitCode(status);\n\n // print results for debugging\n LOGGER.info(\"Results: \\n\" + event.getHydraOutput() + \"\\n\" + event.getNEICOutput());\n\n // get the output\n LocOutput out = event.output();\n\n // check output\n if (!out.isValid()) {\n ArrayList<String> errorList = out.getErrors();\n\n // combine the errors into a single string\n String errorString = \"\";\n for (int i = 0; i < errorList.size(); i++) {\n errorString += \" \" + errorList.get(i);\n }\n\n LOGGER.severe(\"Invalid output: \" + errorString);\n }\n\n // return the result\n return out;\n }", "public abstract String getOutputUrl();", "public void print(){\n for(int i = 0; i < rootDir.length; i++){\n System.out.println(rootDir[i]);\n }\n }", "@Override\n void start(Collection<? extends Location> locations);", "@Override\n\tpublic void pipeOutput() {\n\n\t}", "@Override\n public void spool(OutputContext outputContext) throws IOException {\n // spool properties\n super.spool(outputContext);\n // spool data\n try {\n OutputStream out = outputContext.getOutputStream();\n if (out != null && exists()) {\n getRepositorySession().exportSystemView(item.getPath(), out, false, true);\n }\n } catch (PathNotFoundException e) {\n log.error(\"Error while spooling resource content: \" + e.getMessage());\n } catch (RepositoryException e) {\n log.error(\"Error while spooling resource content: \" + e.getMessage());\n }\n }", "public A4_MUX (String inputLocation) throws IOException{\r\n fileLocation = inputLocation.concat(\"server.info\");\r\n filePath = Paths.get(fileLocation); \r\n }", "private void lookThroughLocations(ArrayList<String> produced){\n int cnt = 0;\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Artefacts> locationArtifacts = locations.get(i).getArtefacts();\n for(int j = 0; j < locationArtifacts.size(); j++){\n for(String k : produced){\n if(locationArtifacts.get(j).getName().equals(k)){\n currentLocation.addArtefactToCurrentLocation(locationArtifacts.get(j));\n locationArtifacts.remove(j);\n }\n }\n }\n }\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Characters> locationCharacters = locations.get(i).getCharacters();\n for(int j = 0; j < locationCharacters.size(); j++){\n for(String k : produced){\n if(locationCharacters.get(j).getName().equals(k)){\n currentLocation.addCharacterToCurrentLocation(locationCharacters.get(j));\n locationCharacters.remove(j);\n }\n }\n }\n }\n }", "public static final void main(String[] args)\n {\n\t\tTranslate.setKey(\"4C2B4C498E936A3FEEB32F247DEC58CF5EBBAF50\");\n\n\t\t// since there's no other argument -> quick and dirty \n\t\tif (args.length > 0)\n\t\t\tSettings.Instance().NewValues();\n\t\t\n \tString [] directories = new String[Locations.length];\n \tString [] mapFiles = new String[Locations.length];\n \t\n \tfor (int i=0; i<Locations.length; i++)\n \t{\n \t\tAvalancheReport ar = null;\n \tReportWriter rw = new FileReportWriter(Locations[i]);\n \tif (Locations[i].equals(\"salzburg\")) ar = new FetchSalzburg(rw); \n \telse if (Locations[i].equals(\"styria\")) ar = new FetchStyria(rw); \n \telse if (Locations[i].equals(\"tyrol\")) ar = new FetchTyrol(rw);\n \telse if (Locations[i].equals(\"southtyrol\")) ar = new FetchSouthTyrol(rw);\n \telse if (Locations[i].equals(\"carinthia\")) ar = new FetchCarinthia(rw);\n \telse if (Locations[i].equals(\"vorarlberg\")) ar = new FetchVorarlberg(rw);\n \telse if (Locations[i].equals(\"upperaustria\")) ar = new FetchUpperAustria(rw);\n \telse if (Locations[i].equals(\"loweraustria\")) ar = new FetchLowerAustria(rw);\n \telse if (Locations[i].equals(\"bavaria\")) ar = new FetchBavaria(rw);\n \telse if (Locations[i].equals(\"veneto\")) ar = new FetchVeneto(rw);\n \telse if (Locations[i].equals(\"trentino\")) ar = new FetchTrentino(rw);\n \telse if (Locations[i].equals(\"switzerland\")) ar = new FetchSwitzerland(rw);\n \telse if (Locations[i].equals(\"en/salzburg\")) ar = new FetchSalzburgEn(rw);\n \telse if (Locations[i].equals(\"en/styria\")) ar = new FetchStyriaEn(rw); \n/* \telse if (Locations[i].equals(\"en/tyrol\")) ar = new FetchTyrolEn(rw);\n \telse if (Locations[i].equals(\"en/southtyrol\")) ar = new FetchSouthTyrolEn(rw);\n \telse if (Locations[i].equals(\"en/carinthia\")) ar = new FetchCarinthiaEn(rw);\n \telse if (Locations[i].equals(\"en/vorarlberg\")) ar = new FetchVorarlbergEn(rw);\n \telse if (Locations[i].equals(\"en/upperaustria\")) ar = new FetchUpperAustriaEn(rw);\n \telse if (Locations[i].equals(\"en/loweraustria\")) ar = new FetchLowerAustriaEn(rw);\n \telse if (Locations[i].equals(\"en/bavaria\")) ar = new FetchBavariaEn(rw);\n \telse if (Locations[i].equals(\"en/veneto\")) ar = new FetchVenetoEn(rw);\n \telse if (Locations[i].equals(\"en/trentino\")) ar = new FetchTrentinoEn(rw);\n \telse if (Locations[i].equals(\"en/switzerland\")) ar = new FetchSwitzerlandEn(rw);\n */ \t\n \tif (ar != null) \n \t{\n \t\tHtmlFileWriter h = new HtmlFileWriter(Locations[i]);\n \t\th.Write(ar);\n \t\trw.Write(ar);\n \t}\n\n \t// cache for ftp upload\n \tdirectories[i] = rw.GetDestinationDir();\n \tmapFiles[i] = ar.GetImgOnDevice();\n \ttry\n \t{\n \t\tUtils.filecopy(mapFiles[i], Settings.Instance().GetDataDir()+Locations[i]+\"/\");\n \t}\n \tcatch (Exception e)\n \t{}\n \t}\n\n \tif (upload)\n \t{\n \t\t// ftp upload\n \t\tFtpUploader ftp = new FtpUploader();\n \t\tftp.Connect();\n \t\t//ftp.CreateDirectoryStructure(Locations);\n\n \t\tfor (int i=0; i<directories.length; i++)\n \t\t{\n \t\t\tftp.Upload(directories[i]+\"/report.xml\", Locations[i]+\"/report.xml\");\n \t\t\tftp.Upload(mapFiles[i], Locations[i]+mapFiles[i].substring(mapFiles[i].lastIndexOf('/')));\t\n \t\t\tftp.Upload(Settings.Instance().GetDataDir()+Locations[i]+\".html\", Locations[i]+\".html\");\n \t\t}\n \t\tftp.Disconnect();\n \t}\n }", "private void scanForLocations(Element elem) {\n \n String location = getLocation(elem);\n if (location != null) {\n locationToElement.put(location, elem);\n DOM.setInnerHTML(elem, \"\");\n } else {\n int len = DOM.getChildCount(elem);\n for (int i = 0; i < len; i++) {\n scanForLocations(DOM.getChild(elem, i));\n }\n }\n }", "public void registerContentsToPathway()\r\n\t{\n\t}", "public void renderOutputImageManager()\n {\n if(input != null)\n {\n if(toRerender)\n {\n background(background);\n mosaic.newCanvas();\n mosaic.setPreviewCanvas();\n mosaic.drawImage();\n renderPreview();\n renderHover();\n image(infoGraphics,10,270);\n toRerender = false;\n }\n }\n else\n {\n background(background);\n image(infoGraphics,40,270);\n }\n }", "private void runLocally() {\n\n // don't run if this is DAS **and** DAS is not in the server list.\n // otherwise we are in an instance and definitely want to run!\n if (isDas() && !dasIsInList())\n return;\n\n // say the pattern is \"something\" -->\n // we want \"server.something\" for DAS and \"i1.server.something\" for i1\n // Yes -- this is difficult to get perfect!!! What if user entered\n //\"server.something\"?\n\n String localPattern = prependServerDot(pattern);\n org.glassfish.flashlight.datatree.TreeNode tn = datareg.get(serverEnv.getInstanceName());\n\n if (tn == null) {\n // No monitoring data, so nothing to list\n // officially this is considered a \"success\"\n setSuccess(Strings.get(\"admin.get.monitoring.empty\"));\n return;\n }\n\n List<org.glassfish.flashlight.datatree.TreeNode> ltn = tn.getNodes(localPattern);\n boolean singleStat = false;\n\n if (ltn == null || ltn.isEmpty()) {\n org.glassfish.flashlight.datatree.TreeNode parent = tn.getPossibleParentNode(localPattern);\n\n if (parent != null) {\n ltn = new ArrayList<org.glassfish.flashlight.datatree.TreeNode>(1);\n ltn.add(parent);\n singleStat = true;\n }\n }\n\n if (!singleStat)\n localPattern = null; // signal to method call below. localPattern was already used above...\n\n if (outputType == OutputType.GET)\n doGet(localPattern, ltn);\n else if (outputType == OutputType.LIST)\n doList(localPattern, ltn);\n\n if (plainReporter != null) {\n plainReporter.appendMessage(cliOutput.toString());\n }\n }", "public File getOutput(){\n return outputDir;\n }", "private void dumpLocation(Location location) {\n if (location == null)\n log(\"Location[unknown]\");\n else\n log(location.toString());\n }", "public static void printAvailableMaps() {\n \tFile folder = new File(\"./examples/\");\n \tFile[] listOfFiles = folder.listFiles();\n \tSystem.out.println(\"Available maps (choose one and start game with command 'game map_name' ) : \");\n\n \t for (int i = 0; i < listOfFiles.length; i++) {\n \t if (listOfFiles[i].isFile()) {\n \t System.out.println(\"\\t\"+listOfFiles[i].getName());\n \t } \n \t }\n }", "protected void proccess(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\n\t\t// set response type to text/html\n\t\tresponse.setContentType(\"text/html\");\n\n\t\t// Get PrintWriter to write back to client\n\t\tPrintWriter out = response.getWriter();\n\n\t\t// Get contextPath for any external files such as css, js path\n\t\tString contextPath = getContextPath();\n\n\t\tSTGroup templates = this.getSTGroup();\n\t\tST page = templates.getInstanceOf(\"home\");\n\t\t\n\t\tList<City> cities = service.getAllCitySort();\n\t\t\n\t\tpage.add(\"contextPath\", contextPath);\n\t\tpage.add(\"cities\", cities);\n\n\t\tout.print(page.render());\n\t\tout.flush();\n\t}", "protected void writeLoc(IPositionable loc)\n\t{\n\t\twriteD(loc.getX());\n\t\twriteD(loc.getY());\n\t\twriteD(loc.getZ());\n\t}", "public interface Outpath {\n String getValue();\n\n}", "public String getLocationImage() throws IOException {\n\n this.imageFile = \"src/main/resources/locationImages/\" + this.coordinates + \"_mapSearch.png\";\n if(!(new File(imageFile).exists())) {\n BufferedImage image = null;\n String imageURL = \"https://maps.googleapis.com/maps/api/staticmap?size=300x300&center=\" + this.name.replaceAll(\"\\\\s\",\"%20\") + \"&key=AIzaSyA3qYxpHJKnTbHfW1oRcCSpycKqKUvwvV0\";\n URL url = new URL(imageURL);\n image = ImageIO.read(url);\n ImageIO.write(image,\"png\",new File(imageFile));\n }\n return imageFile;\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetOPSLocationsResponse getOPSLocations\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetOPSLocationsRequest getOPSLocationsRequest\n )\n ;", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n locations.put(0, new Location(0, \"You are sitting infront of a computer learning java\"));\n locations.put(1, new Location(1, \"You are standing at the end of a road\"));\n locations.put(2, new Location(2, \"You are at the top of the hill\"));\n locations.put(3, new Location(3, \"You are inside a building\"));\n locations.put(4, new Location(4, \"You are in a valley beside the stream\"));\n locations.put(5, new Location(5, \"You are in the forest\"));\n\n locations.get(1).addExit(\"W\", 2);\n locations.get(1).addExit(\"E\", 3);\n locations.get(1).addExit(\"S\", 4);\n locations.get(1).addExit(\"N\", 5);\n// locations.get(1).addExit(\"Q\", 0);\n\n locations.get(2).addExit(\"N\", 5);\n// locations.get(2).addExit(\"Q\", 0);\n\n locations.get(3).addExit(\"W\", 1);\n// locations.get(3).addExit(\"Q\", 0);\n\n locations.get(4).addExit(\"N\", 1);\n locations.get(4).addExit(\"W\", 2);\n// locations.get(4).addExit(\"Q\", 0);\n\n locations.get(5).addExit(\"S\", 1);\n// locations.get(5).addExit(\"Q\", 0);\n\n\n\n// System.out.println(locations.containsKey(6));\n int loc = 1;\n while(true){\n System.out.println(locations.get(loc).getDescription());\n if(loc ==0){\n break;\n }\n\n Map<String , Integer> exits = locations.get(loc).getExits();\n System.out.println(\"Available exits are \");\n for(String exit: exits.keySet()) {\n System.out.print(exit + \", \");\n }\n System.out.println();\n String[] str = sc.nextLine().split(\" \");\n String direction = \"\";\n if(str.length == 1){\n direction = str[0].toUpperCase();\n } else{\n for(String s: str){\n if(s.equalsIgnoreCase(\"North\")){\n direction = \"N\";\n }\n if(s.equalsIgnoreCase(\"South\")){\n direction = \"S\";\n }\n if(s.equalsIgnoreCase(\"West\")){\n direction = \"W\";\n }\n if(s.equalsIgnoreCase(\"East\")){\n direction = \"E\";\n }\n }\n }\n\n// String direction = sc.nextLine().toUpperCase();\n\n if(exits.containsKey(direction)){\n loc = exits.get(direction);\n } else{\n System.out.println(\"You cannot go in that direction\");\n }\n\n// else {\n// loc = sc.nextInt();\n// if(locations.containsKey(loc)){\n//\n// } else {\n// System.out.println(\"You cannot go in that direction\");\n// }\n// }\n }\n\n }", "private void populateOutputsInTree() {\n\t\tfor (ServiceNode s: serviceMap.values()) {\n\t\t\tfor (String outputVal : s.getOutputs())\n\t\t\t\ttaxonomyMap.get(outputVal).services.add(s);\n\t\t}\n\n\t\t// Now add the outputs of the input node\n\t\tfor (String outputVal : inputNode.getOutputs())\n\t\t\ttaxonomyMap.get(outputVal).services.add(inputNode);\n\t}", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "public ViewObjectImpl getLocations() {\n return (ViewObjectImpl)findViewObject(\"Locations\");\n }", "public void initiateLocationIC(){\r\n\t\ttry {\r\n\t\t\tOutputStream out = new FileOutputStream(\"D:/Workspace_J2EE/SECoG/Data/Location/LocationInformationContents.txt\");\r\n\t\t\tPrintStream printStream = new PrintStream(out);\r\n\t\t\t\r\n\t\t\tprintStream.println(\"campus\");\r\n\t\t\tprintStream.println(\"0\");\r\n\t\t\tprintStream.println(-Math.log(1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"engineeringbuilding\");\r\n\t\t\tprintStream.println(\"00\");\r\n\t\t\tprintStream.println(-Math.log((float)6/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"floor5\");\r\n\t\t\tprintStream.println(\"000\");\r\n\t\t\tprintStream.println(-Math.log((float)3/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"floor6\");\r\n\t\t\tprintStream.println(\"001\");\r\n\t\t\tprintStream.println(-Math.log((float)2/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"529\");\r\n\t\t\tprintStream.println(\"0000\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"527\");\r\n\t\t\tprintStream.println(\"0001\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"cdma\");\r\n\t\t\tprintStream.println(\"0010\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.close();\r\n\t\t\tout.close();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Initiate location information contents done!\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\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\t}", "HashMap<String, ?> getOutputFiles();", "public void updateLocations() throws IOException {\n Path path = new Path(getPath());\n FileSystem fs = path.getFileSystem(FileFactory.getConfiguration());\n RemoteIterator<LocatedFileStatus> iter = fs.listLocatedStatus(path);\n LocatedFileStatus fileStatus = iter.next();\n location = fileStatus.getBlockLocations()[0].getHosts();\n length = fileStatus.getLen();\n }", "private void rewriteLocationList(List<Location> newLocationList) {\n Log.d(\"debugMode\", \"writing new contents\");\n for (Location location : newLocationList) {\n String line = \"\\n\" + location.returnFull();\n byte[] bytes = line.getBytes();\n\n FileOutputStream out;\n try {\n Log.d(\"debugMode\", location.returnFull());\n out = openFileOutput(\"Locations.txt\", MODE_APPEND);\n out.write(bytes);\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static void readMemory() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm\");\n\n\t\t//getting the running container's id\n\t\tHashMap<String,String> hMap = ContainerUtil.getActiveContainers();\n\n\t\t//getting the process IDs for the running conteiners\n\t\tFile[] directories = new File(\"/proc\").listFiles(File::isDirectory);\n\n\t\tfor(Map.Entry<String,String> entry : hMap.entrySet()){\n\n\t\t\t//getting start time of mem copy\n\t\t\tDate startDate = new Date();\n\n\t\t\t//pausing the container to get its memory\n\t\t\tContainerUtil.pauseContainer( entry.getKey() );\n\n\t\t\tfor(File dir : directories) {\n\n\t\t\t\tif(NumberUtils.isNumber(dir.getName())){\n\t\t\t\t\n\t\t\t\t\tString filename = \"/proc/\" + dir.getName() + \"/cgroup\";\n\n\t\t\t\t\t//finding the cgroup file for the containerId\t\t\t\t\t\n\t\t\t\t\ttry(Stream<String> stream = Files.lines(Paths.get(filename))){\n\n\t\t\t\t\t\tif(stream.filter(line -> line.indexOf(entry.getKey()) > 0 ).findFirst().isPresent()){\n\t\t\t\t\t\t\t//change this point to save file to a mapped directory\n\t\t\t\t\t\t\tString outFile = \"./\" +\tentry.getKey() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tentry.getValue() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdir.getName() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdateFormat.format(new Date()) + \".mem\";\n\n\t\t\t\t\t\t\tString fileSource = \"/proc/\" + dir.getName() + \"/numa_maps\";\n\n\t\t\t\t\t\t\t//writing memory to file\n\t\t\t\t\t\t\twriteMemToFile(outFile, fileSource);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (IOException e){\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//unpausing the container after memory collection\n\t\t\tContainerUtil.unpauseContainer( entry.getKey() );\n\n\t\t\t//calculating total time for mem copy\n\t\t\tlong seconds = (new Date().getTime() - startDate.getTime());\n\t\t\tSystem.out.println(\" copy time: \" + seconds);\n\t\t}\n\t}", "public ArrayList<Location> getLocations() {\n return this.imageLocs; \n }", "public Entry output();", "public TextController createContainerLocation(ControllerCore genCode) {\n\t\tcontainerLocationTXT = new TextController(\"containerLocation\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(containerLocation$1LBL);\n\t\t\t\tsetProperty(\"containerLocation\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn containerLocationTXT;\n\t}", "@Before\n\tpublic void setUpStreams() {\n\t\tSystem.setOut(new PrintStream(outContent));\n\t}", "public void displayPaths() {\r\n\t\tlog.debug(\"startPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: startPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t\tlog.debug(\"destinationPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: destinationPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void map(Text key, Text value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tfor (String word : words) {\n\t\t\t\tif (key.toString().equals(word)) {\n\t\t\t\t\tString[] outVals = parseOutValue(value.toString(), filemap)\n\t\t\t\t\t\t\t.split(\"\\n\");\n\t\t\t\t\tfor (String val : outVals) {\n\t\t\t\t\t\tString outkey = val.substring(0, val.indexOf('['));\n\t\t\t\t\t\tString outval = word + \"::\"\n\t\t\t\t\t\t\t\t+ val.substring(val.indexOf(':') + 1);\n\t\t\t\t\t\toutput.collect(new Text(outkey), new Text(outval));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}" ]
[ "0.59594065", "0.5714551", "0.5351065", "0.5319289", "0.5300604", "0.5287713", "0.5286283", "0.52485377", "0.5191154", "0.50331205", "0.5030967", "0.5006518", "0.49884096", "0.49617374", "0.49559698", "0.49287876", "0.49170426", "0.49168617", "0.4914674", "0.49048764", "0.49047098", "0.48869765", "0.48703685", "0.48603904", "0.48300552", "0.4816919", "0.47977662", "0.47941497", "0.47916347", "0.4788623", "0.47634172", "0.47614285", "0.47566083", "0.47529063", "0.4729587", "0.4726995", "0.47220176", "0.47187644", "0.4707675", "0.47034085", "0.4702754", "0.46979132", "0.4666476", "0.46522495", "0.461659", "0.46137238", "0.46090835", "0.46044618", "0.46001107", "0.45980445", "0.45962602", "0.45949432", "0.45931396", "0.45915356", "0.45727506", "0.4567523", "0.4563764", "0.4558429", "0.45576158", "0.45559955", "0.45456627", "0.45432386", "0.45365912", "0.45337024", "0.45331135", "0.4526879", "0.45249835", "0.4517742", "0.45156005", "0.45131087", "0.4511263", "0.4511014", "0.4487041", "0.44851446", "0.44827336", "0.44818753", "0.44802547", "0.44794437", "0.4476597", "0.4475092", "0.44639271", "0.44639271", "0.44639271", "0.44639271", "0.44639271", "0.44639271", "0.44639271", "0.44639271", "0.4462525", "0.44612223", "0.44498274", "0.44463757", "0.44446385", "0.44396034", "0.44333556", "0.44332257", "0.443171", "0.44291028", "0.44233024", "0.44135594" ]
0.46704462
42
In this test, we set five test to test 1. valid transactions to show basic functions 2.Test doublespent 3.invalid output number(wrong number of coins to transfer) 4.invalid signature 5.Test the input not exist in the UtxoPool In this part, I use the function "assertTrue", and if there is not error showed, it means that the test is success and those function is correct. And in each test, it will print that if each transaction is valid test case 1: valid transactions to show basic functions tx0: Scrooge > Scrooge 25coins [Create Coins] tx1: Scrooge > Scrooge 4coins [Divide Coins] Scrooge > Scrooge 5coins Scrooge > Scrooge 6coins tx2: Scrooge > Alice 4coins [Pay separately] Scrooge > Alice 5coins Scrooge > Bob 6coins tx3: Alice > Alice 2coins [Divide Coins] Alice > Alice 2coins tx4: Alice > Bob 2coins [Pay jointly] Alice > Bob 5coins
@Test public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException { // generate key pairs, simulate initial tx from scrooge to alice System.out.println("-----------------------------------------------------------------"); System.out.println("Test some basic functions of TxHandler"); KeyPair pkScrooge = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkAlice = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkBob = KeyPairGenerator.getInstance("RSA").generateKeyPair(); // tx0: Scrooge --> Scrooge 25coins [Create Coins] Transaction tx0 = new Transaction(); tx0.addOutput(25, pkScrooge.getPublic()); byte[] initHash = null; tx0.addInput(initHash, 0); tx0.signTx( pkScrooge.getPrivate(), 0); UTXOPool utxoPool = new UTXOPool(); UTXO utxo = new UTXO(tx0.getHash(), 0); utxoPool.addUTXO(utxo, tx0.getOutput(0)); // tx1: Scrooge --> Scrooge 4coins [Divide Coins] // Scrooge --> Scrooge 5coins // Scrooge --> Scrooge 6coins Transaction tx1 = new Transaction(); tx1.addInput(tx0.getHash(),0); tx1.addOutput(4,pkScrooge.getPublic()); tx1.addOutput(5,pkScrooge.getPublic()); tx1.addOutput(6,pkScrooge.getPublic()); tx1.signTx(pkScrooge.getPrivate(), 0); TxHandler txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx1) returns: " + txHandler.isValidTx(tx1)); assertTrue("tx1:One valid transaction", txHandler.handleTxs(new Transaction[]{tx1}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx1:Three UTXO's are created", utxoPool.getAllUTXO().size() == 3); // tx2: Scrooge --> Alice 4coins [Pay separately] // Scrooge --> Alice 5coins // Scrooge --> Bob 6coins Transaction tx2 = new Transaction(); tx2.addInput(tx1.getHash(), 0); tx2.addInput(tx1.getHash(), 1); tx2.addInput(tx1.getHash(), 2); tx2.addOutput(4, pkAlice.getPublic()); tx2.addOutput(5, pkAlice.getPublic()); tx2.addOutput(6, pkBob.getPublic()); tx2.signTx(pkScrooge.getPrivate(), 0); tx2.signTx(pkScrooge.getPrivate(), 1); tx2.signTx(pkScrooge.getPrivate(), 2); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx2) returns: " + txHandler.isValidTx(tx2)); assertTrue("tx2:One valid transaction", txHandler.handleTxs(new Transaction[]{tx2}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx2:Three UTXO's are created", utxoPool.getAllUTXO().size() == 3); // tx3:Alice --> Alice 2coins [Divide Coins] // Alice --> Alice 2coins Transaction tx3 = new Transaction(); tx3.addInput(tx2.getHash(),0); tx3.addOutput(2, pkAlice.getPublic()); tx3.addOutput(2, pkAlice.getPublic()); tx3.signTx(pkAlice.getPrivate(),0); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx3) returns: " + txHandler.isValidTx(tx3)); assertTrue("tx3:One valid transaction", txHandler.handleTxs(new Transaction[]{tx3}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx3:Two UTXO's are created", utxoPool.getAllUTXO().size() == 4); // tx4: Alice --> Bob 2coins [Pay jointly] // Alice --> Bob 5coins Transaction tx4 = new Transaction(); tx4.addInput(tx3.getHash(),0); tx4.addInput(tx2.getHash(),1); tx4.addOutput(7, pkBob.getPublic()); tx4.signTx(pkAlice.getPrivate(), 0); tx4.signTx(pkAlice.getPrivate(),1); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx4) returns: " + txHandler.isValidTx(tx4)); assertTrue("tx4:One valid transaction", txHandler.handleTxs(new Transaction[]{tx4}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx4:Two UTXO's are created", utxoPool.getAllUTXO().size() == 3); // System.out.println("tx1.hashCode returns: " + tx1.hashCode()); // System.out.println("tx2.hashCode returns: " + tx2.hashCode()); // System.out.println("tx3.hashCode returns: " + tx3.hashCode()); // System.out.println("tx4.hashCode returns: " + tx4.hashCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }", "@Test\n public void TxHandlerTestFifth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the input not in the UtxoPool\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n //tx1: Scrooge --> Alice 20coins [Pay Coins *NOT added to UTXO pool* due to accidents]\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n utxo = new UTXO(tx1.getHash(),0);\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n utxoPool.removeUTXO(utxo);\n assertTrue(\"tx1:UTXO has been removed.\", utxoPool.getAllUTXO().size() == 0);\n\n\n // tx2: Alice --> Bob 15coins [Pay Coins *Previous Tx NOT in UTXO pool*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(15, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 0);\n\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }", "@Test\n public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid signature\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx1: scrooge to alice 20 coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: alice to bob 20coins[signed by bob]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(20, pkBob.getPublic());\n tx2.signTx(pkBob.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void TxHandlerTestSecond() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the double spending\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(25, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1: one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx 2:Scrooge --> Bob 20coins [*Double-spending*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx0.getHash(), 0);\n tx2.addOutput(25, pkBob.getPublic());\n tx2.signTx(pkScrooge.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n\n }", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\r\n public void testCalculerValeurTerrainAgricole() {\n Lot lot1 = new Lot(\"Lot1\", 2, 0, 300, \"14-02-2019\");\r\n Lot lot2 = new Lot(\"Lot2\", 2, 0, 600, \"12-06-2019\");\r\n Lot lot3 = new Lot(\"Lot3\", 2, 0, 1500, \"04-02-2019\");\r\n List<Lot> lots = new ArrayList();\r\n lots.add(lot1);\r\n lots.add(lot2);\r\n lots.add(lot3);\r\n // Terrain (typeTerrain, prix_min2, prix_min2, listLot)\r\n Terrain terrain = new Terrain(0, 50.00, 75.00, lots);\r\n Agricole.calculerValeurTerrainAgricole(terrain);\r\n // valFonciereAttendue = 50.0*300 + 50.0*600 + 50.0*1500 + 733.77 +\r\n // nbreDroitPassage = 500-(2*(5/100*300*50)) + 500-(2*(5/100*600*50))+\r\n // 500-(2*(5/100*1500*50)\r\n double valFonciereAttendue = 110233.8;\r\n double taxeScolaireAttendue=1322.85;\r\n double taxeMunicipaleAttendue = 2755.85;\r\n boolean resultat = valFonciereAttendue == terrain.getValeur_fonciere_totale()\r\n && taxeScolaireAttendue == terrain.getTaxe_scolaire()\r\n && taxeMunicipaleAttendue == terrain.getTaxe_municipale();\r\n assertTrue(\"valfoncièreAttendue: \" + valFonciereAttendue+\", vs valeur obtenue: \"+terrain.getValeur_fonciere_totale()\r\n + \"\\ntaxe scolaire attendue: \" + taxeScolaireAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_scolaire()\r\n + \"\\ntaxe muninipale attendue: \" + taxeMunicipaleAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_municipale(), \r\n resultat); \r\n \r\n }", "@Test\n\t//getting errors recognizing labooncoin so i used 'one'\n\tpublic void testHappyBlockPrint()\n\t{\n\t\tLaboonCoin one = new LaboonCoin();\n\t\tone.blockchain.add(\"All your base\");\n\t\tone.blockchain.add(\"are belong\");\n\t\tone.blockchain.add(\"to us\");\n\t\tassertEquals(\"All your base\" + '\\n' + \"are belong\" + '\\n' + \"to us\" + '\\n', one.getBlockChain());\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Transaction Calculation\")\n\tpublic void transactionCalculation() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"100\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$100\"));\n\t\ttest.log(Status.PASS, \"Transaction created successfully and the value is correct\");\n\n\t\t//Creating another transaction, testing if its visible, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Expenses\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Books\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.typeTransactionAmount(\"50\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"How to become a good QA Engineer book\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Second transaction created successfully and the value is correct\");\n\n\t\t//Testing if the calculation is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Calculation is correct\");\n\n\t\t//Deleting both transactions for app cleanup and logging the result to the report\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Extra income\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\ttest.log(Status.PASS, \"Transactions deleted successfully\");\n\t\t\n\t\t//Testing if both transactions were deleted from the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$0\"));\n\t\ttest.log(Status.PASS, \"Transactions from the 'Double Entry' account deleted successfully\");\n\n\t}", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "@Test\n public void test2() {\n cashRegister.addTens(5);\n try {\n cashRegister.withdraw(0, 5);\n fail();\n } catch (InsufficientCashException e) {\n assertEquals(e.getMessage(), \"Not enough denominations\");\n }\n }", "@Test\n void bankListIsAccountExistToTransfer_accountExistWithSufficientMoneyToTransfer_success() {\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n BankList bankList = new BankList(storage);\n Ui uiTest = new Ui();\n Bank newSavingAccount = new Saving(\"Test Saving Account\", 1000, 2000);\n Bank newInvestmentAccount = new Investment(\"Test Investment Account\", 1000);\n String expectedReturnType = \"investment\";\n\n try {\n bankList.bankListAddBank(newSavingAccount, uiTest);\n bankList.bankListAddBank(newInvestmentAccount, uiTest);\n outContent.reset();\n String returnType = bankList.getTransferBankType(\"Test Investment Account\",\n 500);\n assertEquals(expectedReturnType, returnType);\n\n\n } catch (BankException error) {\n System.out.println(\"Expected no throw, but error thrown\");\n }\n\n assertEquals(2, bankList.getBankListSize());\n\n }", "@Test\n public void processTestC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),5,10);\n\n Assert.assertEquals(false,trans.process());\n }", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "public UnitTestData() throws Exception {\n String[] runsData = {\n \"1,1,A,1,No,No,4\", // 0 (a No before first yes Security Violation)\n \"2,1,A,1,No,No,2\", // 0 (a No before first yes Compilation Error)\n \"3,1,A,1,No,No,1\", // 20 (a No before first yes)\n \"4,1,A,3,Yes,No,0\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"5,1,A,5,No,No,1\", // zero -- after Yes\n \"6,1,A,7,Yes,No,0\", // zero -- after Yes\n \"7,1,A,9,No,No,1\", // zero -- after Yes\n \"8,1,B,11,No,No,1\", // zero -- not solved\n \"9,2,A,48,No,No,4\", // 0 (a No before first yes Security Violation)\n \"10,2,A,50,Yes,No,0\", // 50 (minute points; no Run points on first Yes)\n \"11,2,B,35,No,No,1\", // zero -- not solved\n \"12,2,B,40,No,No,1\", // zero -- not solved\n };\n\n // Assign half eams random team member names\n addTeamMembers(contest, getTeamAccounts(contest).length / 2, 5);\n\n assertEquals(\"Expectig team member names\", 5, getFirstAccount(contest, Type.TEAM).getMemberNames().length);\n\n assertEquals(\"team count\", 120, contest.getAccounts(Type.TEAM).size());\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem problem = contest.getProblems()[0];\n Account judge = getFirstAccount(contest, Type.JUDGE);\n generateClarifications(contest, 20, problem, judge.getClientId(), false, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, true);\n\n sampleContest.assignSampleGroups(contest, \"North Group\", \"South Group\");\n\n assertEquals(\"Runs\", 12, contest.getRuns().length);\n\n }", "@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "@Test\n public void z_topDown_TC02() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n }", "@Test(groups = { \"unit\" })\r\n public void testCase() {\r\n getPlayer().teleportToRoom(VAULT_ROOM);\r\n getPlayerA().teleportToRoom(VAULT_ROOM);\r\n clearAllOutput();\r\n\r\n if (!getCommand().execute(getPlayer(), \"de asd\")) {\r\n \t Assert.fail();\r\n }\r\n TestUtil.assertOutput(getPlayerOutput(), TaMessageManager.BNKTMC.getMessage());\r\n TestUtil.assertOutput(getPlayerAOutput(), \"\");\r\n \r\n if (!getCommand().execute(getPlayer(), \"de 100\")) {\r\n \t Assert.fail(); \t \r\n }\r\n TestUtil.assertOutput(getPlayerOutput(), TaMessageManager.BNKNHA.getMessage());\r\n TestUtil.assertOutput(getPlayerAOutput(), \"\"); \r\n \r\n if (getCommand().execute(getPlayer(), \"de 100 gold\")) {\r\n \t Assert.fail(); \t \t \r\n }\r\n \r\n getPlayer().setGold(100);\r\n \r\n if (!getCommand().execute(getPlayer(), \"de 101\")) {\r\n \t Assert.fail(); \t \t \t \r\n }\r\n TestUtil.assertOutput(getPlayerOutput(), TaMessageManager.BNKNHA.getMessage());\r\n TestUtil.assertOutput(getPlayerAOutput(), \"\"); \r\n \r\n if (getPlayer().getVaultBalance() != 0) {\r\n Assert.fail();\r\n }\r\n\r\n if (getPlayer().getGold() != 100) {\r\n Assert.fail();\r\n }\r\n \r\n if (!getCommand().execute(getPlayer(), \"de 100\")) {\r\n \t Assert.fail(); \t \t \t \r\n }\r\n String depositString = MessageFormat.format(TaMessageManager.BNKDEP.getMessage(), \"100\");\r\n TestUtil.assertOutput(getPlayerOutput(), depositString);\r\n TestUtil.assertOutput(getPlayerAOutput(), \"\"); \r\n\r\n if (getPlayer().getVaultBalance() != 100) {\r\n Assert.fail();\r\n }\r\n\r\n if (getPlayer().getGold() != 0) {\r\n Assert.fail();\r\n }\r\n \r\n // Test the command in an invalid room.\r\n getPlayer().teleportToRoom(NORTH_PLAZA);\r\n getPlayerA().teleportToRoom(NORTH_PLAZA);\r\n clearAllOutput();\r\n\r\n if (getCommand().execute(getPlayer(), \"ba\")) {\r\n Assert.fail();\r\n }\r\n \r\n }", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "@Test\n public void testValiderLaCouvertureDuSoin() {\n \n assertTrue(soin1.validerLaCouvertureDuSoin());\n soin3.setPourcentage(2.0);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n soin3.setPourcentage(-1.1);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n assertTrue(soin2.validerLaCouvertureDuSoin());\n }", "@Test\n\tpublic void testValidTransaction() {\n\t\t\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\tdatabase.addCustomer(merchant);\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tString transJMSMessage = transHandle.generateTransactionJMSRequest();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\n\t\tassertEquals(\"Transaction participants are valid\",verifyParticipants);\n\t\tassertEquals(transJMSMessage,customer.getBankId()+\" \"+ merchant.getBankId()+ \" \" + amount + \" \" + \"comment\");\n\t}", "@Test\n public void preDefine_TestA()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"High Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"high\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice03() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\texspectedFoodList.add(new Appetizer(\"Beef Enchailada\",Food.foodType.MAINDISH, \"100\"));\t\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "static void executeTest() {\n int[] param1 = { // Checkpoint 1\n 12, 11, 10, -1, -15,};\n boolean[] expect = { // Checkpoint 2\n true, false,true, false, true,}; \n System.out.printf(\"課題番号:%s, 学籍番号:%s, 氏名:%s\\n\",\n question, gakuban, yourname);\n int passed = 0;\n for (int i = 0; i < param1.length; i++) {\n String info1 = \"\", info2 = \"\";\n Exception ex = null;\n boolean returned = false; //3\n try {\n returned = isDivable(param1[i]); //4\n if (expect[i] == (returned)) { //5\n info1 = \"OK\";\n passed++;\n } else {\n info1 = \"NG\";\n info2 = String.format(\" <= SHOULD BE %s\", expect[i]);\n }\n } catch (Exception e) {\n info1 = \"NG\";\n info2 = \"EXCEPTION!!\";\n ex = e;\n } finally {\n String line = String.format(\"*** Test#%d %s %s(%s) => \",\n i + 1, info1, method, param1[i]);\n if (ex == null) {\n System.out.println(line + returned + info2);\n } else {\n System.out.println(line + info2);\n ex.printStackTrace();\n return;\n }\n }\n }\n System.out.printf(\"Summary: %s,%s,%s,%d/%d\\n\",\n question, gakuban, yourname, passed, param1.length);\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice04() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\texspectedFoodList.add(new Appetizer(\"Beef Enchailada\",Food.foodType.MAINDISH, \"100\"));\t\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test\n public void preDefine_TestD()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"High Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n //Purposely Adding a Single amount to fail the preDefine Method\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n mainAmounts.add(main_amount1);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"high\");\n\n Assert.assertEquals(false,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void testGetTransactionTotal() {\n System.out.println(\"getTransactionTotal\");\n //CashRegister instance = new CashRegister();\n assertEquals(0, instance.getTransactionTotal(),EPSILON);\n //Now, set up a test of 2 items\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 1.82;\n double result = instance.getTransactionTotal();\n assertEquals(expResult, result, EPSILON);\n }", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "public final void testValidTransaction() {\n assertTrue(testTransaction1.isValidTransaction());\n assertFalse(testTransaction2.isValidTransaction());\n }", "@Test\n public void testCalculerDroitPassage() {\n int nbrDoitPassage = 3;\n double valeurLot = 1000;\n double expResult = 350;\n double result = CalculAgricole.calculerMontantDroitsPassage(nbrDoitPassage, valeurLot);\n assertEquals(\"Montant pour las droits du passage n'était pas correct.\", expResult, result, 0);\n\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice02() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "public void testOneDeposit(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Host sends the teller a new account for the incoming customer\n\t\tteller.msgHereIsAccount(new BankAccount(deposit,0));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\tdeposit.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to deposit 100 dollars, instead it is for \" + teller.pendingTransactions.get(deposit), \n\t\t\t\t100.0, teller.pendingTransactions.get(deposit));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 0.0 dollars, leaving bank.\\\", instead it reads: \" + deposit.log.getLastLoggedEvent().toString(),\n\t\t\t\tdeposit.log.containsString(\"Got 0.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 100.0, instead it has \" + teller.accountsListed.get(0).getBalance(), 100.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "@Test\n public void testValiderNumeroSoin() {\n \n assertTrue(soin1.validerNumeroSoin());\n assertFalse(soin4.validerNumeroSoin());\n assertTrue(soin2.validerNumeroSoin());\n }", "@Test\n\tpublic void testAddTransaction(){\n setDoubleEntryEnabled(true);\n\t\tsetDefaultTransactionType(TransactionType.DEBIT);\n validateTransactionListDisplayed();\n\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Lunch\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"899\"));\n\t\tonView(withId(R.id.input_transaction_type))\n\t\t\t\t.check(matches(allOf(isDisplayed(), withText(R.string.label_receive))))\n\t\t\t\t.perform(click())\n\t\t\t\t.check(matches(withText(R.string.label_spend)));\n\n\t\tString expectedValue = NumberFormat.getInstance().format(-899);\n\t\tonView(withId(R.id.input_transaction_amount)).check(matches(withText(expectedValue)));\n\n int transactionsCount = getTransactionCount();\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n validateTransactionListDisplayed();\n\n List<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(DUMMY_ACCOUNT_UID);\n assertThat(transactions).hasSize(2);\n Transaction transaction = transactions.get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\n assertThat(getTransactionCount()).isEqualTo(transactionsCount + 1);\n }", "@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test\n public void test11() {\n cashRegister.addPennies(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addFives(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addNickels(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addOnes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addQuarters(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addTens(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Test\n public void preDefine_TestC()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"No such Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"Important\");\n\n Assert.assertEquals(false,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void preDefine_TestB()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"Low Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"low\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "public void testShouldReturnSumOfTwoNumber() throws TriangleException {\n Addition ad=new Addition();\n Assert.assertEquals(Constant.ERROR001, ad.additionNumber(2, 3));\n }", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "@Test\r\n public void testCalcNewBalance() {\r\n System.out.println(\"calcNewBalance\");\r\n \r\n /*\r\n ******************\r\n TEST CASE #1\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 1\");\r\n //input values for test case 1\r\n double price = 15.75;\r\n double curBalance = 50;\r\n\r\n \r\n //create instance of MapControl class\r\n BackpackControl instance = new BackpackControl();\r\n \r\n //expected output return value\r\n double expResult = 34.25;\r\n \r\n //call function to run test\r\n double result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #2\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 2\");\r\n //input values for test case 2\r\n price = -19;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #3\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 3\");\r\n //input values for test case 3\r\n price = 100;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #4\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 4\");\r\n //input values for test case 4\r\n price = 0;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 50;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #5\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 5\");\r\n //input values for test case 5\r\n price = 1;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 49;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #6\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 6\");\r\n //input values for test case 6\r\n price = 50;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 0;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n\r\n }", "@Test\n public void depositCheckingTest(){\n userC.deposit(200.00);\n assertEquals(\"Balance is now $500.00\", userC.getCurrentBalance(), 500.00, DELTA);\n }", "@Test\n public void is_totalPrice_Is_displayed_properly_Added_To_The_Menu_Failure_Senario_Summation_Incorrect(){\n int isTotalPriceDisplayedSumIncorrect = restaurant.displayCost(totalPrice).size();\n restaurant.displayCost(\"InCorrect Amount Displayed due to Wrong Summation\", isTotalPriceDisplayedSummationCorrect);\n assertEquals(isTotalPriceDisplayedSumIncorrect,restaurant.displayCost(totalPrice).size());\n\n\n }", "public void soaktest() {\n\t\ttry {\n\t\t\tint errCount = 0;\n\n\t\t\tfor (int i = 1; i <= 100; i++) {\n\t\t\t\tRegression test = new Regression();\n\t\t\t\ttest0();\n\t\t\t\ttest.test1(m1);\n\t\t\t\ttest.test2(m1);\n\t\t\t\ttest.test3(m1);\n\t\t\t\ttest.test4(m1);\n\t\t\t\ttest.test5(m1);\n\t\t\t\ttest.test6(m1);\n\t\t\t\ttest.test7(m1, m2);\n\t\t\t\ttest.test8(m1);\n\t\t\t\ttest.test9(m2);\n\t\t\t\ttest.test10(m3);\n\t\t\t\ttest.test11(m1, m2);\n\t\t\t\ttest.test12(m1);\n\t\t\t\ttest.test13(m1);\n\t\t\t\ttest.test14(m1);\n\t\t\t\ttest.test15(m1);\n\t\t\t\ttest.test16(m1);\n\t\t\t\ttest.test17(m1);\n\t\t\t\ttest.test18(m4);\n\t\t\t\ttest.test19(m2, m3);\n\t\t\t\ttest.test97(m1);\n\t\t\t\tif (test.getErrors())\n\t\t\t\t\terrCount++;\n\t\t\t\tif ((i % 10) == 0) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"error count = \" + errCount + \" rounds = \" + i);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\tassertTrue(false);\n\t\t}\n\t}", "@Test\r\n\tpublic void testSum() { //testing the adding method\r\n\t\tnum1 = 2; \r\n\t\tnum2 = 8;\r\n\t\tresult = calculate.sum(num1, num2); //result stores the method of add\r\n\t\texpected = 10;\r\n\t\t\r\n\t\tassertEquals(expected,result); //compares add to the expected, if no match then error \r\n\t}", "@Test\n public void processTestB()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),2000);\n\n Assert.assertEquals(false,trans.process());\n }", "@Test(groups=\"SMR1137\")\r\n\tpublic void smr1137(){\r\n\t\ttry {\r\n\t\t\t//final String firstName=testDataOR.get(\"mono_first_name\"),lastName=testDataOR.get(\"mono_last_name\"); \r\n\t\t\t//login(\"URLEportal\",testDataOR.get(\"mono_user_login\"),firstName,lastName);\r\n\t\t\teportalCust=testDataOR.get(\"customer\");\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEportal\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t//login(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t/*logger.info(\"SMR1137 execution started\");\r\n\t\t\tfinal String customerName=testDataOR.get(\"customer\");\r\n\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 1 :\");\r\n\t\t\tlogger.info(\"Access eportal with superuser\");\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 2,3,4:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Disable ‘ePayment’ module and validate\r\n\t\t\tlogger.info(\"Step 5:\");\r\n\t\t\tdisableModNVal(\"ep_ckbx_id\", EPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Disable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tdisableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Access ePortal with a superuser and select customer\r\n\t\t\t//In Store Payment menu should not be available\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tAssert.assertFalse(selUtils.isElementPresentCommon(\"instorepay_tab_xpath\"),INSTOREPAY+\" menu is available\");\r\n\t\t\tlogger.info(\"In store payment menu is not available\");\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 8,9:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Enable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 10\");\r\n\t\t\tenableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\r\n\t\t\t\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 11\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);*/\r\n\t\t\tlogger.info(\"SMR1137 execution started\");\r\n\t\t}catch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "@Test\n public void testCalculateNominationCuantity2() throws FileNotFoundException {\n System.out.println(\"testCalculateNominationCuantity 2\");\n double expResult = 125.0;\n double result = calc.getChange(124d, calc.calculateDenominationCuantity(124d));\n assertEquals(expResult, result);\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "private static boolean KawigiEdit_RunTest(int testNum, int[] p0, String[] p1, boolean hasAnswer, int p2) {\n\t\tSystem.out.print(\"Test \" + testNum + \": [\" + \"{\");\n\t\tfor (int i = 0; p0.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(p0[i]);\n\t\t}\n\t\tSystem.out.print(\"}\" + \",\" + \"{\");\n\t\tfor (int i = 0; p1.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\\"\" + p1[i] + \"\\\"\");\n\t\t}\n\t\tSystem.out.print(\"}\");\n\t\tSystem.out.println(\"]\");\n\t\tXorTravelingSalesman obj;\n\t\tint answer;\n\t\tobj = new XorTravelingSalesman();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tanswer = obj.maxProfit(p0, p1);\n\t\tlong endTime = System.currentTimeMillis();\n\t\tboolean res;\n\t\tres = true;\n\t\tSystem.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n\t\tif (hasAnswer) {\n\t\t\tSystem.out.println(\"Desired answer:\");\n\t\t\tSystem.out.println(\"\\t\" + p2);\n\t\t}\n\t\tSystem.out.println(\"Your answer:\");\n\t\tSystem.out.println(\"\\t\" + answer);\n\t\tif (hasAnswer) {\n\t\t\tres = answer == p2;\n\t\t}\n\t\tif (!res) {\n\t\t\tSystem.out.println(\"DOESN'T MATCH!!!!\");\n\t\t} else if ((endTime - startTime) / 1000.0 >= 2) {\n\t\t\tSystem.out.println(\"FAIL the timeout\");\n\t\t\tres = false;\n\t\t} else if (hasAnswer) {\n\t\t\tSystem.out.println(\"Match :-)\");\n\t\t} else {\n\t\t\tSystem.out.println(\"OK, but is it right?\");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\treturn res;\n\t}", "@Test(enabled = true, retryAnalyzer=RetryAnalyzer.class)\r\n\tpublic void testParkingBookingPreparationTimeAndCleanupNotConsidered() throws IOException{\r\n\t\tReporter.log(\"<span style='font-weight:bold;color:#000033'> \"\r\n\t\t\t\t+ \"C118064: Preparation and Cleanup time should not be considered while calculating Total Cost in Parking reservation\", true);\r\n\r\n\t\t int random = (int)(Math.random() * 10)+24;\r\n\t\t String date = this.getFutureDate(random);\r\n\t\t String region = \"1preRgRef\";\r\n\t\t String from = \"18:00\";\r\n\t\t String until = \"19:00\";\r\n\t\t String prakingResv = \"prePrkDefRef\";\r\n\t\t String prepTime = \"00:30\";\r\n\t\t String cleanupTime = \"00:30\";\r\n\t\t String responsible=getUserLastNameOfLoggedInUser();\r\n\r\n\t\t SoftAssert softAssert = new SoftAssert();\r\n\t\t softAssert.setMethodName(\"testParkingBookingPreparationTimeAndCleanupNotConsidered\");\r\n\t\t \r\n\t\t expandAdministration();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t expandSubMainMenu(\"Reservation\");\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t waitAndClick(XPATH_NEWRESERVATIONS);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t //C118064\r\n\t\t setRegion(region);\r\n\t\t setDate(date);\r\n\t\t setTimeFrom(from);\r\n\t\t setTimeUntil(until);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t clickParkingTab();\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t clickSearch();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t clickLaunchReservation(prakingResv);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setTimePrepareFromReservationPanel(prepTime);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setTimeCleanupFromReservationPanel(cleanupTime);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setResponsible(responsible);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t clickSummaryTab();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t String getSummaryText = getItemDetailsFromReservationSummary(prakingResv);\r\n\t\t softAssert.assertTrue( getSummaryText.contains(\"1 h x 4.00 EUR\"),\"Total cost is calculated without considering Prepare/Cleanup time\");\r\n\t\t softAssert.assertTrue(getSummaryTitle().contains(\"4.04 EUR\"),\"summary title is ok before adding additional Equipment, Vehicles & Parking\");\r\n\t}", "@Test\r\n public void testCoincidenAsignaturasPracticas2() {\r\n System.out.println(\"coincidenAsignaturasPracticas2\");\r\n \r\n ManejaAsignatura mAsig=new ManejaAsignatura();\r\n \r\n List<Asignatura> asignaturas = mAsig.getAsignaturas();\r\n \r\n \r\n Horarios instance = new Horarios();\r\n HorariosPracticas instance2 = new HorariosPracticas();\r\n \r\n List<Asignatura> horarios = new ArrayList<>();\r\n \r\n horarios.add(asignaturas.get(0));\r\n horarios.add(asignaturas.get(3));\r\n horarios.add(asignaturas.get(5));\r\n \r\n instance.VerAsignaturas(horarios);\r\n boolean expResult = false;\r\n boolean result = instance2.coincidenAsignaturasPracticas2(horarios);\r\n assertEquals(expResult, result);\r\n }", "@Test(expected=NoCoinsException.class)\n\tpublic void testNoCoin() throws Exception {\n\t\td.dispense(0, 10);\n\t}", "@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }", "@Test\n public void test9() {\n try {\n cashRegister.addPennies(-2);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addDimes(-1);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addDimes(-1);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addFives(-3);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addNickels(-100);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addNickels(-1);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addOnes(-1);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addQuarters(-5);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n try {\n cashRegister.addTens(-5);\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"cant add negative value\");\n }\n }", "@Test\n void test008_addValidUsers() {\n // adding new user (check that allUsers has increased).\n\n // (Adding same user name but to different networks shouldnt throw any\n // exception.\n\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n\n Set<User> allUsersChristmasSet = christmasBuddENetwork.getAllUsers();\n int numUsersChristmas = allUsersChristmasSet.size();\n if (numUsersChristmas != 10) {\n fail(\"test008_addValidUsers(): FAILED! Did NOT return 10 users for \"\n + \"the network, but instead: \" + numUsersChristmas);\n }\n\n\n } catch (Exception e) {\n fail(\"test008_addValidUsers(): FAILED! Threw an improper exception! :(\");\n\n }\n\n\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testTRUSS() {\n CuteNetlibCase.doTest(\"TRUSS.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testCase1()\n\t{\n\t\tint numberOfCases=3;\n\t\t\n\t\t//checking number of case is positive or not\n\t\tboolean valid=BillEstimation.numberOfCaseValidation(numberOfCases);\n\t\tassertTrue(valid);\n\t}", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n public void TestUserEntersEnoughForChipsTenderisZero()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n //coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse deposited = vendingController.Post(request);\n\n VendingRequest secondrequest = new VendingRequest();\n secondrequest.IsEmpty= false;\n secondrequest.Selection = new Chips().type();\n\n VendingResponse result = vendingController.Post(secondrequest);\n\n assertThat(result.TenderValue, Is.is(0));\n }", "@Test\r\n public void test3()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(46,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_LOAN + Consts.FULL_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 3, correct : 9904, got : \"+ loan);\r\n \t}\r\n \r\n }", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\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 spendShouldBeOK() throws Exception {\n UnsecureCompactBuilder compactBuilder = new UnsecureCompactBuilder();\n\n NonceClaim nonceClaim = new NonceClaim();\n nonceClaim.setNonce(\"nonce\");\n\n String jwt = compactBuilder.claims(nonceClaim).build().toString();\n\n NonceType nonceType = new NonceType();\n nonceType.setName(\"welcome\");\n\n Nonce nonce = new Nonce();\n nonce.setId(UUID.randomUUID());\n ResourceOwner ro = FixtureFactory.makeResourceOwner();\n nonce.setResourceOwner(ro);\n nonce.setNonceType(nonceType);\n\n when(mockHashToken.run(\"nonce\")).thenReturn(\"hashedNonce\");\n when(mockNonceRepository.getByTypeAndNonce(NonceName.WELCOME, \"hashedNonce\")).thenReturn(nonce);\n\n subject.spend(jwt, NonceName.WELCOME);\n\n verify(mockNonceRepository).setSpent(nonce.getId());\n verify(mockNonceRepository).revokeUnSpent(nonce.getNonceType().getName(), nonce.getResourceOwner().getId());\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(1971, \"FlDfh\", \" It does not support what-if orders.\", \" It does not support what-if orders.\", 1946.208502764, \")kr!M&G*us\", \"FlDfh\", \"5%IaSQ<4 4{Y0&)gK\", \" projection=\", \"WcK/Llg[\", vector0, \"FlDfh\", false, \"com.ib.client.UnderComp\", \"com.ib.client.UnderComp\");\n Execution execution0 = new Execution(29, 3, \")kr!M&G*us\", (String) null, (String) null, \"(BWx q\", \"5%IaSQ<4 4{Y0&)gK\", 36, 1946.208502764, 29, (-1439), 1971, 36);\n String string0 = EWrapperMsgGenerator.execDetails(1971, contract0, execution0);\n assertEquals(\" ---- Execution Details begin ----\\nreqId = 1971\\norderId = 29\\nclientId = 3\\nsymbol = FlDfh\\nsecType = It does not support what-if orders.\\nexpiry = It does not support what-if orders.\\nstrike = 1946.208502764\\nright = )kr!M&G*us\\ncontractExchange = 5%IaSQ<4 4{Y0&)gK\\ncurrency = projection=\\nlocalSymbol = WcK/Llg[\\nexecId = )kr!M&G*us\\ntime = null\\nacctNumber = null\\nexecutionExchange = (BWx q\\nside = 5%IaSQ<4 4{Y0&)gK\\nshares = 36\\nprice = 1946.208502764\\npermId = 29\\nliquidation = -1439\\ncumQty = 1971\\navgPrice = 36.0\\n ---- Execution Details end ----\\n\", string0);\n }", "@Test public void operationTest(){\n assertEquals(calculator.squareOf(8),64);\n assertEquals(calculator.elementOf(9),3);\n assertEquals(calculator.factorial(5),120);\n assertEquals(calculator.isPrimeNumber(2),true);\n assertEquals(calculator.isPrimeNumber(13),true);\n assertEquals(calculator.isPrimeNumber(9),false);\n // assertNotEquals(calculator.factorial(4),10);\n }", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "@Test\n public void testTariffTransaction ()\n {\n initializeService();\n accountingService.addTariffTransaction(TariffTransaction.Type.SIGNUP,\n tariffB1, customerInfo1, 2, 0.0, 42.1);\n accountingService.addTariffTransaction(TariffTransaction.Type.CONSUME,\n tariffB1, customerInfo2, 7, -77.0, 7.7);\n accountingService.addRegulationTransaction(tariffB1, customerInfo1,\n 2, 10.0, -2.5);\n accountingService.addRegulationTransaction(tariffB1, customerInfo2,\n 7, -10.0, 2.0);\n assertEquals(4, accountingService.getPendingTransactions().size(), \"correct number in list\");\n assertEquals(4, accountingService.getPendingTariffTransactions().size(), \"correct number in ttx list\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n List<BrokerTransaction> signups = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.SIGNUP);\n }\n });\n assertEquals(1, signups.size(), \"one signup\");\n TariffTransaction ttx = (TariffTransaction)signups.get(0);\n assertNotNull(ttx, \"first ttx not null\");\n assertEquals(42.1, ttx.getCharge(), 1e-6, \"correct charge id 0\");\n Broker b1 = ttx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n List<BrokerTransaction> consumes = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.CONSUME);\n }\n });\n assertEquals(2, consumes.size(), \"two consumes\");\n ttx = (TariffTransaction)consumes.get(0);\n assertNotNull(ttx, \"second ttx not null\");\n TariffTransaction ttx1 = (TariffTransaction)consumes.get(1);\n assertNotNull(ttx1, \"third ttx not null\");\n if (ttx.isRegulation()) {\n // swap\n ttx = ttx1;\n ttx1 = (TariffTransaction)consumes.get(0);\n }\n assertEquals(-77.0, ttx.getKWh(), 1e-6, \"correct amount 1\");\n assertFalse(ttx.isRegulation(), \"not regulation\");\n assertEquals(-10.0, ttx1.getKWh(), 1e-6, \"correct amount 2\");\n assertTrue(ttx1.isRegulation(), \"regulation\");\n List<BrokerTransaction> produces = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.PRODUCE);\n }\n });\n assertEquals(1, produces.size(), \"one produce\");\n ttx = (TariffTransaction)produces.get(0);\n assertEquals(10.0, ttx.getKWh(), 1e-6, \"correct amount 3\");\n assertTrue(ttx.isRegulation(), \"regulation\");\n }", "@Test\r\n\tpublic void testFlatMarkupAndMultiPersonMarkup() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"111.30\"));\r\n\t}", "private boolean validateTxns(final Transaxtion txnList[]) throws TaskFailedException {\n\t\tif (txnList.length < 2)\n\t\t\treturn false;\n\t\tdouble dbAmt = 0;\n\t\tdouble crAmt = 0;\n\t\ttry {\n\t\t\tfor (final Transaxtion element : txnList) {\n\t\t\t\tfinal Transaxtion txn = element;\n\t\t\t\tif (!validateGLCode(txn))\n\t\t\t\t\treturn false;\n\t\t\t\tdbAmt += Double.parseDouble(txn.getDrAmount());\n\t\t\t\tcrAmt += Double.parseDouble(txn.getCrAmount());\n\t\t\t}\n\t\t} finally {\n\t\t\tRequiredValidator.clearEmployeeMap();\n\t\t}\n\t\tdbAmt = ExilPrecision.convertToDouble(dbAmt, 2);\n\t\tcrAmt = ExilPrecision.convertToDouble(crAmt, 2);\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Total Checking.....Debit total is :\" + dbAmt + \" Credit total is :\" + crAmt);\n\t\tif (dbAmt != crAmt)\n\t\t\tthrow new TaskFailedException(\"Total debit and credit not matching. Total debit amount is: \" + dbAmt\n\t\t\t\t\t+ \" Total credit amount is :\" + crAmt);\n\t\t// return false;\n\t\treturn true;\n\t}", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "@Test\n\tpublic void AccountCredit_test() { Using HamCrest \t\t\n\t\t// Exercise code to run and test\n\t\t//\n\t\tmiCuenta.setHolder(this.arg1);\n\t\t//\n\t\tmiCuenta.setBalance(this.arg2); \n\t\t//\n\t\tmiCuenta.setZone(this.arg3);\n\t\t//\n\t\tmiCuenta.debit(this.arg4);\n\t\tint Debit = miCuenta.getBalance(); \t\t\t\t\n\t\t// Verify\n\t\tassertThat(this.arg5, is(Debit));\n\t\t\n\t}", "@Test\n\tpublic void id700_2_3() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"other\");\n\t\tchangeEmployeeInfo(driver,\"other\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_3 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_3 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}", "@Test\n public void testAmountLeftToPay() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getAmountLeftToPay(), results.getAmountLeftToPay(), 0.15);\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "public static void main(String[] args) {\n\t\t \n\t\tResult result1 = JUnitCore.runClasses(TestUnitForCreate.class);\n\t for (Failure failure : result1.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result1.wasSuccessful());\n\n\t Result result2 = JUnitCore.runClasses(TestUnitForReadByCalimNumber.class);\n\t for (Failure failure : result2.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result2.wasSuccessful());\n\t \n\t Result result3 = JUnitCore.runClasses(TestUnitForReadByLossDate.class);\n\t for (Failure failure : result3.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result3.wasSuccessful());\n\t \n\t\tResult result4 = JUnitCore.runClasses(TestUnitForUpdate.class);\n\t\tfor (Failure failure : result4.getFailures()) {\n\t\t\tSystem.out.println(failure.toString());\n\t\t}\n\t\tSystem.out.println(result4.wasSuccessful());\n\t \n\t Result result5 = JUnitCore.runClasses(TestUnitForReadVehicle.class);\n\t for (Failure failure : result5.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result5.wasSuccessful());\n \n\t Result result6 = JUnitCore.runClasses(TestUnitForDelete.class);\n\t for (Failure failure : result6.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result6.wasSuccessful());\n\t \n\t}" ]
[ "0.7702963", "0.7399558", "0.73374814", "0.706186", "0.7002147", "0.69788957", "0.6847111", "0.68333465", "0.6733663", "0.66092527", "0.65595526", "0.64929694", "0.63925356", "0.63553905", "0.63483876", "0.63464904", "0.63406897", "0.6333181", "0.6325471", "0.6310789", "0.6306721", "0.62987506", "0.6282799", "0.62821746", "0.62744504", "0.62413764", "0.6239865", "0.6216305", "0.62049896", "0.62045366", "0.6199014", "0.61955345", "0.6189666", "0.6180082", "0.61750466", "0.61660236", "0.615738", "0.6148515", "0.6145938", "0.6142425", "0.61333245", "0.61308765", "0.61288756", "0.61270607", "0.612114", "0.6111912", "0.61055905", "0.60977393", "0.6081161", "0.60701776", "0.6069126", "0.60644585", "0.60560435", "0.6052806", "0.6050056", "0.602263", "0.6018062", "0.60140216", "0.60011595", "0.59945154", "0.5993595", "0.5988394", "0.5966556", "0.59659475", "0.59614766", "0.5956541", "0.5955503", "0.59543437", "0.59539", "0.59404385", "0.5936789", "0.5925912", "0.5925747", "0.5925406", "0.5920594", "0.59074646", "0.5880315", "0.5867504", "0.58618003", "0.5858852", "0.5851826", "0.5851499", "0.5849551", "0.58435404", "0.5842199", "0.5837676", "0.58374196", "0.5834371", "0.5833437", "0.58331305", "0.58239186", "0.58209944", "0.5809874", "0.5809418", "0.5807692", "0.58054674", "0.5793913", "0.57823455", "0.57770365", "0.57719713" ]
0.73067224
3
test case 2: Test doublespent tx0: Scrooge > Scrooge 25coins [Create Coins] tx1: Scrooge > Alice 20coins [Pay Coins] tx2: Scrooge > Bob 20coins [Doublespending]
@Test public void TxHandlerTestSecond() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException { // generate key pairs, simulate initial tx from scrooge to alice System.out.println("-----------------------------------------------------------------"); System.out.println("Test if the TxHandler can reject the double spending"); KeyPair pkScrooge = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkAlice = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkBob = KeyPairGenerator.getInstance("RSA").generateKeyPair(); Transaction tx0 = new Transaction(); tx0.addOutput(25, pkScrooge.getPublic()); byte[] initHash = null; tx0.addInput(initHash, 0); tx0.signTx(pkScrooge.getPrivate(), 0); UTXOPool utxoPool = new UTXOPool(); UTXO utxo = new UTXO(tx0.getHash(), 0); utxoPool.addUTXO(utxo, tx0.getOutput(0)); // tx 1 Transaction tx1 = new Transaction(); tx1.addInput(tx0.getHash(), 0); tx1.addOutput(25, pkAlice.getPublic()); tx1.signTx(pkScrooge.getPrivate(), 0); TxHandler txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx1) returns: " + txHandler.isValidTx(tx1)); assertTrue("tx1:One valid transaction", txHandler.handleTxs(new Transaction[]{tx1}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx1: one UTXO's created.", utxoPool.getAllUTXO().size() == 1); // tx 2:Scrooge --> Bob 20coins [*Double-spending*] Transaction tx2 = new Transaction(); tx2.addInput(tx0.getHash(), 0); tx2.addOutput(25, pkBob.getPublic()); tx2.signTx(pkScrooge.getPrivate(), 0); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx2) returns: " + txHandler.isValidTx(tx2)); assertTrue("tx2:no valid transaction", txHandler.handleTxs(new Transaction[]{tx2}).length == 0); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx2:no UTXO's created.", utxoPool.getAllUTXO().size() == 1); // System.out.println("tx1.hashCode returns: " + tx1.hashCode()); // System.out.println("tx2.hashCode returns: " + tx2.hashCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }", "@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public static void main(String[] args) throws InsufficientMoneyException, PeerException, IOException, UnreadableWalletException, AddressFormatException, BlockStoreException {\n\n\t\tif (args.length != 4) {\n\t\t\tSystem.out.println(\"Usage: java SendCoins prod|test wallet amount recipient\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t// we get the following from the command line ...\n\t\t// (this is not secure - needs validation)\n\t\tString network = args[0]; // \"test\" or \"prod\"\n\t\tString walletFileName = args[1]; // wallet file name\n\t\tString amountToSend = args[2]; // milli-BTC\n\t\tString recipient = args[3]; // Bitcoin address\n\n\t\t// the Bitcoin network to use\n\t\tfinal NetworkParameters netParams;\n\t\t// check for production Bitcoin network ...\n\t\tif (network.equalsIgnoreCase(\"prod\")) {\n\t\t\tnetParams = NetworkParameters.prodNet();\n\t\t\t// ... otherwise use the testnet\n\t\t} else {\n\t\t\tnetParams = NetworkParameters.testNet();\n\t\t}\n\n\t\t// data structure for block chain storage\n\t\tBlockStore blockStore = new MemoryBlockStore(netParams);\n\t\t// declare object to store and understand block chain\n\t\tBlockChain chain;\n\t\t// declare wallet\n\t\tWallet wallet;\n\n\t\ttry {\n\t\t\t// wallet file that contains Bitcoins we can send\n\t\t\tfinal File walletFile = new File(walletFileName);\n\t\t\t// load wallet from file\n\t\t\twallet = Wallet.loadFromFile(walletFile);\n\n\t\t\t// how man milli-Bitcoins to send\n\t\t\tBigInteger btcToSend = new BigInteger(amountToSend);\n\n\t\t\t// initialize BlockChain object\n\t\t\tchain = new BlockChain(netParams, wallet, blockStore);\n\n\t\t\t// instantiate Peer object to handle connections\n\t\t\tfinal Peer peer = new Peer(netParams, new VersionMessage(netParams, 1), chain,\n\t\t\t\t\tnew PeerAddress(InetAddress.getLocalHost()));\n\n\t\t\t// connect to peer node on localhost\n\t\t\tpeer.connectionOpened();\n\n\t\t\t// recipient address provided by official Bitcoin client\n\t\t\tAddress recipientAddress = new Address(netParams, recipient);\n\n\t\t\t// tell peer to send amountToSend to recipientAddress\n\t\t\tTransaction sendTxn = wallet.sendCoins(peer, SendRequest.to(recipientAddress, btcToSend));\n\t\t\t// null means we didn't have enough Bitcoins in our wallet for the transaction\n\t\t\tif (sendTxn == null) {\n\t\t\t\tSystem.out.println(\"Cannot send requested amount of \" + Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC; wallet only contains \" + Utils.bitcoinValueToFriendlyString(wallet.getBalance())\n\t\t\t\t\t\t+ \" BTC.\");\n\t\t\t} else {\n\t\t\t\t// once communicated to the network (via our local peer),\n\t\t\t\t// the transaction will appear on Bitcoin explorer sooner or later\n\t\t\t\tSystem.out.println(Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC sent. You can monitor the transaction here:\\n\" + sendTxn.getHashAsString());\n\t\t\t}\n\t\t\t// save wallet with new transaction(s)\n\t\t\twallet.saveToFile(walletFile);\n\t\t\t// handle the various exceptions; this needs more work\n\t\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void TxHandlerTestFifth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the input not in the UtxoPool\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n //tx1: Scrooge --> Alice 20coins [Pay Coins *NOT added to UTXO pool* due to accidents]\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n utxo = new UTXO(tx1.getHash(),0);\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n utxoPool.removeUTXO(utxo);\n assertTrue(\"tx1:UTXO has been removed.\", utxoPool.getAllUTXO().size() == 0);\n\n\n // tx2: Alice --> Bob 15coins [Pay Coins *Previous Tx NOT in UTXO pool*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(15, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 0);\n\n }", "@Test(groups = \"Transactions Tests\", description = \"Duplicate transaction\")\n\tpublic void duplicateTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDuplicateTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated\");\n\n\t\t//Testing if there is two identical transactions in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated in the 'Double Entry' account\");\n\n\t}", "@Test\n public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid signature\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx1: scrooge to alice 20 coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: alice to bob 20coins[signed by bob]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(20, pkBob.getPublic());\n tx2.signTx(pkBob.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n }", "public static void main(String[] args) {\n\t\tWallet xon = new Wallet(\"Xon\", 175d);\n\t\tWallet ion = new Wallet(\"Ion\", 175d);\n\t\txon.addCashToEmgFund(75d);\n\t\tion.addCashToEmgFund(75d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 2. Xon withdrew 50 from personal fund to buy something.\n\t\t// And then checks if Ion had borrowed anything from the common fund.\n\t\tSystem.out.println(\"Xon withdrew : \" + xon.withdrawCash(50d) + \" | \" + showCashInHand(xon, ion));\n\t\tSystem.out.println(\"Xon checks common fund : \" + Wallet.getEmergencyFund());\n\n\t\t// 3. Ion plans to buy something that costs 150 and checks wallet.\n\t\ttry {\n\t\t\tSystem.out.println(\"Ion tries to withdrew 150\");\n\t\t\tion.withdrawCash(150);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\t// 4. Ion realizes that only 100 is available in hand\n\t\t\t// and plans to take 100 from the emergency fund.\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tion.withdrawCashFromEmgFund(100d);\n\t\t\tSystem.out.println(\"Ion withdrew from common fund : 100\" + \" | \" + showCashInHand(xon, ion));\n\t\t\tSystem.out.println(\"Ion buys item for : \" + ion.withdrawCash(150d) + \" | \" + showCashInHand(xon, ion));\n\t\t}\n\n\t\t// 4. Ion received salary of 40 and plans to put 30 out of the borrowed 100\n\t\t// back to the emergency fund.\n\t\tSystem.out.println(\"Ion adds salary : 40\");\n\t\tion.addCash(40d);\n\t\tSystem.out.println(\"Ion adds to common fund : \" + 30);\n\t\tion.addCashToEmgFund(30d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 5. Last time Xon checked the common fund, the cash remaining in it was 150.\n\t\t// Assuming Ion had not borrowed anything from it, Xon orders a product for\n\t\t// cash on delivery which would cost 150.\n\t\ttry {\n\t\t\t// tries to withdraw 100 from fund to pay for CoD.\n\t\t\tSystem.out.println(\"Xon tries to withdrew 100 from common fund\");\n\t\t\txon.withdrawCashFromEmgFund(100d);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.out.println(\"Xon checks funds... \");\n\t\t\tSystem.out.println(showCashInHand(xon));\n\t\t\tSystem.out.println(\"Xon is unable to pay 150 due to insufficient funds\\nTHE END\");\n\t\t}\n\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "public static void main(String[] args) {\n\t\tBankAccount first=new BankAccount(123456);\r\n\t\tBankAccount second=new BankAccount(234567);\r\n\t\t\r\n\t\tfirst.deposit(900);\r\n\t\t\r\n\t\tSystem.out.println(first.balance);\r\n\t\tSystem.out.println(second.balance);\r\n\t\t\r\n\t\tfirst.transfer(second, 100);\r\n\t\tSystem.out.println(first.balance);\r\n\t\tSystem.out.println(second.balance);\r\n\t}", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "public static void main(String[] args) {\n Random rand = new Random();\n rand.setSeed(0);\n for (int run = 0; run < 1000 * 1000; run++) {\n // Generate 2 arrays of 50 amounts.\n final int NUM = 50;\n int difference = 0;\n int[] amounts1 = new int[50];\n int[] amounts2 = new int[50];\n for (int i = 0; i < NUM; i++) {\n amounts1[i] = rand.nextInt(500);\n amounts2[i] = rand.nextInt(500);\n difference -= amounts1[i];\n difference += amounts2[i];\n }\n\n // Make some accounts.\n Account a = new Account(0);\n Account b = new Account(1);\n\n // Run some transfer threads on the accounts.\n Thread[] threads = new Thread[] {\n new Thread(new Transfer(a, amounts1, b), \"Thread-1\"),\n new Thread(new Transfer(b, amounts2, a), \"Thread-2\"),\n };\n\n for (Thread thread : threads) {\n thread.start();\n }\n\n // Wait for them to finish.\n for (Thread thread : threads) {\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n // See if we got it right.\n if (a.getBalance() != -b.getBalance() ||\n a.getBalance() != difference ||\n b.getBalance() != -difference) {\n System.out.printf(\"Balances were %d & %d, supposed to be %d & %d\\n\",\n a.getBalance(), b.getBalance(),\n difference, -difference);\n }\n }\n }", "private void runTest(Reporter reporter, String name,\n\t\t double perTradeFee, double perShareCommission,\n\t\t double initialCash, TradeOrder[] orders,\n\t\t int expectWinCount, int expectLoseCount,\n\t\t int expectEvenCount,\n\t\t double expectAvgWinProfit,\n\t\t double expectAvgLoseLoss) {\n DefaultStockMarketHistory histories = new DefaultStockMarketHistory();\n DefaultStockHistory abcHistory = new DefaultStockHistory(\"ABC\",\"ABC\");\n for (TradeOrder order : orders) {\n float price = (float) order.getExecutedPrice();\n abcHistory.add(new DefaultStockDataPoint\n\t\t (order.getExecutedDate(),\n\t\t price, price, price, price, 1000));\n }\n histories.add(abcHistory);\n\n // set up account\n DefaultTradingAccount account =\n new DefaultTradingAccount(histories, perTradeFee, perShareCommission);\n TradeWinLossObserver obs = new TradeWinLossObserver();\n account.addTradeObserver(obs);\n\n // run \n account.initialize(orders[0].getExecutedDate(), initialCash);\n for (TradeOrder order : orders) {\n switch(order.type) {\n case BUY:\n\taccount.buyStock(order.symbol, order.shares,\n\t\t\t order.orderTiming, order.limit);\n\tbreak;\n case SELL:\n\taccount.sellStock(order.symbol, order.shares,\n\t\t\t order.orderTiming, order.limit);\n\tbreak;\n }\n account.executeOrders(order.getExecutedDate());\n }\n // verify result\n reportEquals(reporter, name+\" winningTradeCount\",\n\t\t expectWinCount, obs.getWinningTradeCount());\n reportEquals(reporter, name+\" losingTradeCount\",\n\t\t expectLoseCount, obs.getLosingTradeCount());\n reportEquals(reporter, name+\" evenTradeCount\",\n\t\t expectEvenCount, obs.getEvenTradeCount());\n reportEquals(reporter, name+\" averageWinningTradeProfit\",\n\t\t expectAvgWinProfit, obs.getAverageWinningTradeProfit());\n reportEquals(reporter, name+\" averageLosingTradeLoss\",\n\t\t expectAvgLoseLoss, obs.getAverageLosingTradeLoss());\n }", "public static void main(String[] args) {\n\t\tPayTM p = new PayTM();\n\t\t\n\t\tp.displayBalance();\n\t\tSystem.out.println(\"-------------------------------------\");\n\t\tp.deposit();\n\t\t\n\t\tp.displayBalance();\n\t\t\n\t\tSystem.out.println(\"-------------------------------------\");\n\t\tp.send();\n\t\tp.displayBalance();\n\t\t\n\t}", "public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }", "public static void doTestCase1() {\n\tRide millennium = new Ride(\"Millennium\", 6, 4.25f);\n\tRide mcCormick = new Ride(\"McCormick Place\", 5, 3.1f);\n\tRide kensington = new Ride(\"Kensington\", 4, 2.0f);\n\tRide homewood = new Ride(\"Homewood\", 2, 0);\n\tRide roosevelt = new Ride(\"Roosevelt Rd.\", 7, 4.9f);\n\t//Make a place where tickets are sold, specifiying the\n\t//number of available passes\n\tTicketBooth booth1 = new TicketBooth(4);\n\t// Make some people by specifying their height and their\n\t//money amounts\n\tPerson billy = new Person(4.9f, 10.00f);\n\tPerson donna = new Person(3.0f, 5.00f);\n\tPerson fredy = new Person(6.0f, 0.00f);\n\tPerson harry = new Person(4.8f, 78.50f);\n\tPerson jenny = new Person(2.0f, 1.00f);\n\tPerson larry = new Person(4.0f, 50.00f);\n\t//simulate a person's interactions\n\tSystem.out.println(\"Billy is a \" + billy);\n\tif (billy.buyTickets(20, booth1))\n\t\tSystem.out.println(\"Billy just bought 20 tickets.\");\n\telse\n\t\tSystem.out.println(\"Billy did not have enough money to buy 20 tickets.\");\n\tSystem.out.println(\"Billy is going on the Millennium and Roosevelt Rd....\");\n\tbilly.getOn(millennium);\n\tbilly.getOn(roosevelt);\n\tSystem.out.println(\"Billy is now a \" + billy);\n\tSystem.out.println();\n\tSystem.out.println(\"Donna is a \" + donna);\n\tif (donna.buyPass(booth1))\n\t\tSystem.out.println(\"Donna just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy a pass.\");\n\tif (donna.buyTickets(6, booth1))\n\t\tSystem.out.println(\"Donna just bought 6 tickets.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy 6 tickets.\");\n\tSystem.out.println(\"Donna is going on the McCormick Place and Merry Go Round...\");\n\tdonna.getOn(mcCormick);\n\tdonna.getOn(homewood);\n\tSystem.out.println(\"Donna is now a \" + donna);\n\tSystem.out.println();\n\tSystem.out.println(\"Fredy is a \" + fredy);\n\tif (fredy.buyTickets(5, booth1))\n\t\tSystem.out.println(\"Fredy just bought 5 tickets.\");\n\telse\n\t\tSystem.out.println(\"Fredy did not have enough money to buy 5 tickets.\");\n\tSystem.out.println(\"Fredy is going on the Merry Go Round...\");\n\tfredy.getOn(homewood);\n\tSystem.out.println(\"Fredy is now a \" + fredy);\n\tSystem.out.println();\n\tSystem.out.println(\"Harry is a \" + harry);\n\tif (harry.buyTickets(10, booth1))\n\t\tSystem.out.println(\"Harry just bought 10 tickets.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy 10 tickets.\");\n\tif (harry.buyPass(booth1))\n\t\tSystem.out.println(\"Harry just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy a pass.\");\n\tSystem.out.println(\"Harry is going on the Millennium twice and the Roosevelt Rd. Once...\");\n\tharry.getOn(millennium);\n\tharry.getOn(roosevelt);\n\tharry.getOn(millennium);\n\tSystem.out.println(\"Harry is now a \" + harry);\n\tSystem.out.println();\n\tSystem.out.println(\"Larry is a \" + larry);\n\tif (larry.buyTickets(15, booth1))\n\t\tSystem.out.println(\"Larry just bought 15 tickets.\");\n\telse\n\t\tSystem.out.println(\"Larry did not have enough money to buy 15 tickets.\");\n\tSystem.out.println(\"Larry is going on the Roosevelt Rd., Millennium and Merry Go Round...\");\n\tlarry.getOn(roosevelt);\n\tlarry.getOn(millennium);\n\tlarry.getOn(homewood);\n\tSystem.out.println(\"Larry is now a \" + larry);\n\tSystem.out.println();\n\tSystem.out.println(\"Ticket Booth 1 made $\" + booth1.getMoneyMade());\n\tSystem.out.println(\"Ticket Booth 1 has \" + booth1.getAvailablePasses()+\" passes left.\");\n\tSystem.out.println(millennium + \" and had \" + millennium.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(mcCormick + \" and had \" + mcCormick.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(kensington + \" and had \" + kensington.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(homewood + \" and had \" + homewood.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(roosevelt + \" and had \" + roosevelt.getNumberOfRiders() + \" riders.\");\n\t}", "@Test\n public void trimsBidAndAsk() {\n }", "@Test\n public void spendShouldBeOK() throws Exception {\n UnsecureCompactBuilder compactBuilder = new UnsecureCompactBuilder();\n\n NonceClaim nonceClaim = new NonceClaim();\n nonceClaim.setNonce(\"nonce\");\n\n String jwt = compactBuilder.claims(nonceClaim).build().toString();\n\n NonceType nonceType = new NonceType();\n nonceType.setName(\"welcome\");\n\n Nonce nonce = new Nonce();\n nonce.setId(UUID.randomUUID());\n ResourceOwner ro = FixtureFactory.makeResourceOwner();\n nonce.setResourceOwner(ro);\n nonce.setNonceType(nonceType);\n\n when(mockHashToken.run(\"nonce\")).thenReturn(\"hashedNonce\");\n when(mockNonceRepository.getByTypeAndNonce(NonceName.WELCOME, \"hashedNonce\")).thenReturn(nonce);\n\n subject.spend(jwt, NonceName.WELCOME);\n\n verify(mockNonceRepository).setSpent(nonce.getId());\n verify(mockNonceRepository).revokeUnSpent(nonce.getNonceType().getName(), nonce.getResourceOwner().getId());\n }", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public static void main(String[] args) {\n\t\t\n\t\tBanking s1 = AccountFactory.openSavingAccount(\"Polo\");\n\t\ttry {\n\t\t\ts1.withdraw(2000);\n\t\t} catch (BalanceException e) {\n\t\t\t//e.printStackTrace(); \t//For debugging - used by developers\n\t\t\t//System.out.println(e); \t//used for loggers\n\t\t\tSystem.out.println(e.getMessage()); \t//for end user\n\t\t}\n\t\t\n\t\ts1.deposit(3000);\n//\t\ts1.withdraw(2000);\n//\t\ts1.deposit(4000);\n//\t\t\n//\t\ts1.statement();\n\t\t\n\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Transaction Calculation\")\n\tpublic void transactionCalculation() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"100\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$100\"));\n\t\ttest.log(Status.PASS, \"Transaction created successfully and the value is correct\");\n\n\t\t//Creating another transaction, testing if its visible, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Expenses\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Books\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.typeTransactionAmount(\"50\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"How to become a good QA Engineer book\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Second transaction created successfully and the value is correct\");\n\n\t\t//Testing if the calculation is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$50\"));\n\t\ttest.log(Status.PASS, \"Calculation is correct\");\n\n\t\t//Deleting both transactions for app cleanup and logging the result to the report\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Extra income\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"How to become a good QA Engineer book\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\ttest.log(Status.PASS, \"Transactions deleted successfully\");\n\t\t\n\t\t//Testing if both transactions were deleted from the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.transactionAmoutFromSubAccountItem(\"Cash in Wallet\").shouldHave(text(\"$0\"));\n\t\ttest.log(Status.PASS, \"Transactions from the 'Double Entry' account deleted successfully\");\n\n\t}", "@Test(expected=NoCoinsException.class)\n\tpublic void testNoCoin() throws Exception {\n\t\td.dispense(0, 10);\n\t}", "public static void main(String[] args) {\n\tScanner input = new Scanner(System.in);\n\tSystem.out.println(\"What is your balance?\");\n\t\n\tint balance = input.nextInt();\n\t\n\t//500\n\tint count=0; \n\t\n\twhile(balance>0) {\n\t\tSystem.out.println(\"What is your transaction?\");\n\t\t\n\t\tint transaction = input.nextInt(); //100\n\t\t\n\t\tif (balance<transaction) {\n\t\tSystem.out.println(\"You dont have enough balance to make this transaction.\");\n\t}else {\n\t\tbalance-=transaction;\n\t\tcount++;\n\t\tSystem.out.println(\"Your new balance: \"+balance);\n\t}\n\t}\n\tSystem.out.println(\"You are out balance now.\\n You made \"+count+\" transactions.\");\n\t}", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "public static void main(String[] args) {\n\t\tint coins[] = { 2, 3, 5, 6 };\n\t\tint amount = 10;\n\t\tString result = \"\";\n\t\tcoinChange2(coins, amount, result, 0);\n\n\t}", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "public static void main(String[] args) {\n\t\tdouble sum=0;\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the item you want to buy\");\n\t\tString item=scan.nextLine();\n\t\tSystem.out.println(\"Enter the price for the item\");\n\t\tdouble price=scan.nextDouble();\n\t\t\n\t\tdo {\n\t\tSystem.out.println(\"Now please pay for your item\");\n\t\tdouble price1=scan.nextDouble();\n\t\t\tsum=sum+price1;\n\t\t\tif (sum!=price) \n\t\t\tSystem.out.println(\"Please enter more $\"+(price-sum));\n\t\t\t}\n\t\t\n\t\twhile (sum!=price);\n\t\tSystem.out.println(\"Thank you for shopping with us\");\n\t\n\t\t\n\t\t\t\n\t\t}", "@Test\n\tpublic void testAddTransaction(){\n setDoubleEntryEnabled(true);\n\t\tsetDefaultTransactionType(TransactionType.DEBIT);\n validateTransactionListDisplayed();\n\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Lunch\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"899\"));\n\t\tonView(withId(R.id.input_transaction_type))\n\t\t\t\t.check(matches(allOf(isDisplayed(), withText(R.string.label_receive))))\n\t\t\t\t.perform(click())\n\t\t\t\t.check(matches(withText(R.string.label_spend)));\n\n\t\tString expectedValue = NumberFormat.getInstance().format(-899);\n\t\tonView(withId(R.id.input_transaction_amount)).check(matches(withText(expectedValue)));\n\n int transactionsCount = getTransactionCount();\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n validateTransactionListDisplayed();\n\n List<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(DUMMY_ACCOUNT_UID);\n assertThat(transactions).hasSize(2);\n Transaction transaction = transactions.get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\n assertThat(getTransactionCount()).isEqualTo(transactionsCount + 1);\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);", "public static void main(String[] args) \n\t{\n\t\tExercise039 account1 = new Exercise039( 50.00 ); // create Exercise039 object\n\t\tExercise039 account2 = new Exercise039( -7.53 ); // create Exercise039 object\n\t\t\n\t\t// display initial balance of each object\n\t\tSystem.out.printf( \"account1 balance: $%.2f\\n\", account1.getBalance() );\n\t\tSystem.out.printf( \"account2 balance: $%.2f\\n\\n\", account2.getBalance() );\n\t\t\n\t\t// create Scanner to obtain input from command window\n\t\tScanner input = new Scanner ( System.in );\n\t\tdouble withdrawAmount; // debit amount read from user\n\t\t\n\t\tSystem.out.print( \"Enter debit amount for account1: \" ); // prompt\n\t\twithdrawAmount = input.nextDouble(); // obtain user input\n\t\tSystem.out.printf(\"\\ndeducting %.2f from account1 balance\\n\\n\", withdrawAmount );\n\t\taccount1.debit(withdrawAmount); // deduct from account1 balance\n\t\t\n\t\t// display balances\n\t\tSystem.out.printf( \"account1 balance: $%.2f\\n\", account1.getBalance() );\n\t\tSystem.out.printf( \"account2 balance: $%.2f\\n\\n\", account2.getBalance() );\n\t\t\n\t\tSystem.out.print( \"Enter withdraw amount for account2: \"); // prompt\n\t\twithdrawAmount = input.nextDouble(); // obtain user input\n\t\tSystem.out.printf( \"\\ndeducting %.2f from account2 balance\\n\\n\", withdrawAmount );\n\t\taccount2.debit( withdrawAmount ); //deduct from account2 balance\n\t\t\n\t\t// display balances\n\t\tSystem.out.printf( \"account1 balance: $%.2f\\n\", account1.getBalance() );\n\t\tSystem.out.printf( \"account2 balance: $%.2f\\n\", account2.getBalance() );\n\t}", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Test\n public void checkingAccount2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account checkingAccount = new CheckingAccount(bill, Account.CHECKING);\n bank.addCustomer(new Customer(\"Bill\").openAccount(checkingAccount));\n Transaction t = new CreditTransaction(1000.0);\n t.setTransactionDate(getTestDate(-5));\n checkingAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365.0, 5) * 1000 - 1000, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "@Test\n public void HappyDailyIncomeForStore(){\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(NconnID, storeID, productID1, 3);\n tradingSystem.subscriberPurchase(NofetID, NconnID, \"123456789\", \"4\",\"2022\" , \"123\", \"123456789\", \"Rager 101\",\"Beer Sheva\",\"Israel\",\"8458527\");\n\n Double dailyIncome = store.getDailyIncome();\n assertEquals(dailyIncome, 9000.0);\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tint test = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor(int i=0; i<test; i++) {\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tst =new StringTokenizer(br.readLine());\n\t\t\tint coin[] = new int[n+1];\n\t\t\tfor(int j=1; j<=n; j++) {\n\t\t\t\tcoin[j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t\t\n\t\t\tint money = Integer.parseInt(br.readLine());\n\t\t\tint dp[] = new int[money+1];\n\t\t\t\n\t\t\tdp[0] =1;\n\t\t\t\n\t\t\tfor(int j=1; j<=n; j++) {\n\t\t\t\tfor(int k=coin[j]; k<=money; k++) {\n\t\t\t\t\tdp[k] += dp[k - coin[j]];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.write(String.valueOf(dp[money]+\"\\n\"));\n\t\t\tbw.flush();\n\t\t\t\n\t\t}\n\t}", "@Test\n\tpublic void testChargesStudent() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, true);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (acc1.currentBalance == 949.95) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"can not withdraw transaction charge (student)\", testResult);\n\t}", "@Test\n\tpublic void test_PNL_2Deals_Buy_Sell_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, 10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 15.0, -10.0));\n\t\tassertEquals( \"50.00\", nf.format(new PNLImpl(pa, AAPL).getPNLRealized(false)) );\n\t}", "protected void increaseCoin(String userID, double coin){\n }", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "@Test\n public void testBuyTwoGetOneFree_1() throws Exception {\n Product apple = new Product(\n \"Apple\",\n \"SKU-0003\",\n ToMoney.from(\n Composite.function(Multiply.by(40),\n BinaryFunctionUnaryFunction.adapt(new UnaryCompositeBinaryFunction<Number, Number, Number>(Subtract.instance(),\n new Identity<Number>(),\n Divide.by(3))))));\n\n assertEquals(new Money(0*40),apple.getPrice(0));\n assertEquals(new Money(1*40),apple.getPrice(1));\n assertEquals(new Money(2*40),apple.getPrice(2));\n assertEquals(new Money(2*40),apple.getPrice(3));\n assertEquals(new Money(3*40),apple.getPrice(4));\n assertEquals(new Money(4*40),apple.getPrice(5));\n assertEquals(new Money(4*40),apple.getPrice(6));\n assertEquals(new Money(5*40),apple.getPrice(7));\n assertEquals(new Money(6*40),apple.getPrice(8));\n assertEquals(new Money(6*40),apple.getPrice(9));\n assertEquals(new Money(7*40),apple.getPrice(10));\n }", "public static void main(String[] args) {\n int coinNumber = 2;\n coinToss(coinNumber );\n countCount(coinNumber );\n caseSwitch(coinNumber );\n System.out.println(coinToss(coinNumber ));\n }", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "public static void main(String[] args) {\n\t\n // Code to test Account class \n \n // testing selecting an account from the database - Lab #3 Part II\n /*Account a1 = new Account();\n a1.selectDB(\"90002\");\n\t\tdouble abalance = a1.getBalance();\n System.out.println(\"Balance: \" + abalance); */\n \n // testing deposit and withraw methods Lab #4 Part I\n Account a1 = new Account();\n a1.selectDB(\"90002\");\n a1.display();\n //a1.deposit(300.00);\n /*try {\n a1.withdraw(3000.00);\n }\n catch (InsufficientFundsException ex) {\n System.out.println(ex);\n } */\n \n //a1.display(); \n \n\t}", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "public static void main(String[] args) {\n\t\tBank b = new Bank();\n\t\tRandom r = new Random();\n\t\tfor(int i = 0; i < 29; i++) {\n\t\t\tb.addAccount(new Account(i*100000, r.nextInt(1000000)*r.nextDouble(),Integer.toString(i)));\n\t\t}\n\t\tSystem.out.println(b);\n\t\tSystem.out.println(b.addAccount(new Account(1500l, r.nextInt(1000000)*r.nextDouble(), \"100\")));\n\t\tSystem.out.println(b.removeAccount(1500l));\n\t\tSystem.out.println(b.deposit(1500l, 1000d));\n\t\tSystem.out.println(b.deposit(0l, 1000d));\n\t\tSystem.out.println(b.withdraw(0l, 1000000000000000000d));\n\t}", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "public static void main(String[] args) {ITransactionBuilder t = TransactionFactory.tx_T();\n//\t\tITransactionBuilder t1 = TransactionFactory.tx_T1(42);\n//\t\tITransactionBuilder t2 = TransactionFactory.tx_T2();\n//\t\t\n//\t\tSystem.out.println(t);\n//\t\tSystem.out.println(t1);\n//\t\tSystem.out.println(t2);\n//\t\t\n//\t\t\n\t\t\n\t}", "@Test \n\tpublic void test1() {\n\t\taccount.withdraw(1000);\n\t\t//Sample (Expected) Output\n\t\tassertEquals(1000, account.getAmount(),0.01);\n\t}", "public static void main(String[] args) {\n BankAccount Yaoming = new BankAccount(0, \"blobfis@h\");\n BankAccount Hoshi = new BankAccount(2348123, \"Seventeen\");\n BankAccount Pewpew = new BankAccount(1245, \" \");\n\n System.out.println(Yaoming.getBalance());\n System.out.println(Hoshi.getAccountID());\n // System.out.println(Yaoming.getPassword());\n Yaoming.setPassword(\"donkey\");\n // System.out.println(Yaoming.getPassword());\n System.out.println(Yaoming.deposit(53.43));\n System.out.println(Yaoming.getBalance());\n if ( Yaoming.deposit(-100) ) System.out.println(\"Deposit successful!\");\n else {System.out.println(\"Deposit failed!\");}\n System.out.println();\n\n // System.out.println(Pewpew.getPassword());\n System.out.println(Pewpew.getBalance());\n System.out.println(Pewpew.deposit(2147823.23));\n System.out.println(Pewpew.withdraw(9999999));\n System.out.println(Pewpew.withdraw(-1231784.23));\n System.out.println(Pewpew.withdraw(0.23));\n System.out.println(Pewpew.getBalance());\n System.out.println();\n\n System.out.println(Hoshi.toString());\n System.out.println(Yaoming.toString());\n System.out.println(Pewpew.toString());\n System.out.println();\n\n BankAccount Sophia = new BankAccount(123456, \"meowmeow\");\n BankAccount Funky = new BankAccount(7890, \"woofwoof\");\n Sophia.deposit(7500);\n System.out.println(Sophia.getBalance());\n System.out.println(Funky.getBalance());\n System.out.println(Sophia.transferTo(Funky, 500, \"meowmeow\")); //should be true\n System.out.println(Funky.transferTo(Sophia, 1000, \"woofwoof\")); //should be false\n System.out.println(Funky.transferTo(Sophia, 300, \"hehehe\")); //should be false\n System.out.println(Sophia.getBalance()); //should be 7000.0\n System.out.println(Funky.getBalance()); //should be 500.0\n\n }", "@Test\n public void test2() {\n cashRegister.addTens(5);\n try {\n cashRegister.withdraw(0, 5);\n fail();\n } catch (InsufficientCashException e) {\n assertEquals(e.getMessage(), \"Not enough denominations\");\n }\n }", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "@Test\n\tpublic void test_PNL_2Deals_Sell_Buy_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, -10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 15.0, 10.0));\n\t\tassertEquals( \"-50.00\", nf.format(new PNLImpl(pa, AAPL).getPNLRealized(false)) );\n\t}", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "@Test\r\n\tpublic void testMakePurchase_enough_money() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tvendMachine.addItem(test, \"C\");\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(true, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "public static void main(String[] args) {\n\t\tBankAccount yoon = new BankAccount();\n\t\tyoon.initAccount(\"1234\", \"1111-1111\", 10000);\n\t\t\n\t\tBankAccount park = new BankAccount();\n\t\tpark.initAccount(\"4321\",\"2222-1111\", 20000);\n\t\t\n\t\tyoon.deposit(5000);\n\t\tpark.deposit(3000);\n\t\t\n\t\tyoon.withdraw(1000);\n\t\tpark.withdraw(2000);\n\t\t\n\t\tyoon.checkMyBalance();\n\t\tpark.checkMyBalance();\n\t}", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "Double getTotalSpent();", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public void buyStock(double askPrice, int shares, int tradeTime) {\n }", "@Test\n public void testPayCompletedSale() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // pay for sale so it is in state PAID/COMPLETED\n assertEquals(0, shop.receiveCashPayment(saleId, toBePaid), 0.001);\n totalBalance += toBePaid;\n\n // try to pay for sale second time returns -1\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid), 0.001);\n\n // verify sale remains in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not update a second time\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\n public void testWithdraw() {\n System.out.println(\"withdraw\");\n double d = 1.0;\n Account instance = new Account(\"Piper\", 10.0);\n double expResult = 9.0;\n double result = instance.withdraw(d);\n assertEquals(expResult, result, 0.0);\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 transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "@Test(groups = \"Transactions Tests\", description = \"Delete transaction\")\n\tpublic void deleteTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Edited Transaction test\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted\");\n\n\t\t//Testing if there no transaction in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted from the 'Double Entry' account\");\n\n\t}", "@Test\n\tpublic void testChargesNonStudent() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (acc1.currentBalance == 949.90) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"can not withdraw transaction charge (non student)\", testResult);\n\t}", "@Test\n public void testGetTransactionTotal() {\n System.out.println(\"getTransactionTotal\");\n //CashRegister instance = new CashRegister();\n assertEquals(0, instance.getTransactionTotal(),EPSILON);\n //Now, set up a test of 2 items\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 1.82;\n double result = instance.getTransactionTotal();\n assertEquals(expResult, result, EPSILON);\n }", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n\t//getting errors recognizing labooncoin so i used 'one'\n\tpublic void testHappyBlockPrint()\n\t{\n\t\tLaboonCoin one = new LaboonCoin();\n\t\tone.blockchain.add(\"All your base\");\n\t\tone.blockchain.add(\"are belong\");\n\t\tone.blockchain.add(\"to us\");\n\t\tassertEquals(\"All your base\" + '\\n' + \"are belong\" + '\\n' + \"to us\" + '\\n', one.getBlockChain());\n\t}", "public static void main(String[] args) {\n TestAutoTask task = new TestAutoTask();\n while (true){\n System.out.println(task.getRandomAmount().toString());\n }\n\n /*double d = 0.111;\n System.out.println(new BigDecimal(String.valueOf(d)));*/\n\n /*double rmb = 25 * 0.0001 * 6000;\n System.out.print(rmb);\n int i = 2;\n switch (i){\n case 1:\n System.out.println(\"test\");\n break;\n }*/\n }", "public void collectAndVerifyTarget() {\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n Scanner sc = new Scanner(System.in);\n int tCount = sc.nextInt();\n for (int i = 0; i < tCount; i++) {\n System.out.println(\"Enter the value of target \");\n double d = sc.nextDouble();\n double aTarget = 0;\n for (int j = 0; j < tranCount; j++) {\n aTarget = aTarget + transactions[j];\n if (aTarget >= d) {\n System.out.println(\"Target achieved after \" + (j + 1) + \" transactions \\n\");\n break;\n }\n }\n if (aTarget < d) {\n System.out.println(\"Given target is not achieved\");\n }\n }\n }", "@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }", "@Test\n public void withdrawTest() {\n\n WithdrawRequest withdrawRequest = WithdrawRequest.newBuilder()\n .setAccountNumber(7)\n .setAmount(40)\n .build();\n\n // this call waits for the response from the server\n this.blockingStub.withdraw(withdrawRequest)\n .forEachRemaining(money -> System.out.println(\"\\n\\tReceived : $\" + money.getValue()));\n }", "public static void main(String[] args) {\n\t\t// Make three accounts.\n\t\tBankAccount[] accounts = new BankAccount[3];\n\t\taccounts[0] = new BankAccount();\n\t\taccounts[1] = new BankAccount();\n\t\taccounts[2] = new BankAccount();\n\n\t\t// Deposit some money in each of the accounts.\n\t\t// You choose the amounts to store in each of the three accounts.\n\t\taccounts[0].deposit(1000.00);\n\t\taccounts[1].deposit(2000.00);\n\t\taccounts[2].deposit(3000.00);\n\t\t\n\t\t\n\t\t\n\t\tdouble totalBalance = 0.0;\n\t\tfor(int i = 0; i<accounts.length; i++)\n\t\t{\n\t\t\ttotalBalance = accounts[i].getBalance() + totalBalance;\n\t\t}\n\t\tSystem.out.println(\"Total balance of accounts is $\" + totalBalance);\n\t\t// Fill in the number below that should be printed for the total\n\t\t// balance so we can compare the two numbers when we test the program.\n\t\tSystem.out.println(\"Expected Total: $6000.0\");\n\t}", "@Test\n public void testFindRewardForDiningAccount0() {\n Calendar calendar = Calendar.getInstance();\n Date date = calendar.getTime();\n Dining dining = new Dining((float) 100.0, \"1234123412341234\", \"0123456789\", date);\n Account account = AccountTestData.createTestAccount0();\n AccountContribution contribution = account.makeContribution(new MonetaryAmount(8));\n RewardConfirmation confirmation0 = repository.confirmReward(contribution, dining);\n AccountContribution expectedContribution =\n new AccountContribution(contribution.getAccountNumber(), contribution.getAmount(),\n contribution.getDistributions());\n RewardConfirmation expectedConfirmation =\n new RewardConfirmation(confirmation0.getConfirmationNumber(), expectedContribution);\n\n RewardConfirmation confirmation = repository.findConfirmationFor(dining);\n Assert.assertEquals(\"confirmation found\", expectedConfirmation, confirmation);\n }", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\tDollarAmount amount1 = new DollarAmount (123);\n\t\tDollarAmount amount2 = new DollarAmount (456);\n\t\tif(amount1.isNegative()) {\n\t\t\tSystem.out.println(\"Is Negative.\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Is Positive.\");\n\t\t}\n\t\n\t\t//System.out.println(\"amount1 cents \"+amount1.getCents());\n\t\tDollarAmount amount3 = amount1.plus(amount2);\n\t\tSystem.out.println(\"Amount1 + Amount 2 =\"+amount3.getDollars() + amount3.getCents());\n\t\tSystem.out.println(\"Pass\");\t\n\t\t\n\t\tDollarAmount amount4 = amount2.minus(amount1);\n\t\tSystem.out.println(\"Amount 2 - Amount 1 =\"+amount4.getDollars() + amount4.getCents());\n\t\tSystem.out.println(\"Pass\");\n\t}", "@Test\n public void testCalculateNominationCuantity2() throws FileNotFoundException {\n System.out.println(\"testCalculateNominationCuantity 2\");\n double expResult = 125.0;\n double result = calc.getChange(124d, calc.calculateDenominationCuantity(124d));\n assertEquals(expResult, result);\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "public void testOneDeposit(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Host sends the teller a new account for the incoming customer\n\t\tteller.msgHereIsAccount(new BankAccount(deposit,0));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\tdeposit.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to deposit 100 dollars, instead it is for \" + teller.pendingTransactions.get(deposit), \n\t\t\t\t100.0, teller.pendingTransactions.get(deposit));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 0.0 dollars, leaving bank.\\\", instead it reads: \" + deposit.log.getLastLoggedEvent().toString(),\n\t\t\t\tdeposit.log.containsString(\"Got 0.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 100.0, instead it has \" + teller.accountsListed.get(0).getBalance(), 100.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "@Test\r\n public void test() {\r\n Configuration.getInstance().setDeductIncomeTax(false);\r\n\r\n String symbol = \"TST\";\r\n Stock stock = new Stock(symbol, \"Test Stock\");\r\n stock.setPrice(10.00);\r\n stock.setDivRate(1.00);\r\n\r\n // Initial (empty) position.\r\n Position position = new Position(stock);\r\n Assert.assertEquals(0, position.getNoOfShares());\r\n Assert.assertEquals(0.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(0.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(0.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(0.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(0.00, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // BUY 100 @ $20 ($5 costs)\r\n stock.setPrice(20.00);\r\n position.addTransaction(TestUtil.createTransaction(1, 1L, TransactionType.BUY, symbol, 100, 20.00, 5.00));\r\n Assert.assertEquals(100, position.getNoOfShares());\r\n Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(2005.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(-5.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(-0.25, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // DIVIDEND 100 @ $1.00\r\n position.addTransaction(TestUtil.createTransaction(2, 2L, TransactionType.DIVIDEND, symbol, 100, 1.00, 0.00));\r\n Assert.assertEquals(100, position.getNoOfShares());\r\n Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(2005.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(+95.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(+4.74, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // Price drops to $10\r\n stock.setPrice(10.00);\r\n Assert.assertEquals(100, position.getNoOfShares());\r\n Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(1000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(-1005.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(-50.12, position.getCurrentResultPercentage(), DELTA);\r\n Assert.assertEquals(2005.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(-905.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(-45.14, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // BUY another 100 @ $10 ($5 costs)\r\n position.addTransaction(TestUtil.createTransaction(3, 3L, TransactionType.BUY, symbol, 100, 10.00, 5.00));\r\n Assert.assertEquals(200, position.getNoOfShares());\r\n Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(-1010.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(-33.55, position.getCurrentResultPercentage(), DELTA);\r\n Assert.assertEquals(3010.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(-910.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(-30.23, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // Price raises to $20 again\r\n stock.setPrice(20.00);\r\n Assert.assertEquals(200, position.getNoOfShares());\r\n Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA);\r\n Assert.assertEquals(3010.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(100.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(+1090.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(+36.21, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // DIVIDEND 200 @ $1.25\r\n stock.setDivRate(1.25);\r\n position.addTransaction(TestUtil.createTransaction(4, 4L, TransactionType.DIVIDEND, symbol, 200, 1.25, 0.00));\r\n Assert.assertEquals(200, position.getNoOfShares());\r\n Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA);\r\n Assert.assertEquals(3010.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(250.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(8.31, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(350.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(+1340.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(+44.52, position.getTotalReturnPercentage(), DELTA);\r\n\r\n // SELL 200 @ $20 ($10 costs)\r\n position.addTransaction(TestUtil.createTransaction(5, 5L, TransactionType.SELL, symbol, 200, 20.00, 10.00));\r\n Assert.assertEquals(0, position.getNoOfShares());\r\n Assert.assertEquals(0.00, position.getCurrentCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getCurrentValue(), DELTA);\r\n Assert.assertEquals(0.00, position.getCurrentResult(), DELTA);\r\n Assert.assertEquals(0.00, position.getCurrentResultPercentage(), DELTA);\r\n Assert.assertEquals(3020.00, position.getTotalCost(), DELTA);\r\n Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA);\r\n Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA);\r\n Assert.assertEquals(350.00, position.getTotalIncome(), DELTA);\r\n Assert.assertEquals(+1330.00, position.getTotalReturn(), DELTA);\r\n Assert.assertEquals(+44.04, position.getTotalReturnPercentage(), DELTA);\r\n }", "@Test(groups = \"Transactions Tests\", description = \"Delete account with Transaction\")\n\tpublic void deleteAccountWithTransaction() {\n\t\tMainScreen.clickAddAccountBtn();\n\t\tNewAccountScreen.typeAccountName(\"Freelance jobs\");\n\t\tNewAccountScreen.clickAccountColor();\n\t\tNewAccountScreen.clickColorOption();\n\t\tNewAccountScreen.typeAccountDescription(\"Account to control my freelance jobs money\");\n\t\tNewAccountScreen.clickPlaceholderAccountOption();\n\t\tNewAccountScreen.clickSaveBtn();\n\t\tMainScreen.accountItem(\"Freelance jobs\").shouldBe(visible);\n\t\ttest.log(Status.PASS, \"Account created successfully\");\n\n\t\t//Creating a new sub-account, testing if it's visible and logging the result to the report\n\t\tMainScreen.clickAccountItem(\"Freelance jobs\");\n\t\tSubAccountScreen.clickAddSubAccountBtn();\n\t\tNewAccountScreen.typeAccountName(\"Test Automation jobs\");\n\t\tNewAccountScreen.clickAccountColor();\n\t\tNewAccountScreen.clickColorOption();\n\t\tNewAccountScreen.typeAccountDescription(\"Sub-account to control meu Test Automation freelance jobs\");\n\t\tNewAccountScreen.clickSaveBtn();\n\t\tSubAccountScreen.subAccountItem(\"Test Automation jobs\").shouldBe(visible);\n\t\ttest.log(Status.PASS, \"Sub-account created successfully\");\n\n\t\t//Creating a new transaction, testing if it's visible, if the value is correct and logging the result to the report\n\t\tSubAccountScreen.clickSubAccountItem(\"Test Automation jobs\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"N26 Home Task\");\n\t\tTransactionsScreen.typeTransactionAmount(\"250\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$250\"));\n\t\ttest.log(Status.PASS, \"Transaction created and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$250\"));\n\t\ttest.log(Status.PASS, \"Transaction in the 'Double Entry' account created and the value is correct\");\n\n\t\t//Deleting the account with the transaction, testing if it's not listed and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickOptionsBtnFromAccountItem(\"Freelance jobs\");\n\t\tMainScreen.clickDeleteAccountOption();\n\t\tMainScreen.clickDeleteTransactionRadioOption();\n\t\tMainScreen.clickDeleteBtn();\n\t\tMainScreen.accountItem(\"Freelance jobs\").shouldNotBe(visible);\n\t\ttest.log(Status.PASS, \"Account and Transaction deleted successfully\");\n\n\t\t//Testing if the transaction were deleted from the 'Double Entry' account and logging the result to the report\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"N26 Home Task\").shouldNotBe(visible);\n\t\ttest.log(Status.PASS, \"Transaction deleted successfully from the 'Double Entry' account\");\n\n\t}", "@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }", "@Test\n public void SameTokenNameOpenTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public static void main(String[] args) {\n\n Hashtable balance = new Hashtable();\n Enumeration names;\n String str;\n double bal;\n\n balance.put(\"Zara\", new Double(54700));\n balance.put(\"Mahnaz\", new Double(123.22));\n balance.put(\"Ayan\", new Double(1378.00));\n balance.put(\"Daisy\", new Double(99.22));\n balance.put(\"Qadir\", new Double(-19.08));\n\n names = balance.keys();\n while (names.hasMoreElements()) {\n str = (String) names.nextElement();\n System.out.println(str + \": \" + balance.get(str));\n }\n System.out.println();\n\n // Deposit 10000 into Zara's account\n bal = ((Double) balance.get(\"Zara\")).doubleValue();\n balance.put(\"Zara\", new Double(bal + 10000));\n System.out.println(\"Zara's new balance: \" + balance.get(\"Zara\"));\n }", "@Test\n\tpublic void testPassengerDepartingTwice() throws TrainException\n\t{\n\t\tInteger grossWeight = 1;\n\t\tInteger numberOfSeats = 10;\n\t\tInteger newPassengers = 9;\n\t\tInteger departingPassengers_1 = 3;\n\t\tInteger departingPassengers_2 = 4;\n\t\t\n\t\tasgn2RollingStock.RollingStock passengerCarUnderTest = \n\t\t\tnew asgn2RollingStock.PassengerCar((Integer)grossWeight, (Integer)numberOfSeats);\n\t\t\n\t\t((asgn2RollingStock.PassengerCar)passengerCarUnderTest).board((Integer) newPassengers);\n\t\t\n\t\t((asgn2RollingStock.PassengerCar)passengerCarUnderTest).alight((Integer) departingPassengers_1 );\n\t\t((asgn2RollingStock.PassengerCar)passengerCarUnderTest).alight((Integer) departingPassengers_2 );\n\t\t\n\t\tInteger expectedPassengersOnBoard = newPassengers - departingPassengers_1 - departingPassengers_2;\n\t\t\n\t\tassertEquals(expectedPassengersOnBoard, ((asgn2RollingStock.PassengerCar)passengerCarUnderTest).numberOnBoard());\n\t}", "@Test\n public void testCreateReward2DiningsSameDateTimePlus1Hr() {\n Calendar calendar = Calendar.getInstance();\n Date date0 = calendar.getTime();\n calendar.add(Calendar.HOUR, 1);\n Date date1 = calendar.getTime();\n Dining dining0 = new Dining((float) 100.0, \"1234123412341234\", \"0123456789\", date0);\n Dining dining1 = new Dining((float) 100.0, \"1234123412341234\", \"0123456789\", date1);\n\n Account account = AccountTestData.createTestAccount0();\n\n AccountContribution contribution = account.makeContribution(new MonetaryAmount(8));\n try {\n RewardConfirmation confirmation0 = repository.confirmReward(contribution, dining0);\n Assert.assertNotNull(\"confirmation0 should not be null\", confirmation0);\n Assert.assertNotNull(\"confirmation0 number should not be null\", confirmation0.getConfirmationNumber());\n Assert.assertEquals(\"wrong contribution object\", contribution, confirmation0.getAccountContribution());\n verifyRewardInserted(confirmation0, dining0);\n\n } catch (DataIntegrityViolationException dive) {\n logger.error(\"exception on creation of reward from contribution=\" + contribution + \":dining0=\" + dining0,\n dive);\n throw dive;\n }\n\n try {\n RewardConfirmation confirmation1 = repository.confirmReward(contribution, dining1);\n Assert.assertNotNull(\"confirmation1 should not be null\", confirmation1);\n Assert.assertNotNull(\"confirmation1 number should not be null\", confirmation1.getConfirmationNumber());\n Assert.assertEquals(\"wrong contribution object\", contribution, confirmation1.getAccountContribution());\n verifyRewardInserted(confirmation1, dining1);\n\n } catch (DataIntegrityViolationException dive) {\n logger.error(\"exception on creation of reward from contribution=\" + contribution + \":dining1=\" + dining1,\n dive);\n throw dive;\n }\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "public static void main(String[] args) {\n\t\tIAccount accountObjWithSavingsAcc=new SavingsAccount();\n\t\t\n\t\taccountObjWithSavingsAcc.depositAmount(100000);\n\t}", "public static void main(String[] args){\n\t\tfinal int PENNY_VALUE = 1;\n\t\tfinal int NICKEL_VALUE = 5;\n\t\tfinal int DIME_VALUE = 10;\n\t\tfinal int QUARTER_VALUE = 25;\n\t\tfinal int DOLLAR_VALUE = 100;\n\t\t\n\t\t// Declare the variables that contain the amount of each coin\n\t\tint pennyAmt, nickelAmt, dimeAmt, quarterAmt, totalAmount, totalDollars, totalChange;\n\t\t\n\t\t// ask for pennies\n\t\tpennyAmt = getIntFromUser(\"Enter the number of pennies: \");\n\t\t\n\t\t//ask for nickels\n\t\tnickelAmt = getIntFromUser(\"Enter the number of nickels: \");\n\t\t\n\t\t//ask for dimes\n\t\tdimeAmt = getIntFromUser(\"Enter the number of dimes: \");\n\t\t\n\t\t//ask for quarters\n\t\tquarterAmt = getIntFromUser(\"Enter the number of quarters: \");\n\t\t\n\t\t//now calculate\n\t\ttotalAmount = (pennyAmt*PENNY_VALUE) + (nickelAmt*NICKEL_VALUE) + (dimeAmt*DIME_VALUE) + (quarterAmt*QUARTER_VALUE);\n\t\ttotalDollars = totalAmount/DOLLAR_VALUE;\n\t\ttotalChange = totalAmount%DOLLAR_VALUE;\n\t\t\n\t\t//finally display all the amounts\n\t\tSystem.out.println(\"\\nPennies: \" + pennyAmt);\n\t\tSystem.out.println(\"Nickels: \" + nickelAmt);\n\t\tSystem.out.println(\"Dimes: \" + dimeAmt);\n\t\tSystem.out.println(\"Quarters: \" + quarterAmt);\n\t\tSystem.out.println(\"\\nIn total, you have $\" + totalDollars + \".\" + totalChange);\n\t}" ]
[ "0.7574216", "0.6741781", "0.66607285", "0.6639904", "0.6562323", "0.62420404", "0.61481655", "0.61317044", "0.61196566", "0.61055547", "0.60097104", "0.59729046", "0.5955936", "0.59395343", "0.5910849", "0.58859533", "0.58730686", "0.5867612", "0.5863038", "0.58448356", "0.5812558", "0.58101493", "0.5802967", "0.57682085", "0.57671535", "0.57534194", "0.57507056", "0.57385844", "0.5729783", "0.5725474", "0.5720733", "0.5720092", "0.57129014", "0.57041645", "0.5701904", "0.56967765", "0.5695249", "0.5688188", "0.5665157", "0.5657999", "0.5656616", "0.56524885", "0.5638515", "0.563241", "0.56282085", "0.5622759", "0.561514", "0.55955994", "0.55903476", "0.55884165", "0.558716", "0.5585864", "0.5570242", "0.55667", "0.5564838", "0.55594033", "0.5554639", "0.55525404", "0.55500257", "0.5546918", "0.5528082", "0.5520141", "0.5514691", "0.5509866", "0.5503402", "0.5499003", "0.54976505", "0.5494615", "0.549362", "0.548793", "0.5475397", "0.5459529", "0.5458764", "0.5457159", "0.54567075", "0.5452414", "0.54436535", "0.54306644", "0.5430151", "0.5425094", "0.54189295", "0.54169786", "0.54106194", "0.54078317", "0.54064244", "0.54050034", "0.5396186", "0.5387571", "0.53768295", "0.5369978", "0.5365334", "0.5364951", "0.5360009", "0.53561056", "0.53536576", "0.53534514", "0.5351929", "0.5350766", "0.5345563", "0.5344955" ]
0.73054713
1
test case 3: invalid output number(wrong number of coins to transfer) tx0: Scrooge > Scrooge 25coins [Create Coins] tx1: Scrooge > Alice 20coins [Pay Coins] tx2: Alice > Bob 5coins [Invalid output number] tx3: Alice > Bob 90coins [Invalid output number]
@Test public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException { // generate key pairs, simulate initial tx from scrooge to alice System.out.println("-----------------------------------------------------------------"); System.out.println("Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)"); KeyPair pkScrooge = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkAlice = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkBob = KeyPairGenerator.getInstance("RSA").generateKeyPair(); Transaction tx0 = new Transaction(); tx0.addOutput(25, pkScrooge.getPublic()); byte[] initHash = null; tx0.addInput(initHash, 0); tx0.signTx(pkScrooge.getPrivate(), 0); UTXOPool utxoPool = new UTXOPool(); UTXO utxo = new UTXO(tx0.getHash(), 0); utxoPool.addUTXO(utxo, tx0.getOutput(0)); // tx 1 scrooge to alice 20coins Transaction tx1 = new Transaction(); tx1.addInput(tx0.getHash(), 0); tx1.addOutput(20, pkAlice.getPublic()); tx1.signTx(pkScrooge.getPrivate(), 0); TxHandler txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx1) returns: " + txHandler.isValidTx(tx1)); assertTrue("tx1:add one valid transaction", txHandler.handleTxs(new Transaction[]{tx1}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx1:one UTXO's created.", utxoPool.getAllUTXO().size() == 1); // tx2: Alice --> Bob -5coins [*Invalid output number*] Transaction tx2 = new Transaction(); tx2.addInput(tx1.getHash(), 0); tx2.addOutput(-5, pkBob.getPublic()); tx2.signTx(pkAlice.getPrivate(), 0); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx2) returns: " + txHandler.isValidTx(tx2)); assertTrue("tx2:add one invalid transaction", txHandler.handleTxs(new Transaction[]{tx2}).length == 0); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx2:one UTXO's remained", utxoPool.getAllUTXO().size() == 1); // tx3: Alice --> Bob 90coins [*Invalid output number*] Transaction tx3 = new Transaction(); tx3.addInput(tx1.getHash(), 0); tx3.addOutput(90, pkBob.getPublic()); tx3.signTx(pkAlice.getPrivate(), 0); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx3) returns: " + txHandler.isValidTx(tx3)); assertTrue("tx3:add one invalid transaction", txHandler.handleTxs(new Transaction[]{tx3}).length == 0); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx3:one UTXO's remained", utxoPool.getAllUTXO().size() == 1); // System.out.println("tx1.hashCode returns: " + tx1.hashCode()); // System.out.println("tx2.hashCode returns: " + tx2.hashCode()); // System.out.println("tx3.hashCode returns: " + tx3.hashCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public static void main(String[] args) {\n\n Solution solution = new Solution();\n\n int[] coins = null;\n int amount = 0;\n int expected = 0;\n int answer = 0;\n String format = \"%s, %d -> %d (%d)\";\n\n // [1, 2, 5], 11 -> 3\n coins = new int[]{1, 2, 5};\n amount = 11;\n expected = 3;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2], 3 -> -1\n coins = new int[]{2};\n amount = 3;\n expected = -1;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [1, 2, 5], 21 -> 5\n coins = new int[]{1, 2, 5};\n amount = 21;\n expected = 5;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2, 7, 8, 10], 29 -> 4\n coins = new int[]{2, 7, 8, 10};\n amount = 29;\n expected = 4;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [2, 5, 10, 1], 27 -> 4\n coins = new int[]{2, 5, 10, 1};\n amount = 27;\n expected = 4;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n // [186, 419, 83, 408], 6249 -> 20\n coins = new int[]{186, 419, 83, 408};\n amount = 6249;\n expected = 20;\n answer = solution.coinChange(coins, amount);\n System.out.println(String.format(format, coins, amount, expected, answer));\n\n }", "@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }", "@Test\n public void TxHandlerTestFifth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the input not in the UtxoPool\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n //tx1: Scrooge --> Alice 20coins [Pay Coins *NOT added to UTXO pool* due to accidents]\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n utxo = new UTXO(tx1.getHash(),0);\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n utxoPool.removeUTXO(utxo);\n assertTrue(\"tx1:UTXO has been removed.\", utxoPool.getAllUTXO().size() == 0);\n\n\n // tx2: Alice --> Bob 15coins [Pay Coins *Previous Tx NOT in UTXO pool*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(15, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 0);\n\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }", "public static void main(String[] args) {\n\tScanner input = new Scanner(System.in);\n\tSystem.out.println(\"What is your balance?\");\n\t\n\tint balance = input.nextInt();\n\t\n\t//500\n\tint count=0; \n\t\n\twhile(balance>0) {\n\t\tSystem.out.println(\"What is your transaction?\");\n\t\t\n\t\tint transaction = input.nextInt(); //100\n\t\t\n\t\tif (balance<transaction) {\n\t\tSystem.out.println(\"You dont have enough balance to make this transaction.\");\n\t}else {\n\t\tbalance-=transaction;\n\t\tcount++;\n\t\tSystem.out.println(\"Your new balance: \"+balance);\n\t}\n\t}\n\tSystem.out.println(\"You are out balance now.\\n You made \"+count+\" transactions.\");\n\t}", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void TxHandlerTestSecond() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the double spending\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(25, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1: one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx 2:Scrooge --> Bob 20coins [*Double-spending*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx0.getHash(), 0);\n tx2.addOutput(25, pkBob.getPublic());\n tx2.signTx(pkScrooge.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n\n }", "public static void main(String[] args) {\n\t\tWallet xon = new Wallet(\"Xon\", 175d);\n\t\tWallet ion = new Wallet(\"Ion\", 175d);\n\t\txon.addCashToEmgFund(75d);\n\t\tion.addCashToEmgFund(75d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 2. Xon withdrew 50 from personal fund to buy something.\n\t\t// And then checks if Ion had borrowed anything from the common fund.\n\t\tSystem.out.println(\"Xon withdrew : \" + xon.withdrawCash(50d) + \" | \" + showCashInHand(xon, ion));\n\t\tSystem.out.println(\"Xon checks common fund : \" + Wallet.getEmergencyFund());\n\n\t\t// 3. Ion plans to buy something that costs 150 and checks wallet.\n\t\ttry {\n\t\t\tSystem.out.println(\"Ion tries to withdrew 150\");\n\t\t\tion.withdrawCash(150);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\t// 4. Ion realizes that only 100 is available in hand\n\t\t\t// and plans to take 100 from the emergency fund.\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tion.withdrawCashFromEmgFund(100d);\n\t\t\tSystem.out.println(\"Ion withdrew from common fund : 100\" + \" | \" + showCashInHand(xon, ion));\n\t\t\tSystem.out.println(\"Ion buys item for : \" + ion.withdrawCash(150d) + \" | \" + showCashInHand(xon, ion));\n\t\t}\n\n\t\t// 4. Ion received salary of 40 and plans to put 30 out of the borrowed 100\n\t\t// back to the emergency fund.\n\t\tSystem.out.println(\"Ion adds salary : 40\");\n\t\tion.addCash(40d);\n\t\tSystem.out.println(\"Ion adds to common fund : \" + 30);\n\t\tion.addCashToEmgFund(30d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 5. Last time Xon checked the common fund, the cash remaining in it was 150.\n\t\t// Assuming Ion had not borrowed anything from it, Xon orders a product for\n\t\t// cash on delivery which would cost 150.\n\t\ttry {\n\t\t\t// tries to withdraw 100 from fund to pay for CoD.\n\t\t\tSystem.out.println(\"Xon tries to withdrew 100 from common fund\");\n\t\t\txon.withdrawCashFromEmgFund(100d);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.out.println(\"Xon checks funds... \");\n\t\t\tSystem.out.println(showCashInHand(xon));\n\t\t\tSystem.out.println(\"Xon is unable to pay 150 due to insufficient funds\\nTHE END\");\n\t\t}\n\n\t}", "public static void main(String[] args) throws InsufficientMoneyException, PeerException, IOException, UnreadableWalletException, AddressFormatException, BlockStoreException {\n\n\t\tif (args.length != 4) {\n\t\t\tSystem.out.println(\"Usage: java SendCoins prod|test wallet amount recipient\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t// we get the following from the command line ...\n\t\t// (this is not secure - needs validation)\n\t\tString network = args[0]; // \"test\" or \"prod\"\n\t\tString walletFileName = args[1]; // wallet file name\n\t\tString amountToSend = args[2]; // milli-BTC\n\t\tString recipient = args[3]; // Bitcoin address\n\n\t\t// the Bitcoin network to use\n\t\tfinal NetworkParameters netParams;\n\t\t// check for production Bitcoin network ...\n\t\tif (network.equalsIgnoreCase(\"prod\")) {\n\t\t\tnetParams = NetworkParameters.prodNet();\n\t\t\t// ... otherwise use the testnet\n\t\t} else {\n\t\t\tnetParams = NetworkParameters.testNet();\n\t\t}\n\n\t\t// data structure for block chain storage\n\t\tBlockStore blockStore = new MemoryBlockStore(netParams);\n\t\t// declare object to store and understand block chain\n\t\tBlockChain chain;\n\t\t// declare wallet\n\t\tWallet wallet;\n\n\t\ttry {\n\t\t\t// wallet file that contains Bitcoins we can send\n\t\t\tfinal File walletFile = new File(walletFileName);\n\t\t\t// load wallet from file\n\t\t\twallet = Wallet.loadFromFile(walletFile);\n\n\t\t\t// how man milli-Bitcoins to send\n\t\t\tBigInteger btcToSend = new BigInteger(amountToSend);\n\n\t\t\t// initialize BlockChain object\n\t\t\tchain = new BlockChain(netParams, wallet, blockStore);\n\n\t\t\t// instantiate Peer object to handle connections\n\t\t\tfinal Peer peer = new Peer(netParams, new VersionMessage(netParams, 1), chain,\n\t\t\t\t\tnew PeerAddress(InetAddress.getLocalHost()));\n\n\t\t\t// connect to peer node on localhost\n\t\t\tpeer.connectionOpened();\n\n\t\t\t// recipient address provided by official Bitcoin client\n\t\t\tAddress recipientAddress = new Address(netParams, recipient);\n\n\t\t\t// tell peer to send amountToSend to recipientAddress\n\t\t\tTransaction sendTxn = wallet.sendCoins(peer, SendRequest.to(recipientAddress, btcToSend));\n\t\t\t// null means we didn't have enough Bitcoins in our wallet for the transaction\n\t\t\tif (sendTxn == null) {\n\t\t\t\tSystem.out.println(\"Cannot send requested amount of \" + Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC; wallet only contains \" + Utils.bitcoinValueToFriendlyString(wallet.getBalance())\n\t\t\t\t\t\t+ \" BTC.\");\n\t\t\t} else {\n\t\t\t\t// once communicated to the network (via our local peer),\n\t\t\t\t// the transaction will appear on Bitcoin explorer sooner or later\n\t\t\t\tSystem.out.println(Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC sent. You can monitor the transaction here:\\n\" + sendTxn.getHashAsString());\n\t\t\t}\n\t\t\t// save wallet with new transaction(s)\n\t\t\twallet.saveToFile(walletFile);\n\t\t\t// handle the various exceptions; this needs more work\n\t\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tint test = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor(int i=0; i<test; i++) {\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tst =new StringTokenizer(br.readLine());\n\t\t\tint coin[] = new int[n+1];\n\t\t\tfor(int j=1; j<=n; j++) {\n\t\t\t\tcoin[j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t\t\n\t\t\tint money = Integer.parseInt(br.readLine());\n\t\t\tint dp[] = new int[money+1];\n\t\t\t\n\t\t\tdp[0] =1;\n\t\t\t\n\t\t\tfor(int j=1; j<=n; j++) {\n\t\t\t\tfor(int k=coin[j]; k<=money; k++) {\n\t\t\t\t\tdp[k] += dp[k - coin[j]];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.write(String.valueOf(dp[money]+\"\\n\"));\n\t\t\tbw.flush();\n\t\t\t\n\t\t}\n\t}", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "public int giveChange(Coin coinType)\n {\n numberofcoins = 0;\n while(balance> coinType.getValue()-1E-12){\n numberofcoins++;\n balance = balance - coinType.getValue();\n }\n System.out.println(balance);\n System.out.println(numberofcoins);\n return numberofcoins;\n }", "@Test\n public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid signature\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx1: scrooge to alice 20 coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: alice to bob 20coins[signed by bob]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(20, pkBob.getPublic());\n tx2.signTx(pkBob.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "private int takeCoinInput() {\n\t\tSystem.out.println(\"Enter a denomination\");\n\n\t\tString denomination = scan.next();\n\t\twhile (!denomination.matches(\"\\\\d+\")) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\tdenomination = scan.next();\n\t\t}\n\n\t\tint coin = Integer.valueOf(denomination);\n\n\t\treturn coin;\n\t}", "public static void main(String[] args)\n {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Your name please\");\n String name = input.nextLine();\n\n // get a number from the user\n System.out.println(\"Give me the amount of money in cents please, \" + name);\n int money = input.nextInt();\n \n // limit the size of the number\n while(money>100000000)\n {\n\tSystem.out.println(\"This number is too big.\");\n\tSystem.out.println(\"Please enter something smaller\");\n\tmoney = input.nextInt();\n }\n \n // do the calculations\n\n int hundreds = money / 10000;\n int leftover = money % 10000;\n\n int fifties = leftover / 5000;\n leftover = leftover % 5000;\n\n int twenties = leftover / 2000;\n leftover = leftover % 2000;\n\n int tens = leftover / 1000;\n leftover = leftover % 1000;\n\n int fives = leftover / 500;\n leftover = leftover % 500;\n\n int ones = leftover / 100;\n leftover = leftover % 100;\n\n int quarters = leftover / 25;\n leftover = leftover % 25;\n\n int dimes = leftover / 10;\n leftover = leftover % 10;\n\n int nickels = leftover / 5;\n leftover = leftover % 5;\n\n int pennies = leftover / 1;\n\n // print the results\n System.out.println(\"\"); System.out.println(\"\"); //formating for results\n\n System.out.println(\"******Dollar Bills******\"); //This is printout of dollar bills \n System.out.print(hundreds + \" Hundred dollar bill(s), \");\n System.out.print(fifties + \" Fifty dollar bill(s), \");\n System.out.print(twenties + \" Twenty dollar bill(s), \"); \n System.out.print(tens + \" Ten dollar bill(s), \");\n System.out.print(fives + \" Five dollar bill(s), \");\n System.out.print(ones + \" One dollar bill(s)\");\n \n System.out.println(\"\"); System.out.println(\"\"); \n\n System.out.println(\"******Coins******\"); //This will printout coins \n System.out.print(quarters + \" Quarter(s), \");\n System.out.print(dimes + \" Dime(s), \");\n System.out.print(nickels + \" Nickel(s), \");\n System.out.print(pennies + \" Penny(s)\");\n\n System.out.println(\"\"); //formating for results2\n\n }", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "public int getCoinsNum();", "public static void main(String[] args) {\n BankAccount Yaoming = new BankAccount(0, \"blobfis@h\");\n BankAccount Hoshi = new BankAccount(2348123, \"Seventeen\");\n BankAccount Pewpew = new BankAccount(1245, \" \");\n\n System.out.println(Yaoming.getBalance());\n System.out.println(Hoshi.getAccountID());\n // System.out.println(Yaoming.getPassword());\n Yaoming.setPassword(\"donkey\");\n // System.out.println(Yaoming.getPassword());\n System.out.println(Yaoming.deposit(53.43));\n System.out.println(Yaoming.getBalance());\n if ( Yaoming.deposit(-100) ) System.out.println(\"Deposit successful!\");\n else {System.out.println(\"Deposit failed!\");}\n System.out.println();\n\n // System.out.println(Pewpew.getPassword());\n System.out.println(Pewpew.getBalance());\n System.out.println(Pewpew.deposit(2147823.23));\n System.out.println(Pewpew.withdraw(9999999));\n System.out.println(Pewpew.withdraw(-1231784.23));\n System.out.println(Pewpew.withdraw(0.23));\n System.out.println(Pewpew.getBalance());\n System.out.println();\n\n System.out.println(Hoshi.toString());\n System.out.println(Yaoming.toString());\n System.out.println(Pewpew.toString());\n System.out.println();\n\n BankAccount Sophia = new BankAccount(123456, \"meowmeow\");\n BankAccount Funky = new BankAccount(7890, \"woofwoof\");\n Sophia.deposit(7500);\n System.out.println(Sophia.getBalance());\n System.out.println(Funky.getBalance());\n System.out.println(Sophia.transferTo(Funky, 500, \"meowmeow\")); //should be true\n System.out.println(Funky.transferTo(Sophia, 1000, \"woofwoof\")); //should be false\n System.out.println(Funky.transferTo(Sophia, 300, \"hehehe\")); //should be false\n System.out.println(Sophia.getBalance()); //should be 7000.0\n System.out.println(Funky.getBalance()); //should be 500.0\n\n }", "public double insertCoin() {\n String coinslist[] = { \"5p\",\"10p\", \"20p\", \"50p\", \"£1\", \"£2\" };\n Menu coins = new Menu(\"Select a Coin\", coinslist);\n coins.display();\n int choice = coins.getChoice();\n while (choice < 1 || choice > coinslist.length) {\n choice = coins.getChoice();\n }\n double coin_value = 0;\n\n switch (choice) {\n case 1:\n coin_value = 0.05;\n break;\n case 2:\n coin_value = 0.1;\n break;\n case 3:\n coin_value = 0.2;\n break;\n case 4:\n coin_value = 0.5;\n break;\n case 5:\n coin_value = 1;\n break;\n case 6:\n coin_value = 2;\n break;\n default:\n }\n userMoney += coin_value;\n System.out.println(\"You have entered: £\" + coin_value);\n System.out.println(\"Total Credit: £\" + userMoney);\n\n\t\treturn coin_value;\n\n }", "public void collectAndVerifyTarget() {\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n Scanner sc = new Scanner(System.in);\n int tCount = sc.nextInt();\n for (int i = 0; i < tCount; i++) {\n System.out.println(\"Enter the value of target \");\n double d = sc.nextDouble();\n double aTarget = 0;\n for (int j = 0; j < tranCount; j++) {\n aTarget = aTarget + transactions[j];\n if (aTarget >= d) {\n System.out.println(\"Target achieved after \" + (j + 1) + \" transactions \\n\");\n break;\n }\n }\n if (aTarget < d) {\n System.out.println(\"Given target is not achieved\");\n }\n }\n }", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "@Override\n public int howManyCoins() {\n return 7;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the number of tosses\");\r\n\t\tint n = scn.nextInt();\r\n\t\tArrayList<String> ans = coinToss(n);\r\n\t\tSystem.out.println(ans);\r\n\t\tSystem.out.println(\"Total cases: \" + ans.size());\r\n\t}", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "public static void main(String[] args) throws IOException {\n// int[] input = {2,1,4};\n// int[] input = {6,1,3,2,4,7};\n// int[] input = {2};\n int[] input ={1};\n\n System.out.println(coinChange(input, 2));\n }", "@Test\n public void test2() {\n cashRegister.addTens(5);\n try {\n cashRegister.withdraw(0, 5);\n fail();\n } catch (InsufficientCashException e) {\n assertEquals(e.getMessage(), \"Not enough denominations\");\n }\n }", "public static void main(String[] args) throws Exception {\n BTCMessage btcMessage = new BTCMessage() ;\n /*btcMessage.setIP(\"localhost\");\n btcMessage.setPORT(\"7000\");*/\n //\n // btcMessage.setIP(\"localhost\");\n BigDecimal test = new BigDecimal(\"1499000000\");\n BigDecimal digit = new BigDecimal(100000000);\n test = test.divide(digit);\n System.out.println(\"sdfadsa = \" + test.toString());\n /* btcMessage.setIP(\"127.0.01\");\n btcMessage.setPORT(\"5279\");\n btcMessage.setPASSWORD(\"sax1314\");\n btcMessage.setACCESS_KEY(\"eth123456\");\n btcMessage.setSECRET_KEY(\"eth123456\");\n LBCUtils lbcUtils = new LBCUtils(btcMessage);\n TransactionDetailResp resp = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n System.three.println(\"sdfadsa = \" + resp);*/\n //String str = lbcUtils.version();\n //String str = lbcUtils.transaction_show(\"b116e8fc03c8cfbb0a65eb6a76d0905b0f7a8e7d8289f5d34bda44221eb04a1e\");\n //BaseJson resp = lbcUtils.wallet_balance();\n //System.three.println(\"----> \" + resp.getResult());\n //String str = lbcUtils.help(\"transaction_show\");\n // String str = lbcUtils.help(null);\n //BaseJson base = lbcUtils.wallet_new_address();\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"eeb23af0ff0c0d1e0ae413960ca84206e7eb225c0377f28ad9206222b53eca66\");\n //String str = lbcUtils.help(\"transaction_show\");\n //System.three.println(\"----> \" + str);\n }", "public void warningCoins(int coins);", "public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] coins=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tcoins[i]=sc.nextInt();\n\t\tArrays.sort(coins);\n\t\tint sum=sc.nextInt();\n\t\tint temp=mincoins(coins,n,sum);\n\t\tSystem.out.println(temp!=0?temp:\"Not Possible\");\n\t\tsc.close();\n\t}", "public static void main(String[] args) {\n\n\tfor (int i = 0; i < 20; i++)\n\t System.out.println(\"i: \"+ i + \", arrange: \" + arrangeCoins(i));\n\t\n//\tSystem.out.println(Integer.MAX_VALUE);\n\t\n\t// Expected: 60070\n\tSystem.out.println(\"i: 1804289383, arrange: \" + arrangeCoins(1804289383));\n }", "@Test(expected=NoCoinsException.class)\n\tpublic void testNoCoin() throws Exception {\n\t\td.dispense(0, 10);\n\t}", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public static void main(String[] args) {\n int coinNumber = 2;\n coinToss(coinNumber );\n countCount(coinNumber );\n caseSwitch(coinNumber );\n System.out.println(coinToss(coinNumber ));\n }", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public static void main(String[] args){\n\t\tfinal int PENNY_VALUE = 1;\n\t\tfinal int NICKEL_VALUE = 5;\n\t\tfinal int DIME_VALUE = 10;\n\t\tfinal int QUARTER_VALUE = 25;\n\t\tfinal int DOLLAR_VALUE = 100;\n\t\t\n\t\t// Declare the variables that contain the amount of each coin\n\t\tint pennyAmt, nickelAmt, dimeAmt, quarterAmt, totalAmount, totalDollars, totalChange;\n\t\t\n\t\t// ask for pennies\n\t\tpennyAmt = getIntFromUser(\"Enter the number of pennies: \");\n\t\t\n\t\t//ask for nickels\n\t\tnickelAmt = getIntFromUser(\"Enter the number of nickels: \");\n\t\t\n\t\t//ask for dimes\n\t\tdimeAmt = getIntFromUser(\"Enter the number of dimes: \");\n\t\t\n\t\t//ask for quarters\n\t\tquarterAmt = getIntFromUser(\"Enter the number of quarters: \");\n\t\t\n\t\t//now calculate\n\t\ttotalAmount = (pennyAmt*PENNY_VALUE) + (nickelAmt*NICKEL_VALUE) + (dimeAmt*DIME_VALUE) + (quarterAmt*QUARTER_VALUE);\n\t\ttotalDollars = totalAmount/DOLLAR_VALUE;\n\t\ttotalChange = totalAmount%DOLLAR_VALUE;\n\t\t\n\t\t//finally display all the amounts\n\t\tSystem.out.println(\"\\nPennies: \" + pennyAmt);\n\t\tSystem.out.println(\"Nickels: \" + nickelAmt);\n\t\tSystem.out.println(\"Dimes: \" + dimeAmt);\n\t\tSystem.out.println(\"Quarters: \" + quarterAmt);\n\t\tSystem.out.println(\"\\nIn total, you have $\" + totalDollars + \".\" + totalChange);\n\t}", "void tras()\r\n{\r\nScanner sc1 = new Scanner(System.in);\r\nSystem.out.println(\"Please enter the mobile phone number of the User you have to transfer money:\");\r\nString phone1 = sc1.next();\r\nSystem.out.println(\"Please enter the Amount to be transfered:\");\r\nint c = sc1.nextInt();\r\nfor(int i = 0;i<=phone.length;i++)\r\n{\r\nif(phone1.equals(phone[i]))\r\n{\r\nif(i!= x)\r\n{\r\nif(c <= money[x])\r\n{\r\nSystem.out.println(\"Please confirm the account Name of the user:\"+users[i]);\r\nSystem.out.println(\"Are you sure to continue: yes / no?\");\r\nString yesNo = sc1.next();\r\nif(yesNo.equals(yes))\r\n{\r\nmoney[i] = money[i]+c;\r\nSystem.out.println(\"Amount Transfer is successful!\");\r\nmoney[x]= money[x]-c;\r\nSystem.out.println(\"Your current balance is:\"+money[x]);\r\nbreak;\r\n}\r\nelse \r\n{\r\nSystem.out.println(\"!!! Amount Transfer failed !!!\");\r\nSystem.out.println(\"Your current balance is:\"+money[x]);\r\nbreak;\r\n}\r\n}\r\nelse \r\n{\r\nSystem.out.println(\"Transfer has failed due to insufficient balance!!\");\r\nbreak;\r\n}\r\n}\r\nelse\r\n{\r\nSystem.out.println(\"You Cannot transfer money to yourself! Please enter the phone number of the user whom you have to transfer money.\");\r\nbreak;\r\n}\r\n}\r\nelse if(i == 2)\r\n{\r\nSystem.out.println(\"The phone number you entered is incorrect or not in the bank directory!Please try with another number.\");\r\nbreak;\r\n}\r\n}\r\n}", "public static void main(String[] args) {\n Scanner leer = new Scanner(System.in);\r\n \r\n System.out.println(\"Ingrese #Cuenta del cliente A: \");\r\n cuentaA = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese #Cuenta del cliente B: \");\r\n cuentaB = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese monto a trasferir: \");\r\n monto = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese el banco de destino: \"); \r\n banco = leer.nextLine();\r\n \r\n\r\n if((cuentaA==cuentaCliente)&&(banco==bancoCliente)&&(saldoCliente>monto)&&(saldoCliente>costoTransaccion)&&(hora>=9 && hora <=12)||(hora>=15&&hora <=20))//comprobar cuentas\r\n {\r\n if((cuentaB==cuentaDestino))\r\n {\r\n costoTransaccion = 100;\r\n }\r\n else\r\n {\r\n costoTransaccion = 0;\r\n }\r\n aprobado=true;\r\n montoTransaccion = monto;\r\n System.out.println(\"Transaccion de: \"+montoTransaccion+ \" exitosa\"+\" Costo de transaccion: \"+costoTransaccion+ \"\");\r\n System.out.println(\"Saldo anterior del cliente: \"+saldoCliente+\"\\n\"+\"Saldo Actual del cliente: \"+(saldoCliente - costoTransaccion));\r\n }\r\n }", "@Test\n\tpublic void moneyTrnasferExcetionAccountNumberWrong() {\n\t\t\n\t\tint accountNumberNotExist = 1820;\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(accountNumberNotExist);\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account not found with Account Number : \");\n\t\tsb.append(accountNumberNotExist);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] input = in.readLine().split(\" \");\n\t\tint num = Integer.parseInt(input[0]);\n\t\tint cost = Integer.parseInt(input[1]);\n\n\t\tint coin[] = new int[num + 1];\n\t\tint dp[] = new int[cost + 1];\n\n\t\tfor (int i = 1; i <= num; i++)\n\t\t\tcoin[i] = Integer.parseInt(in.readLine());\n\n\t\tfor (int i = 1; i <= cost; i++)\n\t\t\tdp[i] = 100001;\n\n\t\tfor (int i = 1; i <= num; i++) {\n\t\t\tfor (int j = 1; j <= cost; j++) {\n\t\t\t\tif (j - coin[i] >= 0)\n\t\t\t\t\tdp[j] = Math.min(dp[j], dp[j - coin[i]] + 1); //최소땐 최대값 넣어주기 \n\t\t\t}\n\t\t}\n\n\t\tif (dp[cost] == 100001)\n\t\t\tSystem.out.print(-1);\n\t\telse\n\t\t\tSystem.out.println(dp[cost]);\n\t}", "public void completeTx(SendRequest req) throws InsufficientMoneyException {\n try {\n checkArgument(!req.completed, \"Given SendRequest has already been completed.\");\n // Calculate the amount of value we need to import.\n Coin value = Coin.ZERO;\n for (TransactionOutput output : req.tx.getOutputs()) {\n value = value.add(output.getValue());\n }\n\n log.info(\"Completing send tx with {} outputs totalling {} and a fee of {}/kB\", req.tx.getOutputs().size(),\n value.toFriendlyString(), req.feePerKb.toFriendlyString());\n\n // If any inputs have already been added, we don't need to get their value from wallet\n Coin totalInput = Coin.ZERO;\n for (TransactionInput input : req.tx.getInputs())\n if (input.getConnectedOutput() != null)\n totalInput = totalInput.add(input.getConnectedOutput().getValue());\n else\n log.warn(\"SendRequest transaction already has inputs but we don't know how much they are worth - they will be added to fee.\");\n value = value.subtract(totalInput);\n\n List<TransactionInput> originalInputs = new ArrayList<TransactionInput>(req.tx.getInputs());\n\n // Check for dusty sends and the OP_RETURN limit.\n if (req.ensureMinRequiredFee && !req.emptyWallet) { // Min fee checking is handled later for emptyWallet.\n int opReturnCount = 0;\n for (TransactionOutput output : req.tx.getOutputs()) {\n if (output.isDust())\n throw new DustySendRequested();\n if (output.getScriptPubKey().isOpReturn())\n ++opReturnCount;\n }\n if (opReturnCount > 1) // Only 1 OP_RETURN per transaction allowed.\n throw new MultipleOpReturnRequested();\n }\n\n // Calculate a list of ALL potential candidates for spending and then ask a coin selector to provide us\n // with the actual outputs that'll be used to gather the required amount of value. In this way, users\n // can customize coin selection policies. The call below will ignore immature coinbases and outputs\n // we don't have the keys for.\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, req.missingSigsMode == MissingSigsMode.THROW);\n\n CoinSelection bestCoinSelection;\n TransactionOutput bestChangeOutput = null;\n List<Coin> updatedOutputValues = null;\n if (!req.emptyWallet) {\n // This can throw InsufficientMoneyException.\n FeeCalculation feeCalculation = calculateFee(req, value, originalInputs, req.ensureMinRequiredFee, candidates);\n bestCoinSelection = feeCalculation.bestCoinSelection;\n bestChangeOutput = feeCalculation.bestChangeOutput;\n updatedOutputValues = feeCalculation.updatedOutputValues;\n } else {\n // We're being asked to empty the wallet. What this means is ensuring \"tx\" has only a single output\n // of the total value we can currently spend as determined by the selector, and then subtracting the fee.\n checkState(req.tx.getOutputs().size() == 1, \"Empty wallet TX must have a single output only.\");\n CoinSelector selector = req.coinSelector == null ? coinSelector : req.coinSelector;\n bestCoinSelection = selector.select(params.getMaxMoney(), candidates);\n candidates = null; // Selector took ownership and might have changed candidates. Don't access again.\n req.tx.getOutput(0).setValue(bestCoinSelection.valueGathered);\n log.info(\" emptying {}\", bestCoinSelection.valueGathered.toFriendlyString());\n }\n\n for (TransactionOutput output : bestCoinSelection.gathered)\n req.tx.addInput(output);\n\n if (req.emptyWallet) {\n final Coin feePerKb = req.feePerKb == null ? Coin.ZERO : req.feePerKb;\n if (!adjustOutputDownwardsForFee(req.tx, bestCoinSelection, feePerKb, req.ensureMinRequiredFee))\n throw new CouldNotAdjustDownwards();\n }\n\n if (updatedOutputValues != null) {\n for (int i = 0; i < updatedOutputValues.size(); i++) {\n req.tx.getOutput(i).setValue(updatedOutputValues.get(i));\n }\n }\n\n if (bestChangeOutput != null) {\n req.tx.addOutput(bestChangeOutput);\n log.info(\" with {} change\", bestChangeOutput.getValue().toFriendlyString());\n }\n\n // Now shuffle the outputs to obfuscate which is the change.\n if (req.shuffleOutputs)\n req.tx.shuffleOutputs();\n\n // Now sign the inputs, thus proving that we are entitled to redeem the connected outputs.\n if (req.signInputs)\n signTransaction(req);\n\n // Check size.\n final int size = req.tx.unsafeUlordSerialize().length;\n if (size > UldTransaction.MAX_STANDARD_TX_SIZE)\n throw new ExceededMaxTransactionSize();\n\n // Label the transaction as being a user requested payment. This can be used to render GUI wallet\n // transaction lists more appropriately, especially when the wallet starts to generate transactions itself\n // for internal purposes.\n req.tx.setPurpose(UldTransaction.Purpose.USER_PAYMENT);\n // Record the exchange rate that was valid when the transaction was completed.\n req.tx.setMemo(req.memo);\n req.completed = true;\n log.info(\" completed: {}\", req.tx);\n } finally {\n }\n }", "private static double checkOut() {\n double discount = 0;\n System.out.print(\"Do you have any coupon code (y/n): \");\n String response = sc.nextLine();\n if (!response.equals(\"y\") && !response.equals(\"n\")) {\n System.out.println(\"Invalid input\");\n checkOut();\n return 0;\n } else {\n if (response.equals(\"y\")) discount = getDiscount();\n }\n double total = printBill(discount);\n double cash = 0;\n while (true) {\n System.out.print(\"Cash: \");\n String input = sc.nextLine();\n if (input.charAt(0) < 48 || input.charAt(0) > 57) {\n System.out.println(\"Invalid input\");\n continue;\n }\n cash = Double.parseDouble(input);\n if (cash < total) {\n System.out.println(\"IS THAT JOKE? HAHAHA\");\n System.out.printf(\"You have to pay at least %.2f Baht%n\", total);\n } else {\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Cash\", cash);\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Change\", cash - total);\n break;\n }\n }\n return total;\n }", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tSystem.out.print(\"## 교환할 돈은 ?\");\n\t\tint pay = s.nextInt();\n\t\t\n\t\tint coin500;\n\t\tint coin100;\n\t\tint coin50;\n\t\tint coin10;\n\t\tint coin1;\n\t\tcoin500 = pay / 500;\n\t\tpay = pay % 500;\n\t\tSystem.out.printf(\"오백원짜리 => %d 개\\n\", coin500);\n\t\tcoin100 = pay / 100;\n\t\tpay = pay % 100;\n\t\tSystem.out.printf(\"백원짜리 => %d 개\\n\", coin100);\n\t\tcoin50 = pay / 50;\n\t\tpay = pay % 50;\n\t\tSystem.out.printf(\"오십원짜리 => %d 개\\n\", coin50);\n\t\tcoin10 = pay / 10;\n\t\tpay = pay % 10;\n\t\tSystem.out.printf(\"십원짜리 => %d 개\\n\", coin10);\n\t\tSystem.out.printf(\"바꾸지 못한 잔돈 => %d 개\\n\", pay);\n\t\tcoin1 = pay / 1;\n\t\tpay = pay % 1;\n\t\tSystem.out.printf(\"바꾸지 못한 잔돈 => %d 개\\n\", coin1);\n\t}", "@Test\r\n\tpublic void testCoinRejected() {\r\n\t\tCoin coin = new Coin(7);\r\n\t\tTheCoinSlotListener csListener = new TheCoinSlotListener();\r\n\t\tcsListener.coinRejected(vend.getCoinSlot(), coin);\r\n\t\tassertEquals(csListener.getCurrentCredit(), 0);\t\t\t\r\n\t}", "public static void main(String[] args) {\n\n String input = \"Pants\";\n int balance = 100;\n\n if (input.equals(\"Blanket\") || input.equals(\"Charger\") ||\n input.equals(\"Hat\") || input.equals(\"Headphones\") ||\n input.equals(\"Pants\") || input.equals(\"Pillow\") ||\n input.equals(\"Socks\") || input.equals(\"USB cable\")) {\n if (input.equals(\"Blanket\")) {\n balance -= 60;\n } else if (input.equals(\"Charger\")) {\n balance -= 15;\n } else if (input.equals(\"Hat\")) {\n balance -= 25;\n } else if (input.equals(\"Headphones\")) {\n balance -= 30;\n } else if (input.equals(\"Pants\")) {\n balance -= 50;\n } else if (input.equals(\"Pillow\")) {\n balance -= 40;\n } else if (input.equals(\"Socks\")) {\n balance -= 5;\n } else if (input.equals(\"USB cable\")) {\n balance -= 10;\n }\n System.out.println(\"Thank you for your purchase! \");\n System.out.print(\"Your current balance is: \" + balance + \"$\");\n } else if (input.equals(\"Laptop\") || input.equals(\"Smartphone\")) {\n System.out.println(\"Sorry, not enough funds on your gift card!\");\n } else {\n System.out.println(\"Invalid item!\");\n }\n }", "public static void main(String[] args) {\n \t\t\t Random numGen = new Random();\n \tdouble balance=(numGen.nextDouble()*4000+1000); //random number between 1000 and 5000\n Scanner myScanner = new Scanner( System.in );\n System.out.print(\"Would you like to VIEW your balance, make a DEPOSIT, or WITHDRAW? \");\n String choice= myScanner.next(); //accept user input\n //switch statement depending on what the user wants to do\nswitch (choice){\n case (\"VIEW\"): //view bank account\n System.out.print(\"your balance is $\"+balance); //display ballance\n break;\ncase (\"DEPOSIT\"): //deposit to account\n System.out.print(\"how much would you like to diposit? $\");\n double deposit= myScanner.nextDouble(); //amount user wants to deposit\n if (deposit>0){ //make sure its a valid entry\n double totalDeposit=deposit+balance; //find amount in bank after deposit\n System.out.print(\"Your total balance is \"+totalDeposit);\n }\n else {\n System.out.print(\"That is not a possitive number.\");\n }\n break;\ncase (\"WITHDRAW\"): //withdraw from account\n System.out.print(\"how much would you like to withdraw? $\");\n double withdraw= myScanner.nextDouble(); //how much will be withdrawn\n if (withdraw>0 && withdraw<balance){\n double totalWithdraw=balance-withdraw; //amount left after transacton\n System.out.print(\"Your total balance is $\"+totalWithdraw);\n }\n else{\n System.out.print(\"This amount can not be withdrawn\");\n }\n break;\n default:\nSystem.out.print(\"enter VIEW, DEPOSIT, or WITHDRAW\"); //incase of invalid entery\nreturn;\n}// swich\n}", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "@Test\n\t//getting errors recognizing labooncoin so i used 'one'\n\tpublic void testHappyBlockPrint()\n\t{\n\t\tLaboonCoin one = new LaboonCoin();\n\t\tone.blockchain.add(\"All your base\");\n\t\tone.blockchain.add(\"are belong\");\n\t\tone.blockchain.add(\"to us\");\n\t\tassertEquals(\"All your base\" + '\\n' + \"are belong\" + '\\n' + \"to us\" + '\\n', one.getBlockChain());\n\t}", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n\n int amount;\n int tries = 1; // max 3 attempts\n\n do {\n System.out.println(\"Give me 5 dollars!\");\n amount = scn.nextInt();\n tries++;\n } while (amount < 5 && tries < 4);\n\n// System.out.println(\"Give me 5 dollars!\");\n\n// amount = scn.nextInt();\n//\n// while (amount < 5 && tries <= 2) {\n// System.out.println(\"Give me 5 dollars!\");\n// tries++;\n// amount = scn.nextInt();\n// }\n//\n if (amount >= 5) {\n System.out.println(\"Thanks!\");\n } else {\n System.out.println(\"You failed!\");\n }\n\n\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "private int takeChangeInput() {\n\t\tSystem.out.println(\"Enter desired change amount\");\n\n\t\tString amount = scan.next();\n\t\twhile (!amount.matches(\"\\\\d+\")) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\tamount = scan.next();\n\t\t}\n\n\t\tint change = Integer.valueOf(amount);\n\n\t\treturn change;\n\t}", "public static void main(String[] args)\n {\n final String DISPLAYMESSAGE = \"Please enter your account number (int), account type (char), minimum balance, and current balance: \";\n \n final double SAVINGSINTREST = 0.04;\n final double CHECKINGSERVICEFEE = 25;\n final double SAVINGSSERVICEFEE = 10;\n double minimumBalance, currentBalance, checkingIntrestRate, serviceCharge;\n \n int accountNumber;\n \n char accountType;\n \n boolean checking = false;\n boolean savings = true;\n boolean applyFee = false;\n \n checkingIntrestRate = 0;\n \n //\n Scanner accountInfo = new Scanner(System.in);\n \n System.out.println(DISPLAYMESSAGE);\n accountNumber = accountInfo.nextInt();\n accountType = accountInfo.next().charAt(0);\n accountType = Character.toLowerCase(accountType);\n minimumBalance = accountInfo.nextDouble();\n currentBalance = accountInfo.nextDouble();\n //System.out.printf(\"Account Number: %0d\", accountNumber);\n \n // \n switch (accountType)\n {\n case 'c':\n checking = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n \n\n if ((minimumBalance + 5000) > currentBalance)\n {\n checkingIntrestRate = 0.03;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n \n }\n else\n {\n checkingIntrestRate = 0.05;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n }\n \n break;\n \n case 's':\n savings = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * SAVINGSINTREST));\n currentBalance = currentBalance + (currentBalance * SAVINGSINTREST);\n\n\n break;\n \n default:\n System.out.println(\"Invalid account type!\");\n \n }\n \n if (minimumBalance > currentBalance)\n { \n if (accountType == 'c')\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", CHECKINGSERVICEFEE);\n currentBalance = (currentBalance - CHECKINGSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n \n }\n else\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", SAVINGSSERVICEFEE);\n currentBalance = (currentBalance - SAVINGSSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n }\n }\n \n \n \n \n }", "public static void main(String[] args) {\n\t\tint coins[] = { 2, 3, 5, 6 };\n\t\tint amount = 10;\n\t\tString result = \"\";\n\t\tcoinChange2(coins, amount, result, 0);\n\n\t}", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "public static void buyCandy3() {\n int funds = 100;\n int itemsBought = 0;\n for (int price = 10; funds >= price; price += 10) {\n //System.out.println(\"price \" + price);\n itemsBought++;\n funds -= price;\n }\n //4 items bought.\n System.out.println(itemsBought + \" items bought.\");\n //Change: $0.00\n System.out.println(\"Change: $\" + funds);\n }", "@Test\r\n public void testCalcNewBalance() {\r\n System.out.println(\"calcNewBalance\");\r\n \r\n /*\r\n ******************\r\n TEST CASE #1\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 1\");\r\n //input values for test case 1\r\n double price = 15.75;\r\n double curBalance = 50;\r\n\r\n \r\n //create instance of MapControl class\r\n BackpackControl instance = new BackpackControl();\r\n \r\n //expected output return value\r\n double expResult = 34.25;\r\n \r\n //call function to run test\r\n double result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #2\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 2\");\r\n //input values for test case 2\r\n price = -19;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #3\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 3\");\r\n //input values for test case 3\r\n price = 100;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #4\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 4\");\r\n //input values for test case 4\r\n price = 0;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 50;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #5\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 5\");\r\n //input values for test case 5\r\n price = 1;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 49;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #6\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 6\");\r\n //input values for test case 6\r\n price = 50;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 0;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n\r\n }", "private static Result checkBaseCase(Integer numCoins, int player)\n {\n switch(numCoins)\n {\n case 1: return new Result(player, 1);\n case 2: return new Result(player, 1);\n case 3: return new Result((player+1)%2, 2);\n case 4: return new Result(player, 3);\n }\n return null;\n }", "public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }", "public static void main(String[] args) {\n Scanner myScanner = new Scanner(System.in); //allows to prompt user for input\n System.out.print(\"Enter the original cost of the check in the form xx.xx \");\n //using method within Scanner class\n double checkCost = myScanner.nextDouble();\n System.out.print(\"Enter the percentage tip that you wish to pay as\"+\n \"a whole number (in the form xx): \" ); \n double tipPercent = myScanner.nextDouble(); //promt user to enter tip perecentage\n tipPercent /= 100; //We want to convert the percentage into a decimal value\n System.out.print(\"Enter the number of people who went out to dinner: \"); \n int numPeople = myScanner.nextInt(); //promt user to enter number of people\n double totalCost; \n double costPerPerson;\n int dollars, //whole dollar amount of cost \n dimes, pennies; //for storing digits\n //to the right of the decimal point \n //for the cost$ \n totalCost = checkCost * (1 + tipPercent);\n costPerPerson = totalCost / numPeople;\n //get the whole amount, dropping decimal fraction\n dollars=(int)costPerPerson;\n //get dimes amount, e.g., \n // (int)(6.73 * 10) % 10 -> 67 % 10 -> 7\n // where the % (mod) operator returns the remainder\n // after the division: 583%100 -> 83, 27%5 -> 2 \n dimes=(int)(costPerPerson * 10) % 10;\n pennies=(int)(costPerPerson / 100);\n System.out.println(\"Each person in the group owes $\" + dollars + \".\" + dimes + pennies);\n \n \n }", "public int buyTickets(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tint previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\t//double balance = econ.getBalance(player);\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);*/\r\n\t\t\r\n\t\tnumber = this.hasBalance(uuid, number);\r\n\t\t\r\n\t\tint buyCount = Math.min(number + previousTicketCount, this.maxTicketCount) - previousTicketCount;\r\n\t\tint totalCount = Math.min(number + previousTicketCount, this.maxTicketCount);\r\n\t\t\r\n\t\tif(buyCount <= 0) { // not enough balance to buy OR max count reached\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(econ.withdrawPlayer(player, buyCount * this.ticketPrice).transactionSuccess()) {\t\t\t\r\n\t\t\tplugin.getSettings().set(\"participants.\" + uuid.toString(), totalCount);\r\n\t\t\tthis.tickets.put(uuid, totalCount);\r\n\t\t\t\r\n\t\t\tthis.jackpot += buyCount * ticketPrice - buyCount * tax;\r\n\t\t\tplugin.getSettings().set(\"jackpot\", this.jackpot);\r\n\t\t\tplugin.saveSettings();\r\n\t\t\treturn totalCount;\r\n\t\t} else {\r\n\t\t\treturn previousTicketCount;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void id700_2_3() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"other\");\n\t\tchangeEmployeeInfo(driver,\"other\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_3 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_3 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\tBank bob=new Bank(15);\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"What do you want the initial value of your account to be?\");\r\n\t\tbob.money=sc.nextDouble()+0.00;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(bob.money<bob.minMoney)\r\n\t\t\t{\r\n\t\t\t\tbob.overdrawn();\r\n\t\t\t}\r\n\t\t\t//The main menu\r\n\t\t\tSystem.out.println(\"1: Deposit\\n2: Withdraw\\n3: Check Balance\\n4: Quit\");\r\n\t\t\tSystem.out.println(\"What do you want to do?\");\r\n\t\t\tString input=sc.next();\r\n\t\t\tint option=0;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\toption=Integer.parseInt(input);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\toption=0;\r\n\t\t\t}\r\n\t\t\t//This test to see if the selected option is in the menu\r\n\t\t\tif (option>=1&&option<=4)\r\n\t\t\t{\r\n\t\t\t//preforms the necessary function based on input\r\n\t\t\t\tif(option==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"How much would you like to deposit?\");\r\n\t\t\t\t\tbob.value=sc.nextDouble();\t\r\n\t\t\t\t\tbob.deposit();\r\n\t\t\t\t}\r\n\t\t\t\tif(option==2)\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"How much would you like to withdraw?\");\r\n\t\t\t\t\tbob.value=sc.nextDouble();\t\r\n\t\t\t\t\tbob.withdraw();\r\n\t\t\t\t}\r\n\t\t\t\tif(option==3)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.printf(\"\\nYour balance is $%.2f\\n\", bob.money);\r\n\t\t\t\t}\r\n\t\t\t\tif(option==4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"WHAT YOUR LEAVING???? Fine, go away!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//error message\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"INVALID INPUT!!!! I am going to give you another chance, please do not mess up.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Item i1 = new Item(\"Energy Drink 10-pack\", 546.86, 17.89, 550759400);\n Item i2 = new Item(\"Ramen 12-pack\", 74.84, 17.21, 12);\n Item i3 = new Item(\"Coke\", 454.5, 4.99, 123123123);\n Item i4 = new Item(2.98, 926367);\n CheckoutMachine c = new CheckoutMachine(\"Walmart\");\n try {\n System.out.println(\"Scanning Item 1: \" + i1.toString());\n c.scan(i1);\n System.out.println(\"Scanning Item 2: \" + i2.toString());\n c.scan(i2);\n System.out.println(\"Scanning Item 3: \" + i3.toString());\n c.scan(i3);\n System.out.println(\"Scanning Item 4: \" + i4.toString());\n c.scan(i4);\n } catch (InvalidItemException e) {\n System.out.println(e.toString());\n }\n java.time.LocalDate date = java.time.LocalDate.now();\n date = date.minusMonths(1);\n BuzzCard bCard = new BuzzCard(\"John Smith\", 0.0);\n CreditCard cCard = new CreditCard(\"John Smith\", 1000.0, date);\n Cash cash = new Cash(1000.0);\n boolean payed = false;\n try {\n System.out.println(\"Trying BuzzCard\");\n c.payForCart(bCard);\n payed = true;\n } catch (PaymentFailedException e1) {\n System.out.println(e1.toString());\n }\n if (!payed) {\n try {\n System.out.println(\"Trying Credit Card\");\n c.payForCart(cCard);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n if (!payed) {\n try {\n System.out.println(\"Paying With Cash\");\n c.payForCart(cash);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n\n }", "public void onOutputSpent(MoneroOutputWallet output);", "public static void main(String[] args) {\n Scanner scan = new Scanner(\"11\");\n\n int input_x;\n\n int output;\n\n input_x = scan.nextInt();\n\n for (output = 1000 ; output > 0; output--) {\n if (input_x - output * 5 < 0) {\n continue;\n } else if ((input_x - output * 5) % 3 == 0) {\n break;\n }\n }\n\n if (output == 0 && input_x % 3 != 0) {\n System.out.println(-1);\n } else {\n System.out.println(output + (input_x - output * 5) / 3);\n }\n }", "public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}", "public void requestCoinsFromChat(Player player, Trade t) {\n TradeMain.getIns().getChatRequests().requestChatInformation(player, \"INSERT_COIN_AMOUND\")\n .thenAccept((message) -> {\n int coins;\n\n try {\n\n coins = Integer.parseInt(message);\n\n } catch (NumberFormatException ex) {\n\n MainData.getIns().getMessageManager().getMessage(\"COINS_MUST_BE_NUMBER\")\n .sendTo(player);\n\n requestCoinsFromChat(player, t);\n\n return;\n }\n\n PlayerData pD = MainData.getIns().getPlayerManager().getPlayer(player.getUniqueId());\n\n MainData.getIns().getServerCurrencyHandler().removeCurrency(pD, coins)\n .thenAccept((result) -> {\n\n if (result) {\n\n t.setCoins(player.getUniqueId(), coins);\n\n Inventory tradeInventory = t.getPlayerInv(pD.getPlayerID());\n\n player.openInventory(tradeInventory);\n\n } else {\n\n MainData.getIns().getMessageManager().getMessage(\"NOT_ENOUGH_COINS\")\n .format(\"%coins%\", coins)\n .sendTo(pD);\n\n requestCoinsFromChat(player, t);\n }\n });\n });\n }", "@Test\n public void test5() throws InsufficientCashException {\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n map1.put(1000, 0);\n map1.put(500, 10);\n map1.put(100, 1);\n map1.put(25, 0);\n map1.put(10, 0);\n map1.put(5, 0);\n map1.put(1, 99);\n try {\n assertEquals(map1, cashRegister.withdraw(50, 100));\n } catch (InsufficientCashException e) {\n fail();\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"Invalid arguments\");\n }\n }", "public static void main(String[] args) {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint N = in.nextInt();\r\n\t\tint K = in.nextInt();\r\n\t\tint luck_balance = 0;\r\n\t\tArrayList<Integer> important_contests = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint amount = in.nextInt();\r\n\t\t\tint importance = in.nextInt();\r\n\t\t\tluck_balance += amount;\r\n\t\t\tif (importance == 1) {\r\n\t\t\t\timportant_contests.add(amount);\r\n\t\t\t}\r\n\t\t}\r\n\t\tCollections.sort(important_contests);\r\n\t\tfor (int i = 0; i < important_contests.size() - K; i++) {\r\n\t\t\tluck_balance = luck_balance - 2 * important_contests.get(i);\r\n\t\t}\r\n\t\tSystem.out.println(luck_balance);\r\n\t}", "public static void main(String[] args) {\n\t\tBank b = new Bank();\n\t\tRandom r = new Random();\n\t\tfor(int i = 0; i < 29; i++) {\n\t\t\tb.addAccount(new Account(i*100000, r.nextInt(1000000)*r.nextDouble(),Integer.toString(i)));\n\t\t}\n\t\tSystem.out.println(b);\n\t\tSystem.out.println(b.addAccount(new Account(1500l, r.nextInt(1000000)*r.nextDouble(), \"100\")));\n\t\tSystem.out.println(b.removeAccount(1500l));\n\t\tSystem.out.println(b.deposit(1500l, 1000d));\n\t\tSystem.out.println(b.deposit(0l, 1000d));\n\t\tSystem.out.println(b.withdraw(0l, 1000000000000000000d));\n\t}", "@Test\r\n\tpublic void testInput1() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"1299.99\"), 3, \"food\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"1591.58\"));\r\n\t}", "public int coinNeededBU(int[] coins, int amount, int n) {\n int dp[] = new int[amount + 1];\n Arrays.fill(dp, Integer.MAX_VALUE);\n\n dp[0] = 0;\n for (int rupay = 1; rupay <= amount; rupay++) {\n\n //Iterating over Coins\n for (int i = 0; i < n; i++) {\n\n if (rupay - coins[i] >= 0) {\n int smallAnswer = dp[rupay - coins[i]];\n //if (smallAnswer != Integer.MAX_VALUE) {\n dp[rupay] = Math.min(dp[rupay], smallAnswer + 1);\n //}\n }\n }\n }\n for (int i : dp) {\n System.out.print(i + \", \");\n }\n System.out.println();\n return dp[amount];\n }", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "@Test\n public void testMakeChange() {\n\n //setting a variable for the amount of change the user should get back\n BigDecimal changeDue = new BigDecimal(\"3.19\");\n\n //creating map to store the results of the makeChange() method\n Map<Coin, BigDecimal> changeReturned = new HashMap<>();\n\n changeReturned = dao.makeChange(changeDue);\n\n //creating a variable to store the amount returned from the makeChange()\n // as a BigDecimal\n BigDecimal changeReturnedAsBigDecimal = BigDecimal.ZERO;\n\n BigDecimal quarter = new BigDecimal(\"0.25\");\n BigDecimal dime = new BigDecimal(\"0.10\");\n BigDecimal nickel = new BigDecimal(\"0.05\");\n BigDecimal penny = new BigDecimal(\"0.01\");\n\n BigDecimal numberOfQuarters;\n BigDecimal numberOfDimes;\n BigDecimal numberOfNickels;\n BigDecimal numberOfPennies;\n\n BigDecimal valueOfQuartersDispensed;\n BigDecimal valueOfDimesDispensed;\n BigDecimal valueOfNickelsDispensed;\n BigDecimal valueOfPenniesDispensed; \n\n //calculating the number of quarters that should be returned\n numberOfQuarters = changeDue.divide(quarter);\n //calculating the value of the quarters returned\n valueOfQuartersDispensed = numberOfQuarters.setScale(0, RoundingMode.DOWN).multiply(quarter);\n //calculating how much change is left to be dispensed after quarters\n BigDecimal changeAfterQuarters = changeDue.subtract(valueOfQuartersDispensed);\n \n //adding the value of the quarters returned\n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfQuartersDispensed);\n\n //dimes\n numberOfDimes = changeAfterQuarters.divide(dime);\n valueOfDimesDispensed = numberOfDimes.setScale(0, RoundingMode.DOWN).multiply(dime);\n\n BigDecimal changeAfterDimes = changeAfterQuarters.subtract(valueOfDimesDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfDimesDispensed);\n \n //nickels\n numberOfNickels = changeAfterDimes.divide(nickel);\n valueOfNickelsDispensed = numberOfNickels.setScale(0, RoundingMode.DOWN).multiply(nickel);\n\n BigDecimal changeAfterNickels = changeAfterDimes.subtract(valueOfNickelsDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfNickelsDispensed);\n \n //pennies\n numberOfPennies = changeAfterNickels.divide(penny);\n valueOfPenniesDispensed = numberOfPennies.setScale(0, RoundingMode.DOWN).multiply(penny);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfPenniesDispensed);\n\n //testing if the amount of change returnes equals the amount of change that is due\n assertEquals(changeDue, changeReturnedAsBigDecimal);\n }", "public static void main(String[] args) throws Exception{\n\n\t\tLogo.printLogo();\n\t\tSystem.out.print(\"GUMBOCOIN version: 0-0-0 made by Carson\");\n//\t\tfor(int i = 0;i<5;i++){\n//\t\t\tThread.sleep(100);\n//\t\t\tSystem.out.print(\".\");\n//\t\t}\n\t\tSystem.out.println(\"\\nstarting!\\n\\n\");\n\t\t\n//\t\t\n//\t\tnew ClientConsole(\"public key\").prifatHelp();\n//\t\t\n//\t\tSystem.exit(0);\n\t\t\n\t\tboolean server = false;\n\t\t\n\t\t\n\t\tString publicKey1 = \"key--publicKey1\";\n\t\tString privateKey1 = \"key--privateKey1\";\n\t\tString publicKey2 = \"key--publicKey2\";\n\t\tString privateKey2 = \"key--privateKey2\";\n\t\t\n\t\t\n\t\t\n\t\tif(server) {\n\t\t\tBlockChainManager manager = new BlockChainManager();\n\t\t\tnew Server(manager).start(1111);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tConversation.summitUser(new UserPayload(publicKey1,privateKey1));\n\t\t\n\t\t\n//\t\tUserPayload user1 = new UserPayload(publicKey1, privateKey1);\n//\t\tUserPayload user2 = new UserPayload(publicKey2, privateKey2);\n//\t\t\n//\t\tConversation.summitUser(user1);\n\t\t\n//\t\t\n//\t\tTransaction t = new Transaction(BlockClient.hashKeys(publicKey1, privateKey1),publicKey1,publicKey2);\n//\t\tt.sign(privateKey1);\n//\t\tt.setAmount(10);\n\t\t\n//\t\tmanager.addTransaction(t);\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\tfor(int i = 0;i<5;i++) {\n//\t\t\tThread.sleep(1000);\n//\t\t\tSystem.out.println(\"\\n\\n\\nstarting loop\");\n//\t\t\tDataPayload data = Conversation.getDataPayload();\n//\t\t\tSystem.out.println(\"=========\\\\/data from server:\" + ObjectToJson.dataPayloadToString(data));\n//\t\t\tdata.blockchain.printChainHashes();\n//\t\t\tSystem.out.println(\"received data\");\n//\t\t\tBlockChain chain;\n//\t\t\tchain = data.blockchain.copy();\n//\t\t\tSystem.out.println(\"========hashing data\");\n//\t\t\tchain.hashAllBlocks();\n//\t\t\tSystem.out.println(\"========mining\");\n//\t\t\tchain.mine(data);\n//\t\t\tSystem.out.println(\"=========\\\\/total chain:\" + ObjectToJson.dataPayloadToString(new DataPayload(chain,new BlockChainDataContainer())));//just to print the chain\n//\t\t\tchain.printChainHashes();\n//\t\t\tSystem.out.println(Conversation.requestSync(new SyncPayload(chain, (i%2 == 0 ? publicKey1 : publicKey2))));\n//\t\t}\n//\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\tfor(int i = 0;i<5;i++) {\n\t\t\tThread.sleep(1000);\n\t\t\tSystem.out.println(\"\\n\\n\\nstarting loop\");\n\t\t\tDataPayload data = Conversation.getDataPayload();\n\t\t\tSystem.out.println(\"=========\\\\/data from server:\" + ObjectToJson.dataPayloadToString(data));\n\t\t\tdata.blockchain.printChainHashes();\n\t\t\tSystem.out.println(\"received data\");\n\t\t\tBlockChain chain;\n\t\t\tchain = data.blockchain.copy();\n\t\t\tSystem.out.println(\"========hashing data\");\n\t\t\tchain.hashAllBlocks();\n\t\t\tSystem.out.println(\"========mining\");\n\t\t\tchain.mine(data);\n\t\t\tSystem.out.println(\"=========\\\\/total chain:\" + ObjectToJson.dataPayloadToString(new DataPayload(chain,new BlockChainDataContainer())));//just to print the chain\n\t\t\tchain.printChainHashes();\n\t\t\tSystem.out.println(Conversation.requestSync(new SyncPayload(chain, (i%2 == 0 ? publicKey1 : publicKey2))));\n\t\t}\n}", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "public static int ContShoppingOrCheckout(){\r\n int input = 0;\r\n boolean wrongNumber = false;//Boolean for error handling\r\n //Menu\r\n System.out.println(\"\\n1 Continue shopping\\n2 Check-out to collect items\");\r\n //Loop\r\n do { \r\n if(wrongNumber)System.out.println(\"Enter CORRECT number.\"); //Error if not a valid number or Exception\r\n wrongNumber = false;\r\n try {\r\n System.out.print(\"Make your choice: \");\r\n input = Vending_Machine.GetInput();\r\n System.out.println(\"\");\r\n if(1 > input || input > 2)wrongNumber = true;//Error handling nummeric input value\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Enter a numeric value, try again\"); \r\n wrongNumber = true;//Error handling exception\r\n } \r\n } while (wrongNumber);//Will loop if wrong numeric value or exception on input\r\n return input;\r\n }", "public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_4_decimal() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 10, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, int[][].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static Result solve(Integer numCoins, int player)\n {\n if (numCoins <= 4) return checkBaseCase(numCoins, player);\n\n int count1 = 0;\n int count2 = 0;\n Result p1 = solve(numCoins-1, (player+1)%2);\n //System.out.println(\"solve: \" + (numCoins-1) + \",\" + player2 + \",\" + player1 + \" returned \" + p1.getPlayer() + \" wins in \" + p1.getNumWays() + \" ways\");\n if (p1.getPlayer() == player) {\n count1 += p1.getNumWays();\n } else {\n count2 += p1.getNumWays();\n }\n p1 = solve(numCoins-2, (player+1)%2);\n //System.out.println(\"solve: \" + (numCoins-2) + \",\" + player2 + \",\" + player1 + \" returned \" + p1.getPlayer() + \" wins in \" + p1.getNumWays() + \" ways\");\n if (p1.getPlayer() == player) {\n count1 += p1.getNumWays();\n } else {\n count2 += p1.getNumWays();\n }\n p1 = solve(numCoins-4, (player+1)%2);\n //System.out.println(\"solve: \" + (numCoins-4) + \",\" + player2 + \",\" + player1 + \" returned \" + p1.getPlayer() + \" wins in \" + p1.getNumWays() + \" ways\");\n if (p1.getPlayer() == player) {\n count1 += p1.getNumWays();\n } else {\n count2 += p1.getNumWays();\n }\n\n if (count1 > 0) {\n return new Result(player, count1);\n }\n return new Result((player+1)%2, count2);\n }", "public static void main(String [] args){\n String userInput;\n userInput = JOptionPane.showInputDialog(null, \"Enter an integer number\", \"I'm going to turn into dollars\");\n int intUI = Integer.parseInt(userInput);\n \n //at this point im unsure what im supposed to do\n //does the textbook want me to tell the user how many\n //20s represent the inputed #? (And then same thing\n //for 10s, 5s, 1s) Or does it want me to display the input\n //# in the least number of bills possible?\n \n //intialize int vars \n int twenties = 0;\n int tens = 0;\n int fives = 0;\n int ones = 0;\n \n //logic chain to get the right bill numbers\n twenties = intUI / 20;\n if(intUI%20 > 0){\n intUI = intUI - twenties * 20;\n tens = intUI / 10;\n if(intUI%10 > 0){\n intUI = intUI - tens * 10;\n fives = intUI / 5;\n if(intUI%5 > 0){\n intUI = intUI - fives * 5;\n ones = intUI / 1;\n }//close if\n }//close if\n }//close if chain\n \n //show the bill numbers to user\n JOptionPane.showConfirmDialog(null, twenties + \" 20s, \"\n + tens + \" 10s, \"\n + fives + \" 5s, \"\n + ones + \" 1s, \",\n \"This is your number in the least amount of bills\",\n JOptionPane.YES_OPTION,\n JOptionPane.INFORMATION_MESSAGE);\n }", "@Test\n\tpublic void id700_2_2() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"construction\");\n\t\tchangeEmployeeInfo(driver,\"construction\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_2 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_2 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}", "@Test\r\n\tpublic void testReturnChange() {\r\n\t\tvendMachine.insertMoney(5.0);\r\n\t\tassertEquals(5.0, vendMachine.returnChange(), 0.001);\r\n\t}" ]
[ "0.7064645", "0.68087924", "0.67300135", "0.66016626", "0.6521621", "0.65011823", "0.64651334", "0.6450256", "0.629702", "0.62746155", "0.6258908", "0.62058234", "0.61737585", "0.6139556", "0.6111359", "0.6110384", "0.6088166", "0.6072749", "0.60695267", "0.6058255", "0.60363346", "0.6001837", "0.59898967", "0.594116", "0.5902953", "0.58859766", "0.5864505", "0.5853681", "0.5846479", "0.58400947", "0.58387166", "0.5831254", "0.58186644", "0.5817938", "0.5806515", "0.5782293", "0.5771365", "0.57643014", "0.5763647", "0.57613134", "0.5748123", "0.57460016", "0.5732187", "0.5731647", "0.5708416", "0.57049394", "0.5696617", "0.56943065", "0.5673347", "0.56727916", "0.56716985", "0.5669145", "0.56570387", "0.5646673", "0.56388396", "0.5638719", "0.56302845", "0.5625302", "0.56220776", "0.5620406", "0.56190324", "0.5611269", "0.5600535", "0.55971277", "0.5593047", "0.5591217", "0.5589464", "0.55833155", "0.5582797", "0.55802685", "0.5575418", "0.55688834", "0.55660695", "0.55591017", "0.5556436", "0.5553727", "0.5553687", "0.5544058", "0.55425394", "0.5532427", "0.55268496", "0.5526726", "0.55245346", "0.5517893", "0.55050296", "0.5495449", "0.5493615", "0.548752", "0.5462731", "0.5458784", "0.5458674", "0.54547536", "0.5453786", "0.54479426", "0.54466605", "0.5445951", "0.54454786", "0.54440176", "0.544297", "0.5438847" ]
0.7596753
0
test case 4: invalid signature signature is not valid tx0: Scrooge > Scrooge 25coins [Create Coins] tx1: Scrooge > Alice 20coins [Pay Coins] tx2: Alice > Bob 20coins [Signed by Bob]
@Test public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException { // generate key pairs, simulate initial tx from scrooge to alice System.out.println("-----------------------------------------------------------------"); System.out.println("Test if the TxHandler can reject invalid signature"); KeyPair pkScrooge = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkAlice = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkBob = KeyPairGenerator.getInstance("RSA").generateKeyPair(); Transaction tx0 = new Transaction(); tx0.addOutput(25, pkScrooge.getPublic()); byte[] initHash = null; tx0.addInput(initHash, 0); tx0.signTx(pkScrooge.getPrivate(), 0); UTXOPool utxoPool = new UTXOPool(); UTXO utxo = new UTXO(tx0.getHash(), 0); utxoPool.addUTXO(utxo, tx0.getOutput(0)); // tx1: scrooge to alice 20 coins Transaction tx1 = new Transaction(); tx1.addInput(tx0.getHash(), 0); tx1.addOutput(20, pkAlice.getPublic()); tx1.signTx(pkScrooge.getPrivate(), 0); TxHandler txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx1) returns: " + txHandler.isValidTx(tx1)); assertTrue("tx1:add one valid transaction", txHandler.handleTxs(new Transaction[]{tx1}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx1:one UTXO's created.", utxoPool.getAllUTXO().size() == 1); // tx2: alice to bob 20coins[signed by bob] Transaction tx2 = new Transaction(); tx2.addInput(tx1.getHash(), 0); tx2.addOutput(20, pkBob.getPublic()); tx2.signTx(pkBob.getPrivate(), 0); txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx2) returns: " + txHandler.isValidTx(tx2)); assertTrue("tx2:add one invalid transaction", txHandler.handleTxs(new Transaction[]{tx2}).length == 0); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx2:one UTXO's remained.", utxoPool.getAllUTXO().size() == 1); // System.out.println("tx1.hashCode returns: " + tx1.hashCode()); // System.out.println("tx2.hashCode returns: " + tx2.hashCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "@Test\n public void TxHandlerTestSecond() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the double spending\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(25, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1: one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx 2:Scrooge --> Bob 20coins [*Double-spending*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx0.getHash(), 0);\n tx2.addOutput(25, pkBob.getPublic());\n tx2.signTx(pkScrooge.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n\n }", "@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void TxHandlerTestFifth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the input not in the UtxoPool\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n //tx1: Scrooge --> Alice 20coins [Pay Coins *NOT added to UTXO pool* due to accidents]\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n utxo = new UTXO(tx1.getHash(),0);\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n utxoPool.removeUTXO(utxo);\n assertTrue(\"tx1:UTXO has been removed.\", utxoPool.getAllUTXO().size() == 0);\n\n\n // tx2: Alice --> Bob 15coins [Pay Coins *Previous Tx NOT in UTXO pool*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(15, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 0);\n\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "@Test\r\n public void testSignInvalidSk() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n // signkey must be 64 bytes long\r\n CryptoService instance = new CryptoService();\r\n Keys keys = new Keys(\"8wZcEriaNLNKtteJvx7f8i\", \"5L2HBnzbu6Auh2pkDRbFt5f4prvgE2LzknkuYLsKkacp\");\r\n Assertions.assertThrows(CryptoException.class, () -> {\r\n instance.sign(data, keys);\r\n });\r\n }", "public static void main(String[] args) throws AddressFormatException {\n\n// generateMultisig();\n String getSignedTransaction = signFirstTime();\n String rawtx = signSecondTime(getSignedTransaction);\n\n System.out.println(\"rawtx ->\"+ rawtx);\n }", "@Test\r\n public void testVerifyInvalidPk() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] sign = instance.sign(data, keys);\r\n keys.verkey = \"AnnxV4t3LUHKZaxVQDWoVaG44NrGmeDYMA4Gz6C2tCZd\";\r\n Assertions.assertThrows(SodiumException.class, () -> {\r\n instance.verify(data, sign, keys);\r\n });\r\n }", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "private static String signSecondTime(String transactionString)\n {\n Transaction spendTx = new Transaction(params, hexStringToByteArray(transactionString));\n\n // Get the input chunks\n Script inputScript = spendTx.getInput(0).getScriptSig();\n List<ScriptChunk> scriptChunks = inputScript.getChunks();\n\n // Create a list of all signatures. Start by extracting the existing ones from the list of script schunks.\n // The last signature in the script chunk list is the redeemScript\n List<TransactionSignature> signatureList = new ArrayList<TransactionSignature>();\n Iterator<ScriptChunk> iterator = scriptChunks.iterator();\n Script redeemScript = null;\n\n while (iterator.hasNext())\n {\n ScriptChunk chunk = iterator.next();\n\n if (iterator.hasNext() && chunk.opcode != 0)\n {\n TransactionSignature transactionSignarture = TransactionSignature.decodeFromBitcoin(chunk.data, false);\n signatureList.add(transactionSignarture);\n } else\n {\n redeemScript = new Script(chunk.data);\n }\n }\n\n // Create the sighash using the redeem script\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature secondSignature;\n\n // Take out the key and sign the signhash\n //ECKey key2 = createKeyFromSha256Passphrase(\"Super secret key 2\");\n ECKey key2 = ECKey.fromPrivate(new BigInteger(\"68123968917867656952640885027449260190826636504009580537802764798766700329220\"));\n// ECKey key2 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n secondSignature = key2.sign(sighash);\n\n // Add the second signature to the signature list\n TransactionSignature transactionSignarture = new TransactionSignature(secondSignature, Transaction.SigHash.ALL, false);\n signatureList.add(transactionSignarture);\n\n // Rebuild p2sh multisig input script\n inputScript = ScriptBuilder.createP2SHMultiSigInputScript(signatureList, redeemScript);\n spendTx.getInput(0).setScriptSig(inputScript);\n\n //System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "public static void main(String[] args) throws InsufficientMoneyException, PeerException, IOException, UnreadableWalletException, AddressFormatException, BlockStoreException {\n\n\t\tif (args.length != 4) {\n\t\t\tSystem.out.println(\"Usage: java SendCoins prod|test wallet amount recipient\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t// we get the following from the command line ...\n\t\t// (this is not secure - needs validation)\n\t\tString network = args[0]; // \"test\" or \"prod\"\n\t\tString walletFileName = args[1]; // wallet file name\n\t\tString amountToSend = args[2]; // milli-BTC\n\t\tString recipient = args[3]; // Bitcoin address\n\n\t\t// the Bitcoin network to use\n\t\tfinal NetworkParameters netParams;\n\t\t// check for production Bitcoin network ...\n\t\tif (network.equalsIgnoreCase(\"prod\")) {\n\t\t\tnetParams = NetworkParameters.prodNet();\n\t\t\t// ... otherwise use the testnet\n\t\t} else {\n\t\t\tnetParams = NetworkParameters.testNet();\n\t\t}\n\n\t\t// data structure for block chain storage\n\t\tBlockStore blockStore = new MemoryBlockStore(netParams);\n\t\t// declare object to store and understand block chain\n\t\tBlockChain chain;\n\t\t// declare wallet\n\t\tWallet wallet;\n\n\t\ttry {\n\t\t\t// wallet file that contains Bitcoins we can send\n\t\t\tfinal File walletFile = new File(walletFileName);\n\t\t\t// load wallet from file\n\t\t\twallet = Wallet.loadFromFile(walletFile);\n\n\t\t\t// how man milli-Bitcoins to send\n\t\t\tBigInteger btcToSend = new BigInteger(amountToSend);\n\n\t\t\t// initialize BlockChain object\n\t\t\tchain = new BlockChain(netParams, wallet, blockStore);\n\n\t\t\t// instantiate Peer object to handle connections\n\t\t\tfinal Peer peer = new Peer(netParams, new VersionMessage(netParams, 1), chain,\n\t\t\t\t\tnew PeerAddress(InetAddress.getLocalHost()));\n\n\t\t\t// connect to peer node on localhost\n\t\t\tpeer.connectionOpened();\n\n\t\t\t// recipient address provided by official Bitcoin client\n\t\t\tAddress recipientAddress = new Address(netParams, recipient);\n\n\t\t\t// tell peer to send amountToSend to recipientAddress\n\t\t\tTransaction sendTxn = wallet.sendCoins(peer, SendRequest.to(recipientAddress, btcToSend));\n\t\t\t// null means we didn't have enough Bitcoins in our wallet for the transaction\n\t\t\tif (sendTxn == null) {\n\t\t\t\tSystem.out.println(\"Cannot send requested amount of \" + Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC; wallet only contains \" + Utils.bitcoinValueToFriendlyString(wallet.getBalance())\n\t\t\t\t\t\t+ \" BTC.\");\n\t\t\t} else {\n\t\t\t\t// once communicated to the network (via our local peer),\n\t\t\t\t// the transaction will appear on Bitcoin explorer sooner or later\n\t\t\t\tSystem.out.println(Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC sent. You can monitor the transaction here:\\n\" + sendTxn.getHashAsString());\n\t\t\t}\n\t\t\t// save wallet with new transaction(s)\n\t\t\twallet.saveToFile(walletFile);\n\t\t\t// handle the various exceptions; this needs more work\n\t\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }", "@Test\n\tpublic void parseBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, block.getGeneratorSignature());\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\t\t\n\t\t//CONVERT TO BYTES\n\t\tbyte[] rawBlock = block.toBytes();\n\t\t\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlock parsedBlock = BlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//CHECK INSTANCE\n\t\t\tassertEquals(false, parsedBlock instanceof GenesisBlock);\n\t\t\t\t\t\n\t\t\t//CHECK SIGNATURE\n\t\t\tassertEquals(true, Arrays.equals(block.getSignature(), parsedBlock.getSignature()));\n\t\t\t\t\t\n\t\t\t//CHECK GENERATOR\n\t\t\tassertEquals(block.getGenerator().getAddress(), parsedBlock.getGenerator().getAddress());\t\n\t\t\t\t\t\n\t\t\t//CHECK BASE TARGET\n\t\t\tassertEquals(block.getGeneratingBalance(), parsedBlock.getGeneratingBalance());\t\n\t\t\t\n\t\t\t//CHECK FEE\n\t\t\tassertEquals(block.getTotalFee(), parsedBlock.getTotalFee());\t\n\t\t\t\t\t\n\t\t\t//CHECK REFERENCE\n\t\t\tassertEquals(true, Arrays.equals(block.getReference(), parsedBlock.getReference()));\t\n\t\t\t\t\t\n\t\t\t//CHECK TIMESTAMP\n\t\t\tassertEquals(block.getTimestamp(), parsedBlock.getTimestamp());\t\t\n\t\t\t\n\t\t\t//CHECK TRANSACTIONS COUNT\n\t\t\tassertEquals(block.getTransactionCount(), parsedBlock.getTransactionCount());\t\t\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\tfail(\"Exception while parsing transaction.\");\n\t\t}\n\t\t\t\t\n\t\t//PARSE TRANSACTION FROM WRONG BYTES\n\t\trawBlock = new byte[50];\n\t\t\n\t\ttry \n\t\t{\t\n\t\t\t//PARSE FROM BYTES\n\t\t\tBlockFactory.getInstance().parse(rawBlock);\n\t\t\t\t\t\n\t\t\t//FAIL\n\t\t\tfail(\"this should throw an exception\");\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\t//EXCEPTION IS THROWN OK\n\t\t}\t\t\t\n\t}", "@Test\n public void testRandomization() {\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLen = 32;\n int keySizeInBits = 2048;\n int samples = 8;\n Set<String> signatures = new HashSet<String>();\n Signature signer;\n PrivateKey priv;\n try {\n String algorithm = getAlgorithmName(sha, mgf);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n priv = keypair.getPrivate();\n signer = Signature.getInstance(algorithm);\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLen, 1);\n signer.setParameter(params);\n byte[] messageBytes = new byte[8];\n for (int i = 0; i < samples; i++) {\n signer.initSign(priv);\n signer.update(messageBytes);\n byte[] signature = signer.sign();\n String hex = TestUtil.bytesToHex(signature);\n assertTrue(\"Same signature computed twice\", signatures.add(hex));\n }\n } catch (GeneralSecurityException ex) {\n TestUtil.skipTest(\"Failed to generat signatures:\" + ex);\n return;\n }\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedBlobs_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedBlobs_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedStrings_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedStrings(10, 5, \"abcd\", false, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedBlobs_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testInvalidBarcodeTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(merchant); //Merchant not in database\n\t\t//database.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This barcode does not exist\",verifyParticipants);\n\t}", "@Test\n\tpublic void testValidTransaction() {\n\t\t\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\tdatabase.addCustomer(merchant);\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tString transJMSMessage = transHandle.generateTransactionJMSRequest();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\n\t\tassertEquals(\"Transaction participants are valid\",verifyParticipants);\n\t\tassertEquals(transJMSMessage,customer.getBankId()+\" \"+ merchant.getBankId()+ \" \" + amount + \" \" + \"comment\");\n\t}", "@Test\n public void SameTokenNameOpenTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedBlobs_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedBlobs(10, 16);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n public void testSign() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] result = instance.sign(data, keys);\r\n assertNotNull(result);\r\n }", "@Test\n public void spendShouldBeOK() throws Exception {\n UnsecureCompactBuilder compactBuilder = new UnsecureCompactBuilder();\n\n NonceClaim nonceClaim = new NonceClaim();\n nonceClaim.setNonce(\"nonce\");\n\n String jwt = compactBuilder.claims(nonceClaim).build().toString();\n\n NonceType nonceType = new NonceType();\n nonceType.setName(\"welcome\");\n\n Nonce nonce = new Nonce();\n nonce.setId(UUID.randomUUID());\n ResourceOwner ro = FixtureFactory.makeResourceOwner();\n nonce.setResourceOwner(ro);\n nonce.setNonceType(nonceType);\n\n when(mockHashToken.run(\"nonce\")).thenReturn(\"hashedNonce\");\n when(mockNonceRepository.getByTypeAndNonce(NonceName.WELCOME, \"hashedNonce\")).thenReturn(nonce);\n\n subject.spend(jwt, NonceName.WELCOME);\n\n verify(mockNonceRepository).setSpent(nonce.getId());\n verify(mockNonceRepository).revokeUnSpent(nonce.getNonceType().getName(), nonce.getResourceOwner().getId());\n }", "@Test\n public void testNullRandom() {\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLen = 32;\n int keySizeInBits = 2048;\n int samples = 8;\n Signature signer;\n PrivateKey priv;\n try {\n String algorithm = getAlgorithmName(sha, mgf);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n priv = keypair.getPrivate();\n signer = Signature.getInstance(algorithm);\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLen, 1);\n signer.setParameter(params);\n } catch (GeneralSecurityException ex) {\n TestUtil.skipTest(\"RSA key generation is not supported.\" + ex);\n return;\n }\n Set<String> signatures = new HashSet<String>();\n byte[] messageBytes = new byte[8];\n for (int i = 0; i < samples; i++) {\n byte[] signature;\n try {\n signer.initSign(priv, null);\n signer.update(messageBytes);\n signature = signer.sign();\n } catch (GeneralSecurityException ex) {\n fail(\"Failed to sign. \" + ex);\n return;\n }\n String hex = TestUtil.bytesToHex(signature);\n assertTrue(\"Same signature computed twice\", signatures.add(hex));\n }\n }", "@Test\n public void SameTokenNameCloseNotPreciseEnough2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 3;\n String firstTokenId = \"abc\";\n long quant = 1L;\n String secondTokenId = \"def\";\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n }\n\n quant = 11;\n actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n\n }", "@Test\n public void SameTokenNameOpenNotPreciseEnough2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 3;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n }\n\n quant = 11;\n actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_4_nondecimal() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 16, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }", "@Test\r\n\tpublic void testMultiSHA256Calls() {\n\r\n\t\tString inputStr = \"abc\";\r\n\t\tString expectedDigest = \"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad\";\r\n\r\n\t\tCircuitGenerator generator = new CircuitGenerator(\"SHA2_Test4\") {\r\n\r\n\t\t\tWire[] inputWires;\r\n\r\n\t\t\t@Override\r\n\t\t\tprotected void buildCircuit() {\r\n\t\t\t\tinputWires = createInputWireArray(inputStr.length());\r\n\t\t\t\tWire[] digest = new SHA256Gadget(inputWires, 8,\r\n\t\t\t\t\t\tinputStr.length(), false, true, \"\").getOutputWires();\r\n\t\t\t\tint numOfConstraintsBefore = getNumOfConstraints();\r\n\t\t\t\tdigest = new SHA256Gadget(inputWires, 8, inputStr.length(),\r\n\t\t\t\t\t\tfalse, true, \"\").getOutputWires();\r\n\t\t\t\tdigest = new SHA256Gadget(inputWires, 8, inputStr.length(),\r\n\t\t\t\t\t\tfalse, true, \"\").getOutputWires();\r\n\t\t\t\tdigest = new SHA256Gadget(inputWires, 8, inputStr.length(),\r\n\t\t\t\t\t\tfalse, true, \"\").getOutputWires();\r\n\t\t\t\tdigest = new SHA256Gadget(inputWires, 8, inputStr.length(),\r\n\t\t\t\t\t\tfalse, true, \"\").getOutputWires();\r\n\t\t\t\tdigest = new SHA256Gadget(inputWires, 8, inputStr.length(),\r\n\t\t\t\t\t\tfalse, true, \"\").getOutputWires();\r\n\r\n\t\t\t\t// verify that the number of constraints match\r\n\t\t\t\tassertEquals(numOfConstraintsBefore, getNumOfConstraints());\r\n\r\n\t\t\t\t// do a small change and verify that number changes\r\n\t\t\t\tWire[] in2 = Arrays.copyOf(inputWires, inputWires.length);\r\n\t\t\t\tin2[0] = in2[1];\r\n\t\t\t\tnew SHA256Gadget(in2, 8, inputStr.length(), false, true, \"\")\r\n\t\t\t\t\t\t.getOutputWires();\r\n\t\t\t\tassertTrue(numOfConstraintsBefore < getNumOfConstraints());\r\n\r\n\t\t\t\tmakeOutputArray(digest);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void generateSampleInput(CircuitEvaluator e) {\r\n\t\t\t\tfor (int i = 0; i < inputStr.length(); i++) {\r\n\t\t\t\t\te.setWireValue(inputWires[i], inputStr.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tgenerator.generateCircuit();\r\n\t\tgenerator.evalCircuit();\r\n\t\tCircuitEvaluator evaluator = generator.getCircuitEvaluator();\r\n\r\n\t\tString outDigest = \"\";\r\n\t\tfor (Wire w : generator.getOutWires()) {\r\n\t\t\toutDigest += Util.padZeros(evaluator.getWireValue(w).toString(16),\r\n\t\t\t\t\t8);\r\n\t\t}\r\n\t\tassertEquals(outDigest, expectedDigest);\r\n\t}", "@Test\n public void SameTokenNameCloseTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long quant = 1L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), 1000L);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n public void testVerify() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] sign = instance.sign(data, keys);\r\n boolean result = instance.verify(data, sign, keys);\r\n assertTrue(result);\r\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedUUIDs_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedUUIDs(10, userData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, UUID[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n public void unencryptTransactionFromEarlyVersionUsingRecipient() {\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBox(recipientBox.getData())\n .withRecipientKey(recipientKey)\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n final PrivateKey recipientPrivateKey = PrivateKey.from(\"private-key\".getBytes());\n when(keyManager.getPrivateKeyForPublicKey(recipientKey)).thenReturn(recipientPrivateKey);\n when(keyManager.getPublicKeys()).thenReturn(Set.of(senderKey, recipientKey));\n\n final SharedKey sharedKey = SharedKey.from(\"shared-key\".getBytes());\n when(nacl.computeSharedKey(senderKey, recipientPrivateKey)).thenReturn(sharedKey);\n\n final byte[] expectedOutcome = \"SUCCESS\".getBytes();\n\n when(nacl.openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey))\n .thenReturn(\"sharedOrMasterKeyBytes\".getBytes());\n when(nacl.openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class)))\n .thenReturn(expectedOutcome);\n\n final byte[] result = enclave.unencryptTransaction(payload, recipientKey);\n\n assertThat(result).isNotNull().isSameAs(expectedOutcome);\n\n verify(nacl).openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey);\n verify(nacl)\n .openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class));\n verify(nacl).computeSharedKey(senderKey, recipientPrivateKey);\n verify(keyManager).getPrivateKeyForPublicKey(recipientKey);\n verify(keyManager).getPublicKeys();\n }", "@Test\n public void SameTokenNameOpenTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = -1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void SameTokenNameOpenNotPreciseEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 9991L;\n String secondTokenId = \"456\";\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n }\n\n quant = 10001;\n actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n } catch (ContractValidateException e) {\n Assert.assertFalse(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n\n }", "private static void wxSignTest(){\n\t\t\n\t\tString sb=\"appid=wx791233ecd4e71c3f&attach=91_40090_3999&mch_id=1220845901&openid=oc9Xijt__DS0SyGDGqGnUPxSkDWQ&cash_fee=7600&fee_type=CNY\"+\n\t\t\t\t\"&time_end=20150831172810&bank_type=BOC_DEBIT&nonce_str\"+\n\t\t\t\t\"=5K8264ILTKCH16CQ2502SI8ZNMTM67VS&total_fee=7600&trade_type=JSAPI&result_code=SUCCESS&return_code=SUCCESS&is_subscribe=Y&out_trade_\"+\n\t\t\t\t\"no=2015083100400904657685188272&transaction_id=1007950222201508310755172159&key=48d15a39462fbe06f6391328ff685954\";\n\t\t\tString sign = DigestUtils.md5Hex(sb).toUpperCase();\n\t\t\tSystem.out.println(\"sign=\"+sign);\t\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedBlobs_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true);\r\n\t\t\t\t\r\n\t\t\t\tHashMap<String,Object> o2 = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t\t\r\n\t\t\t\to = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, \r\n\t\t\t\t\t\tdate, null, userData, null);\r\n\t\t\t\to2 = roc.generateSignedBlobs(10, 16, RandomOrgClient.BLOB_FORMAT_HEX, \r\n\t\t\t\t\t\tdate, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_4_decimal() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 10, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, int[][].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Suspendable\n @Override\n protected void checkTransaction(SignedTransaction stx) throws FlowException {\n }", "@Test\n public void SameTokenNameCloseNotPreciseEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long quant = 9991L;\n String secondTokenId = \"def\";\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n }\n\n quant = 10001;\n actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n } catch (ContractValidateException e) {\n Assert.assertFalse(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n\n }", "public void testPositiveGenerateSignedStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedStrings(10, 5, \"abcd\", false, userData);\r\n\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testCoinRejected() {\r\n\t\tCoin coin = new Coin(7);\r\n\t\tTheCoinSlotListener csListener = new TheCoinSlotListener();\r\n\t\tcsListener.coinRejected(vend.getCoinSlot(), coin);\r\n\t\tassertEquals(csListener.getCurrentCredit(), 0);\t\t\t\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedStrings(10, 5, \"abcd\", false);\r\n\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "@Test\n public void unencryptTransactionFromEarlyVersionUsingUnknownRecipient() {\n final PublicKey nonRecipientKey = PublicKey.from(\"unknown\".getBytes());\n\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBox(recipientBox.getData())\n .withRecipientKey(recipientKey)\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n when(keyManager.getPublicKeys()).thenReturn(Set.of(senderKey, recipientKey));\n\n final Throwable throwable =\n catchThrowable(() -> enclave.unencryptTransaction(payload, nonRecipientKey));\n\n assertThat(throwable)\n .isInstanceOf(EnclaveException.class)\n .hasMessage(\"recipient not found in listed keys\");\n\n verify(keyManager).getPublicKeys();\n }", "@Test\n public void SameTokenNameCloseTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = -1L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), 1000L);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "@Test\n\tpublic void testInvalidCustomerTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\t\n\t\t//database.addCustomer(customer); not registered\n\t\tdatabase.addCustomer(merchant);\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This barcode does not belong to any of DTUPay users\",verifyParticipants);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedUUIDs_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedUUIDs(10, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, UUID[].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tWallet xon = new Wallet(\"Xon\", 175d);\n\t\tWallet ion = new Wallet(\"Ion\", 175d);\n\t\txon.addCashToEmgFund(75d);\n\t\tion.addCashToEmgFund(75d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 2. Xon withdrew 50 from personal fund to buy something.\n\t\t// And then checks if Ion had borrowed anything from the common fund.\n\t\tSystem.out.println(\"Xon withdrew : \" + xon.withdrawCash(50d) + \" | \" + showCashInHand(xon, ion));\n\t\tSystem.out.println(\"Xon checks common fund : \" + Wallet.getEmergencyFund());\n\n\t\t// 3. Ion plans to buy something that costs 150 and checks wallet.\n\t\ttry {\n\t\t\tSystem.out.println(\"Ion tries to withdrew 150\");\n\t\t\tion.withdrawCash(150);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\t// 4. Ion realizes that only 100 is available in hand\n\t\t\t// and plans to take 100 from the emergency fund.\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tion.withdrawCashFromEmgFund(100d);\n\t\t\tSystem.out.println(\"Ion withdrew from common fund : 100\" + \" | \" + showCashInHand(xon, ion));\n\t\t\tSystem.out.println(\"Ion buys item for : \" + ion.withdrawCash(150d) + \" | \" + showCashInHand(xon, ion));\n\t\t}\n\n\t\t// 4. Ion received salary of 40 and plans to put 30 out of the borrowed 100\n\t\t// back to the emergency fund.\n\t\tSystem.out.println(\"Ion adds salary : 40\");\n\t\tion.addCash(40d);\n\t\tSystem.out.println(\"Ion adds to common fund : \" + 30);\n\t\tion.addCashToEmgFund(30d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 5. Last time Xon checked the common fund, the cash remaining in it was 150.\n\t\t// Assuming Ion had not borrowed anything from it, Xon orders a product for\n\t\t// cash on delivery which would cost 150.\n\t\ttry {\n\t\t\t// tries to withdraw 100 from fund to pay for CoD.\n\t\t\tSystem.out.println(\"Xon tries to withdrew 100 from common fund\");\n\t\t\txon.withdrawCashFromEmgFund(100d);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.out.println(\"Xon checks funds... \");\n\t\t\tSystem.out.println(showCashInHand(xon));\n\t\t\tSystem.out.println(\"Xon is unable to pay 150 due to insufficient funds\\nTHE END\");\n\t\t}\n\n\t}", "@Test\n public void unencryptTransactionFromEarlyVersionUsingSender() {\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBox(recipientBox.getData())\n .withRecipientKey(recipientKey)\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n final PrivateKey senderPrivateKey = PrivateKey.from(\"private-key\".getBytes());\n when(keyManager.getPrivateKeyForPublicKey(senderKey)).thenReturn(senderPrivateKey);\n when(keyManager.getPublicKeys()).thenReturn(Set.of(senderKey));\n\n final SharedKey sharedKey = SharedKey.from(\"shared-key\".getBytes());\n when(nacl.computeSharedKey(recipientKey, senderPrivateKey)).thenReturn(sharedKey);\n\n final byte[] expectedOutcome = \"SUCCESS\".getBytes();\n\n when(nacl.openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey))\n .thenReturn(\"sharedOrMasterKeyBytes\".getBytes());\n when(nacl.openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class)))\n .thenReturn(expectedOutcome);\n\n final byte[] result = enclave.unencryptTransaction(payload, senderKey);\n\n assertThat(result).isNotNull().isSameAs(expectedOutcome);\n\n verify(nacl).openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey);\n verify(nacl)\n .openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class));\n verify(nacl).computeSharedKey(recipientKey, senderPrivateKey);\n verify(keyManager).getPrivateKeyForPublicKey(senderKey);\n verify(keyManager).getPublicKeys();\n }", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\n public void unencryptPSVTransactionWithUnknownKey() {\n final PublicKey nonRecipientKey = PublicKey.from(\"unknown\".getBytes());\n\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"RecipientBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBox(recipientBox.getData())\n .withRecipientNonce(recipientNonce)\n .withRecipientKeys(List.of(recipientKey, senderKey))\n .withPrivacyMode(PrivacyMode.PRIVATE_STATE_VALIDATION)\n .withExecHash(\"EXEC_HASH\".getBytes())\n .build();\n\n final Throwable throwable =\n catchThrowable(() -> enclave.unencryptTransaction(payload, nonRecipientKey));\n\n assertThat(throwable)\n .isInstanceOf(EnclaveException.class)\n .hasMessage(\"recipient not found in listed keys\");\n }", "@Test\n public void unencryptTransactionWeSentUsingRecipientKey() {\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final RecipientBox senderBox = RecipientBox.from(\"senderBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBoxes(List.of(senderBox.getData(), recipientBox.getData()))\n .withRecipientKeys(List.of(senderKey, recipientKey))\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n final PrivateKey recipientPrivateKey = PrivateKey.from(\"private-key\".getBytes());\n when(keyManager.getPrivateKeyForPublicKey(recipientKey)).thenReturn(recipientPrivateKey);\n\n final SharedKey sharedKey = SharedKey.from(\"shared-key\".getBytes());\n when(nacl.computeSharedKey(senderKey, recipientPrivateKey)).thenReturn(sharedKey);\n\n final byte[] expectedOutcome = \"SUCCESS\".getBytes();\n\n when(nacl.openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey))\n .thenReturn(\"sharedOrMasterKeyBytes\".getBytes());\n when(nacl.openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class)))\n .thenReturn(expectedOutcome);\n\n final byte[] result = enclave.unencryptTransaction(payload, recipientKey);\n\n assertThat(result).isNotNull().isSameAs(expectedOutcome);\n\n verify(nacl).openAfterPrecomputation(recipientBox.getData(), recipientNonce, sharedKey);\n verify(nacl)\n .openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class));\n verify(nacl).computeSharedKey(senderKey, recipientPrivateKey);\n verify(keyManager).getPrivateKeyForPublicKey(recipientKey);\n }", "static void checkSignatures() {\n Reader stringReader;\n StringBuffer out;\n FreecellOperations<?> model = FreecellModelCreator.create(\n FreecellModelCreator.GameType.MULTIMOVE);\n\n checkNewModel(\n FreecellModelCreator.create(FreecellModelCreator.GameType\n .MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck());\n stringReader = new StringReader(\"C1 8 F1 q\");\n out = new StringBuffer();\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n\n }", "@Test\n public void testTrustPolicyDocumentWithSigNoNs() throws IOException, CertificateException, ParserConfigurationException, SAXException, MarshalException, XMLSignatureException {\n isValid(\"/documents/5/trustpolicy_1_signed.xml\",\"/documents/5/certificate.pem\");\n isValid(\"/documents/5/trustpolicy_4_edited.xml\",\"/documents/5/certificate.pem\");\n isValid(\"/documents/5/trustpolicy_5_edited.xml\",\"/documents/5/certificate.pem\");\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedInteger_6() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegers(10, 0, 10, false, 16, userData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedStrings(10, 5, \"abcd\");\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\t\t\r\n\t}", "@Test\n public void unencryptTransactionWeSentUsingSenderKey() {\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final RecipientBox senderBox = RecipientBox.from(\"senderBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBoxes(List.of(senderBox.getData(), recipientBox.getData()))\n .withRecipientKeys(List.of(senderKey, recipientKey))\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n final PrivateKey senderPrivateKey = PrivateKey.from(\"private-key\".getBytes());\n when(keyManager.getPrivateKeyForPublicKey(senderKey)).thenReturn(senderPrivateKey);\n\n final SharedKey sharedKey = SharedKey.from(\"shared-key\".getBytes());\n when(nacl.computeSharedKey(senderKey, senderPrivateKey)).thenReturn(sharedKey);\n\n final byte[] expectedOutcome = \"SUCCESS\".getBytes();\n\n when(nacl.openAfterPrecomputation(senderBox.getData(), recipientNonce, sharedKey))\n .thenReturn(\"sharedOrMasterKeyBytes\".getBytes());\n when(nacl.openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class)))\n .thenReturn(expectedOutcome);\n\n final byte[] result = enclave.unencryptTransaction(payload, senderKey);\n\n assertThat(result).isNotNull().isSameAs(expectedOutcome);\n\n verify(nacl).openAfterPrecomputation(senderBox.getData(), recipientNonce, sharedKey);\n verify(nacl)\n .openAfterPrecomputation(any(byte[].class), eq(cipherTextNonce), any(MasterKey.class));\n verify(nacl).computeSharedKey(senderKey, senderPrivateKey);\n verify(keyManager).getPrivateKeyForPublicKey(senderKey);\n }", "@Test\n public void testInvalidTransactionIdException() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify correct exception is thrown\n testInvalidValues(InvalidTransactionIdException.class, invalidTransactionIDs,\n (transactionId) -> shop.receiveCashPayment(transactionId, 10));\n }", "private void checkSignAndVerifyWithKeyManager(\n KeyTool pemManager,\n CryptoKeyPair cryptoKeyPair,\n KeyTool verifyKeyTool,\n CryptoSuite cryptoSuite) {\n for (int i = 0; i < 10; i++) {\n String message = cryptoSuite.hash(\"abcd----\" + Integer.toString(i));\n SignatureResult signature = cryptoSuite.sign(message, cryptoKeyPair);\n Assert.assertTrue(\n cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(), message, signature.convertToString()));\n\n Assert.assertTrue(\n cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(),\n Hex.decode(message),\n Hex.decode(signature.convertToString())));\n\n String invalidMessage = cryptoSuite.hash(\"abcde----\" + Integer.toString(i));\n Assert.assertTrue(\n !cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(),\n invalidMessage,\n signature.convertToString()));\n }\n for (int i = 0; i < 10; i++) {\n String message = cryptoSuite.hash(\"abcd----\" + Integer.toString(i));\n String signature = cryptoSuite.sign(pemManager, message);\n Assert.assertTrue(cryptoSuite.verify(verifyKeyTool, message, signature));\n Assert.assertTrue(\n cryptoSuite.verify(\n verifyKeyTool, Hex.decode(message), Hex.decode(signature)));\n String invalidMessage = cryptoSuite.hash(\"abcde----\" + Integer.toString(i));\n Assert.assertTrue(!cryptoSuite.verify(verifyKeyTool, invalidMessage, signature));\n }\n }", "private void generateSignature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t/*\r\n\t\t * IMPORTANT: in all other APDUs the previous APDU type gets overwritten\r\n\t\t * in process() function; this is not the case here because the\r\n\t\t * information is needed when processing to verify the security\r\n\t\t * condition for non repudiation signature\r\n\t\t * \r\n\t\t * the previous APDU type has to be overwritten in every possible exit\r\n\t\t * path out of this function; therefore we check the security conditions\r\n\t\t * of the non repudiation signature as early as possible, but we have to\r\n\t\t * overwrite the previous APDU type in the 2 possible exceptions before\r\n\t\t */\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t// check P1 and P2\t\t\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x9E || buffer[ISO7816.OFFSET_P2] != (byte) 0x9A) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t}\r\n\t\t// generate signature without prepare signature results:\r\n\t\t// \"conditions of use not satisfied\"\r\n\t\tif (getSignatureType() == NO_SIGNATURE) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t/*\r\n\t\t * verify authentication information throw\r\n\t\t * \"security condition not satisfied\" if something is wrong\r\n\t\t */\r\n\t\t// check if previous APDU did a cardholder PIN verification\r\n\t\tif ((getSignatureType() == NON_REPUDIATION) && (getPreviousApduType() != VERIFY_CARDHOLDER_PIN)) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t// overwrite previous ADPU type as soon as possible\r\n\t\tsetPreviousApduType(OTHER);\r\n\r\n\t\t// it is impossible to generate basic signatures with this command\r\n\t\tif (getSignatureType() == BASIC)\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// check if cardholder PIN was entered correctly\r\n\t\tif (!cardholderPin.isValidated())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\tswitch (signatureAlgorithm) {\r\n\t\tcase ALG_MD5_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Md5Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_SHA1_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Sha1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\t// if T=1, store signature in sigBuffer so that it can latter be sent\r\n\t\tif (APDU.getProtocol() == APDU.PROTOCOL_T1) {\r\n\t\t\tJCSystem.beginTransaction();\r\n\t\t\t//@ open valid(); // todo (???)\r\n\t\t\tUtil.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);\r\n\t\t\t////@ close valid(); // auto\r\n\t\t\tJCSystem.commitTransaction();\r\n\t\t\t\r\n\t\t\t// in case T=0 protocol, send the signature immediately in a\r\n\t\t\t// response APDU\r\n\t\t} else {\r\n\t\t\t// send first 128 bytes (= 1024 bit) of buffer\r\n\t\t\tapdu.setOutgoingAndSend((short) 0, (short) 128);\r\n\t\t}\r\n\t}", "@Test\n public void test2() {\n cashRegister.addTens(5);\n try {\n cashRegister.withdraw(0, 5);\n fail();\n } catch (InsufficientCashException e) {\n assertEquals(e.getMessage(), \"Not enough denominations\");\n }\n }", "public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}", "boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedStrings_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedStrings(10, 5, \"abcd\", false, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[].class, true);\r\n\t\t\t\t\r\n\t\t\t\tHashMap<String,Object> o2 = roc.generateSignedStrings(10, 5, \"abcd\", false, \r\n\t\t\t\t\t\tidentifier, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t\t\r\n\t\t\t\to = roc.generateSignedStrings(10, 5, \"abcd\", false, date, null, userData, null);\r\n\t\t\t\to2 = roc.generateSignedStrings(10, 5, \"abcd\", false, date, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "@Override\n public byte[] generateSignature() throws CryptoException, DataLengthException {\n if (!forSigning) {\n throw new IllegalStateException(\"CL04 Signer not initialised for signature generation.\");\n }\n\n try {\n CL04SignSecretPairingKeySerParameter sk = (CL04SignSecretPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(sk.getParameters());\n final Element alpha = pairing.getZr().newRandomElement().getImmutable();\n final Element a = sk.getG().powZn(alpha);\n final List<Element> A = sk.getZ().stream().map(a::powZn).collect(Collectors.toCollection(ArrayList::new));\n final Element b = a.powZn(sk.getY()).getImmutable();\n final List<Element> B = A.stream().map(Ai -> Ai.powZn(sk.getY())).collect(Collectors.toCollection(ArrayList::new));\n final Element xTimesY = alpha.mul(sk.getX().mul(sk.getY()));\n final Element c = a.powZn(sk.getX()).mul(commitment.powZn(xTimesY)).getImmutable();\n\n Element[] signElements = new Element[3 + 2 * messages.size()];\n signElements[0] = a;\n signElements[1] = b;\n signElements[2] = c;\n for (int i = 0; i < messages.size(); i++) {\n signElements[3 + i] = A.get(i);\n signElements[3 + messages.size() + i] = B.get(i);\n }\n return derEncode(signElements);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic Single<TransactionData> createTransactionWithSig(Wallet from, BigInteger gasPrice, BigInteger gasLimit, String data, int chainId) {\n\t\tfinal Web3j web3j = getWeb3jService(chainId);\n\t\tfinal BigInteger useGasPrice = gasPriceForNode(chainId, gasPrice);\n\n\t\tTransactionData txData = new TransactionData();\n\n\t\treturn networkRepository.getLastTransactionNonce(web3j, from.address)\n\t\t\t\t.flatMap(nonce -> getRawTransaction(nonce, useGasPrice, gasLimit, BigInteger.ZERO, data))\n\t\t\t\t.flatMap(rawTx -> signEncodeRawTransaction(rawTx, from, chainId))\n\t\t\t\t.flatMap(signedMessage -> Single.fromCallable( () -> {\n\t\t\t\t\ttxData.signature = Numeric.toHexString(signedMessage);\n\t\t\t\t\tEthSendTransaction raw = web3j\n\t\t\t\t\t\t\t.ethSendRawTransaction(Numeric.toHexString(signedMessage))\n\t\t\t\t\t\t\t.send();\n\t\t\t\t\tif (raw.hasError()) {\n\t\t\t\t\t\tthrow new Exception(raw.getError().getMessage());\n\t\t\t\t\t}\n\t\t\t\t\ttxData.txHash = raw.getTransactionHash();\n\t\t\t\t\treturn txData;\n\t\t\t\t}))\n\t\t\t\t.flatMap(tx -> storeUnconfirmedTransaction(from, tx, \"\", BigInteger.ZERO, useGasPrice, chainId, data, C.BURN_ADDRESS))\n\t\t\t\t.subscribeOn(Schedulers.io());\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_9_nondecimal() {\n\t\tint i = 1;\r\n\t\t\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, \r\n\t\t\t\t\t\tBASE, userData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IcbcApiException {\n\t\tUiIcbcClient client = new UiIcbcClient(APP_ID,IcbcConstants.SIGN_TYPE_RSA,\n\t\t\t\t\"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJCoQe/O+uqpOtyE/2CUjD7wosZw8jI1AlLNJCllOmlX+obA6h97b0JsEL0SjMCAR3xJyw7MKLqkcy5qQ/bBgw2XSrodmjzOVqfT1OXRii0xw0HiVkHR4cEWnEAAdfo0lDc4iuzCIQrnT5gM0+U+qeSV6JFfwVRjgYzBdHQRPCf1AgMBAAECgYAdQUoEe7GXH5591o/nMmOinvvscg8pRDsyD7bOgGBtyZMrCXzP3SDFKCHCeyvoColqg2oDlhpulK+OpYMVNlGQcO4eubOJp9MUc3m4A9RxkVr3dsVrmygM5czPfWHAPVQ4dECDruBJn9zoo1ci0myRTh4KSCq6SxpCE0Pbf3j7iQJBAOdMPFRfOkSQ1hsN9Mg4jd9on8r7+mF8gFPhkNI6qvEKw/prmU3obUWvZL42vRlLOQyyB92mBF24PStR/B6CjR8CQQCgGz0VoqCplurSCapGdgX3D7bNSDtMUmaLJYJxih8v+zghP0YtVgDeV3NjogVjOlz8/9Rebo0PoFcqyJnNA1RrAkEAul3dBoasZm7ldWsrXuDiv66HgoDB4Cb3J59Kl3oaHpp0CqUEI5gx48JNRE7K00SfNTGF0Pxh7Dn1X6Bxqwu6NQJADrdyPfLc4bnFi9jnleJzWepP2z6wdKt+UXv5KYaQp1BoMGYohTJKkiVnrdjOtfg/Y+IAG03+GVmbqYsW2AleUQJBANYQklohKtsmq8ptX3as6hjcuXcTpc2DSpVeOnCueNv107+dDJ+K14tbiVYzF3tkHBNMRkGtr6EuGKJ+A63sJ00=\",\n\t\t\t\tIcbcConstants.CHARSET_UTF8,IcbcConstants.ENCRYPT_TYPE_AES, \"xMh0xFsG7G80ziePFdnT8g==\");\n\t\tEaccountManageRequestV1 request = new EaccountManageRequestV1();\t\t\n\t\trequest.setServiceUrl(\"http://122.64.61.111:8081/ui/eaccount/manage/V1\");///\n\t\tEaccountManageRequestBizV1 bizContent = new EaccountManageRequestBizV1();\n\t\tbizContent.setMobileNo(\"13703878410\");//选输,手机号\n\t\tbizContent.setIdcode(\"128440810108044\");//选输,身份证号\n\t\tbizContent.setName(URLEncoder.encode(\"芡悠\"));//选输,用户姓名\n\t\tbizContent.setUserId(\"128440810108044\");//必输,需控制不能为空,用户唯一标识,送身份证号\n\t\tbizContent.setBacAddr(URLEncoder.encode(\"http://www.test.com\"));//选输,回调地址\n\t\tbizContent.setEpayflag(\"0\");//选输,工银e支付标志,0-短信、1-静态密码,集成客户端SDK的方式能送0-短信或1-静态密码,非APP方式只能送0-短信,不送默认为0-短信\n\t\t\n\t\tbizContent.setCorpAppid(APP_ID);//外公司合作方送APP_ID的值,行内应用如e支付等送外公司合作方的APPID\n\t\tlong systime = System.currentTimeMillis(); // 现时间戳\t\t\n\t\tString orderTimeStamp=new Long(systime).toString();\n\t\t\n\t\tSystem.out.println(\"orderTimeStamp:\"+orderTimeStamp);\n\t\tbizContent.setOrderTimeStamp(orderTimeStamp);//生成请求的时间,必输\n\t\t\n\t\tbizContent.setZoneno(\"00200\");//地区号号,选输,5位数字,上送值联系对接分行提供\n\t\tbizContent.setBrno(\"00260\");//网点号,选输,5位数字,上送值联系对接分行提供\n\t\t\n\t\trequest.setBizContent(bizContent);\n\t\tSystem.out.println(client.buildPostForm(request));// 实际调用时的相关返回结果及异常处理,请自行添加\n\t}", "@Test\n public void unencryptTransactionWeSentUsingUnknownKey() {\n final PublicKey nonRecipientKey = PublicKey.from(\"unknown\".getBytes());\n\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final RecipientBox senderBox = RecipientBox.from(\"senderBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBoxes(List.of(senderBox.getData(), recipientBox.getData()))\n .withRecipientKeys(List.of(senderKey, recipientKey))\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n final Throwable throwable =\n catchThrowable(() -> enclave.unencryptTransaction(payload, nonRecipientKey));\n\n assertThat(throwable)\n .isInstanceOf(EnclaveException.class)\n .hasMessage(\"recipient not found in listed keys\");\n }", "@Test\n public void testTrustPolicyDocumentWithSigNs() throws IOException, CertificateException, ParserConfigurationException, SAXException, MarshalException, XMLSignatureException {\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(10, \"C8n,m\", \" eTradeOnly=\", \"!9*gr;byuqSC\", (-2426), \"&\\\"_\", \"!9*gr;byuqSC\", \" It does not support what-if orders.\", \"^U9C<$uGb$Q tziPd&\", \"C8n,m\", vector0, \"!9*gr;byuqSC\", true, \" It does not support what-if orders.\", \"!9*gr;byuqSC\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \" open=\", \" eTradeOnly=\", 0.0, \"Connection Closed\", \"!9*gr;byuqSC\", 10, \"!9*gr;byuqSC\", \"!9*gr;byuqSC\", \"dF/\", \"GSzPQYd\", (String) null, \"dF/\", \"!9*gr;byuqSC\", \"C8n,m\");\n String string0 = EWrapperMsgGenerator.scannerData(10, (-2426), contractDetails0, (String) null, \" notHeld=\", \" notHeld=\", \"V.LddQp\");\n assertEquals(\"id = 10 rank=-2426 symbol=C8n,m secType= eTradeOnly= expiry=!9*gr;byuqSC strike=-2426.0 right=&\\\"_ exchange= It does not support what-if orders. currency=^U9C<$uGb$Q tziPd& localSymbol=C8n,m marketName= open= tradingClass= eTradeOnly= distance=null benchmark= notHeld= projection= notHeld= legsStr=V.LddQp\", string0);\n }", "private static void allRandomTest()\r\n{\r\n\tpriv \t= hexStringToByteArray\t(\"111112222233333444445555566666777778888899999aaaaabbbbbcccccdddd\");\t // Priv.Key\r\n\tpub[0] \t= new BigInteger\t(\"CAD5E868FC3437CB26423166631D6DA9185991D37252AA6A5C898956BF288AA2\",16); // Pub.Key x\r\n\tpub[1] \t= new BigInteger\t(\"E5866FE1B7A9E0DB979F48A118B987148E97C50F76F585FAFD2D2A791164C74F\",16); // Pub.Key y\r\n\tfor(int i = 0; i<testRuns; i++) \r\n\t{\t\r\n\t\tRandom k = new Random();\r\n\t\trand = (new BigInteger(256, k)).toByteArray();\t\t\r\n\t\tRandom h = new Random();\r\n\t\thash = (new BigInteger(256, h)).toByteArray();\r\n\t\thash = Secp256k1.to_fixLength(hash,32);\r\n\t\tif(bouncastleSigTest() == false) break;\r\n\t\tif(maxwell_sigTest() == false) break;\r\n\t}\r\n\tVergleichsTest();\r\n\tsecp256k1_speed_Test(); // 3,0ms\r\n}", "public void applyTransaction(Transaction tx, byte[] coinbase) {\n\t\tif (blockchain != null)\n\t\t\tblockchain.addWalletTransaction(tx);\n\n\t\t// TODO: what is going on with simple wallet transfer ?\n\n\t\t// 1. VALIDATE THE NONCE\n\t\tbyte[] senderAddress = tx.getSender();\n\n\t\tAccountState senderAccount = repository.getAccountState(senderAddress);\n\n\t\tif (senderAccount == null) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"No such address: {}\",\n\t\t\t\t\t\tHex.toHexString(senderAddress));\n\t\t\treturn;\n\t\t}\n\n\t\tBigInteger nonce = repository.getNonce(senderAddress);\n\t\tif (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"Invalid nonce account.nonce={} tx.nonce={}\",\n\t\t\t\t\t\tnonce.longValue(), new BigInteger(tx.getNonce()));\n\t\t\treturn;\n\t\t}\n\n\t\t// 2.1 PERFORM THE GAS VALUE TX\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\n\t\t// first of all debit the gas from the issuer\n\t\tBigInteger gasDebit = tx.getTotalGasValueDebit();\n\n\t\t// The coinbase get the gas cost\n\t\trepository.addBalance(coinbase, gasDebit);\n\n\t\tbyte[] contractAddress;\n\n\t\t// Contract creation or existing Contract call\n\t\tif (tx.isContractCreation()) {\n\n\t\t\t// credit the receiver\n\t\t\tcontractAddress = tx.getContractAddress();\n\t\t\trepository.createAccount(contractAddress);\n\t\t\tstateLogger.info(\"New contract created address={}\",\n\t\t\t\t\tHex.toHexString(contractAddress));\n\t\t} else {\n\n\t\t\tcontractAddress = tx.getReceiveAddress();\n\t\t\tAccountState receiverState = repository.getAccountState(tx\n\t\t\t\t\t.getReceiveAddress());\n\n\t\t\tif (receiverState == null) {\n\t\t\t\trepository.createAccount(tx.getReceiveAddress());\n\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\tstateLogger.info(\"New account created address={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\t\t\t}\n\t\t}\n\n\t\t// 2.2 UPDATE THE NONCE\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\t\tBigInteger balance = repository.getBalance(senderAddress);\n\t\tif (balance.compareTo(BigInteger.ZERO) == 1) {\n\t\t\trepository.increaseNonce(senderAddress);\n\n\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\tstateLogger.info(\n\t\t\t\t\t\t\"Before contract execution the sender address debit with gas total cost, \"\n\t\t\t\t\t\t\t\t+ \"\\n sender={} \\n gas_debit= {}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()), gasDebit);\n\t\t}\n\n\t\t// actual gas value debit from the sender\n\t\t// the purchase gas will be available for the\n\t\t// contract in the execution state, and\n\t\t// can be validate using GAS op\n\t\tif (gasDebit.signum() == 1) {\n\t\t\tif (balance.compareTo(gasDebit) == -1) {\n\t\t\t\tlogger.info(\"No gas to start the execution: sender={}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trepository.addBalance(senderAddress, gasDebit.negate());\n\t\t}\n\n\t\t// 3. START TRACKING FOR REVERT CHANGES OPTION !!!\n\t\tRepository trackRepository = repository.getTrack();\n\t\ttrackRepository.startTracking();\n\n\t\ttry {\n\n\t\t\t// 4. THE SIMPLE VALUE/BALANCE CHANGE\n\t\t\tif (tx.getValue() != null) {\n\n\t\t\t\tBigInteger senderBalance = repository.getBalance(senderAddress);\n\t\t\t\tBigInteger contractBalance = repository.getBalance(contractAddress);\n\n\t\t\t\tif (senderBalance.compareTo(new BigInteger(1, tx.getValue())) >= 0) {\n\n\t\t\t\t\trepository.addBalance(contractAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()));\n\t\t\t\t\trepository.addBalance(senderAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()).negate());\n\n\t\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\t\tstateLogger.info(\"Update value balance \\n \"\n\t\t\t\t\t\t\t\t+ \"sender={}, receiver={}, value={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(senderAddress),\n\t\t\t\t\t\t\t\tHex.toHexString(contractAddress),\n\t\t\t\t\t\t\t\tnew BigInteger(tx.getValue()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. FIND OUT WHAT IS THE TRANSACTION TYPE\n\t\t\tif (tx.isContractCreation()) {\n\n\t\t\t\tbyte[] initCode = tx.getData();\n\n\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\tlogger.info(\"running the init for contract: addres={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getContractAddress()));\n\n\t\t\t\tVM vm = new VM();\n\t\t\t\tProgram program = new Program(initCode, programInvoke);\n\t\t\t\tvm.play(program);\n\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\tsenderAddress, tx.getContractAddress(), coinbase);\n\n\t\t\t} else {\n\n\t\t\t\tbyte[] programCode = trackRepository.getCode(tx\n\t\t\t\t\t\t.getReceiveAddress());\n\t\t\t\tif (programCode != null) {\n\n\t\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\t\tlogger.info(\"calling for existing contract: addres={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\n\t\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\t\tVM vm = new VM();\n\t\t\t\t\tProgram program = new Program(programCode, programInvoke);\n\t\t\t\t\tvm.play(program);\n\n\t\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\t\tsenderAddress, tx.getReceiveAddress(), coinbase);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\ttrackRepository.rollback();\n\t\t\treturn;\n\t\t}\n\t\ttrackRepository.commit();\n\t\tpendingTransactions.put(Hex.toHexString(tx.getHash()), tx);\n\t}", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateSignedDecimalFractions_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedDecimalFractions(10, 5, false, \r\n\t\t\t\t\t\tuserData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@NoPresubmitTest(\n providers = {ProviderType.BOUNCY_CASTLE},\n bugs = {\"b/253038666\"})\n @Test\n public void testSignVerifyWithParameters() {\n int keySizeInBits = 2048;\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLength = 20;\n KeyPair keypair;\n try {\n RSAKeyGenParameterSpec params =\n getPssAlgorithmParameters(keySizeInBits, sha, mgf, sha, saltLength);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSASSA-PSS\");\n keyGen.initialize(params);\n keypair = keyGen.genKeyPair();\n } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException ex) {\n TestUtil.skipTest(\"Key generation for RSASSA-PSS is not supported.\");\n return;\n }\n byte[] msg = new byte[4];\n RSAPublicKey pub = (RSAPublicKey) keypair.getPublic();\n RSAPrivateKey priv = (RSAPrivateKey) keypair.getPrivate();\n Signature signer;\n Signature verifier;\n try {\n signer = Signature.getInstance(\"RSASSA-PSS\");\n verifier = Signature.getInstance(\"RSASSA-PSS\");\n } catch (NoSuchAlgorithmException ex) {\n fail(\"RSASSA-PSS key generation is supported, but signature generation is not\");\n return;\n }\n // Signs the message. This part of the code constructs the PSS parameters\n // explicitely.\n try {\n signer.initSign(priv);\n } catch (InvalidKeyException ex) {\n fail(\"Provider rejects its own private key\");\n return;\n }\n try {\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLength, 1);\n signer.setParameter(params);\n } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException ex) {\n fail(\"Parameters accepted as key generation parameters are rejected as algorithm parameters\");\n return;\n }\n byte[] signature;\n try {\n signer.update(msg);\n signature = signer.sign();\n } catch (SignatureException ex) {\n fail(\"Could not sign with RSAPSS-PSS:\" + ex.toString());\n return;\n }\n\n // Verifies the signature. This part of the code tries to copy the PSS parameters\n // from the public key. Ideally, just calling verifier.initVerify(pub) would\n // be sufficient, since the public key contains the parameters. Unfortunately,\n // copying the PSS parameters is necessary for OpenJDK, since OpenJDK does\n // not copy the algorithm parameters.\n // Even worse is BouncyCastle, where it is unclear if there is a simple way\n // to extract the algorithm parameters from the key.\n try {\n verifier.initVerify(pub);\n } catch (InvalidKeyException ex) {\n fail(\"Provider rejects its own public key\");\n return;\n }\n \n try {\n verifier.setParameter(pub.getParams());\n verifier.update(msg);\n boolean verified = verifier.verify(signature);\n assertTrue(\"Signature did not verify\", verified);\n } catch (GeneralSecurityException ex) {\n throw new AssertionError(\"Provider could not verify its own signature\", ex);\n }\n }", "public static void checkTransactionBasics(Transaction tx, boolean must_be_coinbase)\n throws ValidationException\n {\n try(TimeRecordAuto tra_blk = TimeRecord.openAuto(\"Validation.checkTransactionBasics\"))\n {\n if (tx.toByteString().size() > Globals.MAX_TX_SIZE)\n {\n throw new ValidationException(\"Transaction too big\");\n }\n validateChainHash(tx.getTxHash(), \"tx_hash\");\n\n\n TransactionInner inner = null;\n\n try\n {\n CodedInputStream code_in = CodedInputStream.newInstance(tx.getInnerData().toByteArray());\n\n inner = TransactionInner.parseFrom(code_in);\n\n if (!code_in.isAtEnd())\n {\n throw new ValidationException(\"Extra data at end of tx inner\");\n }\n }\n catch(java.io.IOException e)\n {\n throw new ValidationException(e);\n }\n\n MessageDigest md = DigestUtil.getMD();\n MessageDigest md_addr = DigestUtil.getMDAddressSpec();\n md.update(tx.getInnerData().toByteArray());\n\n ChainHash found_hash = new ChainHash(md.digest());\n\n if (!found_hash.equals(tx.getTxHash()))\n {\n throw new ValidationException(\"TX hash mismatch\");\n }\n \n if (inner.getVersion() != 1)\n {\n throw new ValidationException(String.format(\"Unknown transaction version: %d\", inner.getVersion()));\n }\n\n if (must_be_coinbase)\n {\n if (!inner.getIsCoinbase())\n {\n throw new ValidationException(\"must be coinbase\");\n }\n if (inner.getInputsCount() > 0)\n {\n throw new ValidationException(\"coinbase must have zero inputs\");\n }\n if (inner.getCoinbaseExtras().getRemarks().size() > Globals.COINBASE_REMARKS_MAX)\n {\n throw new ValidationException(String.format(\"Coinbase remarks of %d over max of %d\", \n inner.getCoinbaseExtras().getRemarks().size(),\n Globals.COINBASE_REMARKS_MAX));\n }\n if (tx.getSignaturesCount() != 0)\n {\n throw new ValidationException(\"coinbase shouldn't have signatures\");\n }\n if (inner.getFee() != 0)\n {\n throw new ValidationException(\"coinbase shouldn't have fee\");\n }\n }\n else\n {\n if (inner.getIsCoinbase())\n {\n throw new ValidationException(\"unexpected coinbase\");\n }\n if (inner.getInputsCount() == 0)\n {\n throw new ValidationException(\"only coinbase can have zero inputs\");\n }\n CoinbaseExtras extras = inner.getCoinbaseExtras();\n CoinbaseExtras blank = CoinbaseExtras.newBuilder().build();\n if (!extras.equals(blank))\n {\n throw new ValidationException(\"only coinbase can have extras\");\n }\n }\n\n if (inner.getOutputsCount() == 0)\n {\n throw new ValidationException(\"Transaction with no outputs makes no sense\");\n }\n if (inner.getOutputsCount() >= Globals.MAX_OUTPUTS)\n {\n throw new ValidationException(\"Too many outputs\");\n }\n\n validateNonNegValue(inner.getFee(), \"fee\");\n\n HashSet<AddressSpecHash> used_address_spec_hashes = new HashSet<>();\n for(TransactionInput in : inner.getInputsList())\n {\n validateNonNegValue(in.getSrcTxOutIdx(), \"input outpoint idx\");\n if (in.getSrcTxOutIdx() >= Globals.MAX_OUTPUTS)\n {\n throw new ValidationException(\"referencing impossible output idx\");\n }\n validateAddressSpecHash(in.getSpecHash(), \"input spec hash\");\n validateChainHash(in.getSrcTxId(), \"input transaction id\");\n\n used_address_spec_hashes.add(new AddressSpecHash(in.getSpecHash()));\n }\n if (used_address_spec_hashes.size() != inner.getClaimsCount())\n {\n throw new ValidationException(String.format(\"Mismatch of used spec hashes (%d) and claims (%d)\", \n used_address_spec_hashes.size(),\n inner.getClaimsCount()));\n }\n\n HashSet<AddressSpecHash> remaining_specs = new HashSet<>();\n remaining_specs.addAll(used_address_spec_hashes);\n\n for(AddressSpec spec : inner.getClaimsList())\n {\n AddressSpecHash spechash = AddressUtil.getHashForSpec(spec, md_addr);\n if (!remaining_specs.contains(spechash))\n {\n throw new ValidationException(String.format(\"claim for unused spec hash %s\", spechash.toString()));\n }\n remaining_specs.remove(spechash);\n\n }\n Assert.assertEquals(0, remaining_specs.size());\n\n //Now we know the address spec list we have covers all inputs. Now we have to make sure the signatures match up.\n\n // Maps claim idx -> set(key idx) of signed public keys\n // such that signed_claim_map.get(i).size() can be used to see if there are enough\n // signed keys for claim 'i'.\n TreeMap<Integer, Set<Integer> > signed_claim_map = new TreeMap<>();\n\n for(SignatureEntry se : tx.getSignaturesList())\n {\n if (inner.getClaimsCount() <= se.getClaimIdx()) throw new ValidationException(\"Signature entry for non-existant claim\");\n AddressSpec spec = inner.getClaims(se.getClaimIdx());\n\n if (spec.getSigSpecsCount() <= se.getKeyIdx()) throw new ValidationException(\"Signature entry for non-existant sig spec\");\n SigSpec sig_spec = spec.getSigSpecs(se.getKeyIdx());\n\n if (!SignatureUtil.checkSignature( sig_spec, tx.getTxHash(), se.getSignature()))\n {\n throw new ValidationException(\"signature failed\");\n }\n //So we have a valid signature on a valid claim! woot\n\n if (!signed_claim_map.containsKey(se.getClaimIdx())) signed_claim_map.put(se.getClaimIdx(), new TreeSet<Integer>());\n\n Set<Integer> set = signed_claim_map.get(se.getClaimIdx());\n if (set.contains(se.getKeyIdx())) throw new ValidationException(\"duplicate signatures for claim\");\n\n set.add(se.getKeyIdx());\n }\n\n // Make sure each claim is satisfied\n for(int claim_idx = 0; claim_idx < inner.getClaimsCount(); claim_idx++)\n {\n int found =0;\n if (signed_claim_map.containsKey(claim_idx)) found = signed_claim_map.get(claim_idx).size();\n AddressSpec claim = inner.getClaims(claim_idx);\n\n if (found < claim.getRequiredSigners())\n {\n throw new ValidationException(\n String.format(\"Claim %d only has %d of %d needed signatures\", \n claim_idx, found, claim.getRequiredSigners()));\n }\n }\n\n //Sanity check outputs\n for(TransactionOutput out : inner.getOutputsList())\n {\n validatePositiveValue(out.getValue(), \"output value\");\n validateAddressSpecHash(out.getRecipientSpecHash(), \"output spec hash\");\n }\n\n if (inner.getExtra().size() > Globals.MAX_TX_EXTRA)\n {\n throw new ValidationException(\"Extra string too long\");\n }\n }\n\n }", "@Test\n public void testProcessCheckoutIllegalToolCode() {\n String toolCode = \"Not A Tool Code\";\n int rentalDays = 3;\n int discountPercentage = 10;\n LocalDate checkoutDate = LocalDate.of(2015, Month.SEPTEMBER, 3);\n String expectedMessage = \"Illegal tool code. LADW, CHNS, JAKR and JAKD are the valid tool codes, please enter a valid tool code.\";\n\n String message = \"\";\n try {\n RentalAgreement result = checkout.processCheckout(toolCode, rentalDays, discountPercentage, checkoutDate);\n } catch (Exception e) {\n message = e.getMessage();\n }\n\n assertEquals(expectedMessage, message);\n }", "private void validateFermatPacketSignature(FermatPacket fermatPacketReceive){\n\n System.out.println(\" WsCommunicationVPNClient - validateFermatPacketSignature\");\n\n /*\n * Validate the signature\n */\n boolean isValid = AsymmectricCryptography.verifyMessageSignature(fermatPacketReceive.getSignature(), fermatPacketReceive.getMessageContent(), vpnServerIdentity);\n\n System.out.println(\" WsCommunicationVPNClient - isValid = \" + isValid);\n\n /*\n * if not valid signature\n */\n if (!isValid){\n throw new RuntimeException(\"Fermat Packet received has not a valid signature, go to close this connection maybe is compromise\");\n }\n\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedUUIDs_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedUUIDs(10, identifier, null, userData, null);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, UUID[].class, true);\r\n\t\t\t\t\r\n\t\t\t\tHashMap<String,Object> o2 = roc.generateSignedUUIDs(10, identifier, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t\t\r\n\t\t\t\to = roc.generateSignedUUIDs(10, date, null, userData, null);\r\n\t\t\t\to2 = roc.generateSignedUUIDs(10, date, null, userData, null);\r\n\t\t\t\tcollector.checkThat(o.get(\"data\"), equalTo(o2.get(\"data\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "public void testDoubleX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder.setUserInfo(\"16c73ab6-b892-458f-abf5-2f875f74882e\", \"security\");\n // builder.setUserInfo(\"john\", \"keypass\");\n builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER); \n Document doc = unsignedEnvelope.getAsDocument();\n \n WSSecHeader secHeader = new WSSecHeader();\n secHeader.insertSecurityHeader(doc);\n\n Document signedDoc = builder.build(doc, crypto, secHeader);\n Document signedDoc1 = builder.build(signedDoc, crypto, secHeader);\n verify(signedDoc1);\n }", "@Test\n public void SameTokenNameOpenExchangeBalanceIsNotEnough2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 2;\n String firstTokenId = \"_\";\n long firstTokenQuant = 1000_000_000001L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedInteger_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString ticketId = roc.createTickets(1, true)[0].get(\"ticketId\").getAsString();\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegers(10, 0, 10, false, 10, userData, ticketId);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, int[].class, true, ticketId);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void unencryptTransactionFromOtherNodeUsingWrongKey() {\n final PublicKey nonRecipientKey = PublicKey.from(\"unknown\".getBytes());\n\n final PublicKey senderKey = PublicKey.from(\"senderKey\".getBytes());\n final PublicKey recipientKey = PublicKey.from(\"recipientKey\".getBytes());\n final byte[] cipherText = \"cipherText\".getBytes();\n final Nonce cipherTextNonce = mock(Nonce.class);\n final RecipientBox recipientBox = RecipientBox.from(\"recipientBox\".getBytes());\n final Nonce recipientNonce = mock(Nonce.class);\n\n final EncodedPayload payload =\n EncodedPayload.Builder.create()\n .withSenderKey(senderKey)\n .withCipherText(cipherText)\n .withCipherTextNonce(cipherTextNonce)\n .withRecipientBox(recipientBox.getData())\n .withRecipientKey(recipientKey)\n .withRecipientNonce(recipientNonce)\n .withPrivacyMode(PrivacyMode.STANDARD_PRIVATE)\n .build();\n\n when(keyManager.getPublicKeys()).thenReturn(Set.of(recipientKey));\n\n final Throwable throwable =\n catchThrowable(() -> enclave.unencryptTransaction(payload, nonRecipientKey));\n\n assertThat(throwable)\n .isInstanceOf(EnclaveException.class)\n .hasMessage(\"recipient not found in listed keys\");\n\n verify(keyManager).getPublicKeys();\n }" ]
[ "0.8214013", "0.7764443", "0.7527805", "0.7420536", "0.73695755", "0.71999747", "0.7148125", "0.70826924", "0.70412064", "0.6991595", "0.6953969", "0.6926663", "0.68739545", "0.64330894", "0.6248677", "0.6204799", "0.61746883", "0.61279976", "0.609465", "0.6044858", "0.60217994", "0.600127", "0.5993312", "0.59208477", "0.590305", "0.58916104", "0.5879688", "0.5863237", "0.58354455", "0.58347183", "0.5817421", "0.5808355", "0.5787417", "0.5786744", "0.57460684", "0.57439196", "0.571258", "0.57099", "0.57096475", "0.568879", "0.5684877", "0.56842667", "0.5660041", "0.5637464", "0.563128", "0.56222266", "0.5618075", "0.56166273", "0.56057006", "0.5605384", "0.56046474", "0.56025654", "0.55975455", "0.55963165", "0.5573037", "0.5562811", "0.55609435", "0.55351573", "0.5531594", "0.5527672", "0.55237687", "0.55142176", "0.5500967", "0.54890996", "0.5483903", "0.54800105", "0.54552394", "0.54519355", "0.54509103", "0.5448037", "0.54465204", "0.5441914", "0.5433423", "0.5429765", "0.54219925", "0.541474", "0.5401455", "0.5397096", "0.53940254", "0.53933907", "0.53894544", "0.53886116", "0.5387948", "0.53810525", "0.5379804", "0.5378482", "0.5373674", "0.5369779", "0.5365895", "0.535796", "0.53554916", "0.5340425", "0.5339308", "0.5336499", "0.5330981", "0.53299606", "0.5325627", "0.5325474", "0.53146124", "0.5304727" ]
0.75743836
2
test case 5: Test the input not exist in the UtxoPool tx0: Scrooge > Scrooge 25coins [Create Coins] tx1: Scrooge > Alice 20coins [Pay Coins NOT added to UTXO pool due to accidents] tx2: Alice > Bob 15coins [Pay Coins Previous Tx NOT in UTXO pool]
@Test public void TxHandlerTestFifth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException { // generate key pairs, simulate initial tx from scrooge to alice System.out.println("-----------------------------------------------------------------"); System.out.println("Test if the TxHandler can reject the input not in the UtxoPool"); KeyPair pkScrooge = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkAlice = KeyPairGenerator.getInstance("RSA").generateKeyPair(); KeyPair pkBob = KeyPairGenerator.getInstance("RSA").generateKeyPair(); Transaction tx0 = new Transaction(); tx0.addOutput(25, pkScrooge.getPublic()); byte[] initHash = null; tx0.addInput(initHash, 0); tx0.signTx(pkScrooge.getPrivate(), 0); UTXOPool utxoPool = new UTXOPool(); UTXO utxo = new UTXO(tx0.getHash(), 0); utxoPool.addUTXO(utxo, tx0.getOutput(0)); //tx1: Scrooge --> Alice 20coins [Pay Coins *NOT added to UTXO pool* due to accidents] Transaction tx1 = new Transaction(); tx1.addInput(tx0.getHash(), 0); tx1.addOutput(20, pkAlice.getPublic()); tx1.signTx(pkScrooge.getPrivate(), 0); utxo = new UTXO(tx1.getHash(),0); TxHandler txHandler = new TxHandler(utxoPool); System.out.println("txHandler.isValidTx(tx1) returns: " + txHandler.isValidTx(tx1)); assertTrue("tx1:no valid transaction", txHandler.handleTxs(new Transaction[]{tx1}).length == 1); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); utxoPool.removeUTXO(utxo); assertTrue("tx1:UTXO has been removed.", utxoPool.getAllUTXO().size() == 0); // tx2: Alice --> Bob 15coins [Pay Coins *Previous Tx NOT in UTXO pool*] Transaction tx2 = new Transaction(); tx2.addInput(tx1.getHash(), 0); tx2.addOutput(15, pkBob.getPublic()); tx2.signTx(pkAlice.getPrivate(), 0); System.out.println("txHandler.isValidTx(tx2) returns: " + txHandler.isValidTx(tx2)); assertTrue("tx2:no valid transaction", txHandler.handleTxs(new Transaction[]{tx2}).length == 0); // update utxo pool utxoPool = txHandler.getHandledUtxoPool(); assertTrue("tx2:no UTXO's created.", utxoPool.getAllUTXO().size() == 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }", "@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "@Test\n public void TxHandlerTestSecond() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject the double spending\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(25, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1: one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx 2:Scrooge --> Bob 20coins [*Double-spending*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx0.getHash(), 0);\n tx2.addOutput(25, pkBob.getPublic());\n tx2.signTx(pkScrooge.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:no valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:no UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n\n }", "@Test\n public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid signature\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx1: scrooge to alice 20 coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: alice to bob 20coins[signed by bob]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(20, pkBob.getPublic());\n tx2.signTx(pkBob.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n }", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test(expected=NoCoinsException.class)\n\tpublic void testNoCoin() throws Exception {\n\t\td.dispense(0, 10);\n\t}", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "public static void main(String[] args) throws InsufficientMoneyException, PeerException, IOException, UnreadableWalletException, AddressFormatException, BlockStoreException {\n\n\t\tif (args.length != 4) {\n\t\t\tSystem.out.println(\"Usage: java SendCoins prod|test wallet amount recipient\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t// we get the following from the command line ...\n\t\t// (this is not secure - needs validation)\n\t\tString network = args[0]; // \"test\" or \"prod\"\n\t\tString walletFileName = args[1]; // wallet file name\n\t\tString amountToSend = args[2]; // milli-BTC\n\t\tString recipient = args[3]; // Bitcoin address\n\n\t\t// the Bitcoin network to use\n\t\tfinal NetworkParameters netParams;\n\t\t// check for production Bitcoin network ...\n\t\tif (network.equalsIgnoreCase(\"prod\")) {\n\t\t\tnetParams = NetworkParameters.prodNet();\n\t\t\t// ... otherwise use the testnet\n\t\t} else {\n\t\t\tnetParams = NetworkParameters.testNet();\n\t\t}\n\n\t\t// data structure for block chain storage\n\t\tBlockStore blockStore = new MemoryBlockStore(netParams);\n\t\t// declare object to store and understand block chain\n\t\tBlockChain chain;\n\t\t// declare wallet\n\t\tWallet wallet;\n\n\t\ttry {\n\t\t\t// wallet file that contains Bitcoins we can send\n\t\t\tfinal File walletFile = new File(walletFileName);\n\t\t\t// load wallet from file\n\t\t\twallet = Wallet.loadFromFile(walletFile);\n\n\t\t\t// how man milli-Bitcoins to send\n\t\t\tBigInteger btcToSend = new BigInteger(amountToSend);\n\n\t\t\t// initialize BlockChain object\n\t\t\tchain = new BlockChain(netParams, wallet, blockStore);\n\n\t\t\t// instantiate Peer object to handle connections\n\t\t\tfinal Peer peer = new Peer(netParams, new VersionMessage(netParams, 1), chain,\n\t\t\t\t\tnew PeerAddress(InetAddress.getLocalHost()));\n\n\t\t\t// connect to peer node on localhost\n\t\t\tpeer.connectionOpened();\n\n\t\t\t// recipient address provided by official Bitcoin client\n\t\t\tAddress recipientAddress = new Address(netParams, recipient);\n\n\t\t\t// tell peer to send amountToSend to recipientAddress\n\t\t\tTransaction sendTxn = wallet.sendCoins(peer, SendRequest.to(recipientAddress, btcToSend));\n\t\t\t// null means we didn't have enough Bitcoins in our wallet for the transaction\n\t\t\tif (sendTxn == null) {\n\t\t\t\tSystem.out.println(\"Cannot send requested amount of \" + Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC; wallet only contains \" + Utils.bitcoinValueToFriendlyString(wallet.getBalance())\n\t\t\t\t\t\t+ \" BTC.\");\n\t\t\t} else {\n\t\t\t\t// once communicated to the network (via our local peer),\n\t\t\t\t// the transaction will appear on Bitcoin explorer sooner or later\n\t\t\t\tSystem.out.println(Utils.bitcoinValueToFriendlyString(btcToSend)\n\t\t\t\t\t\t+ \" BTC sent. You can monitor the transaction here:\\n\" + sendTxn.getHashAsString());\n\t\t\t}\n\t\t\t// save wallet with new transaction(s)\n\t\t\twallet.saveToFile(walletFile);\n\t\t\t// handle the various exceptions; this needs more work\n\t\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static long deepTransactionCheck(Transaction tx, UtxoUpdateBuffer utxo_buffer, BlockHeader block_header, NetworkParams params)\n throws ValidationException\n {\n try(TimeRecordAuto tra_blk = TimeRecord.openAuto(\"Validation.deepTransactionCheck\"))\n {\n TransactionInner inner = null;\n\n try\n {\n inner = TransactionInner.parseFrom(tx.getInnerData());\n }\n catch(java.io.IOException e)\n {\n throw new ValidationException(\"error parsing tx on second pass somehow\", e);\n }\n\n long sum_of_inputs = 0L;\n // Make sure all inputs exist\n for(TransactionInput in : inner.getInputsList())\n {\n TransactionOutput matching_out = utxo_buffer.getOutputMatching(in);\n if (matching_out == null)\n {\n throw new ValidationException(String.format(\"No matching output for input %s\", new ChainHash(in.getSrcTxId())));\n }\n validateSpendable(matching_out, block_header, params);\n sum_of_inputs += matching_out.getValue();\n\n // SIP-4 check\n if (block_header.getBlockHeight() >= params.getActivationHeightTxInValue())\n {\n if (in.getValue() != 0L)\n {\n if (in.getValue() != matching_out.getValue())\n {\n throw new ValidationException(String.format(\"Input value does not match: %d %d\", matching_out.getValue(), in.getValue()));\n }\n }\n }\n utxo_buffer.useOutput(matching_out, new ChainHash(in.getSrcTxId()), in.getSrcTxOutIdx());\n }\n\n long spent = 0L;\n // Sum up all outputs\n int out_idx =0;\n ArrayList<ByteString> raw_output_list = TransactionUtil.extractWireFormatTxOut(tx);\n\n for(TransactionOutput out : inner.getOutputsList())\n {\n validateTransactionOutput(out, block_header, params);\n spent+=out.getValue();\n utxo_buffer.addOutput(raw_output_list, out, new ChainHash(tx.getTxHash()), out_idx);\n out_idx++;\n\n }\n\n spent+=inner.getFee();\n\n if (!inner.getIsCoinbase())\n {\n if (sum_of_inputs != spent)\n {\n throw new ValidationException(String.format(\"Transaction took in %d and spent %d\", sum_of_inputs, spent));\n }\n }\n \n return inner.getFee();\n }\n }", "@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public static void main(String[] args) {\n\t\tWallet xon = new Wallet(\"Xon\", 175d);\n\t\tWallet ion = new Wallet(\"Ion\", 175d);\n\t\txon.addCashToEmgFund(75d);\n\t\tion.addCashToEmgFund(75d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 2. Xon withdrew 50 from personal fund to buy something.\n\t\t// And then checks if Ion had borrowed anything from the common fund.\n\t\tSystem.out.println(\"Xon withdrew : \" + xon.withdrawCash(50d) + \" | \" + showCashInHand(xon, ion));\n\t\tSystem.out.println(\"Xon checks common fund : \" + Wallet.getEmergencyFund());\n\n\t\t// 3. Ion plans to buy something that costs 150 and checks wallet.\n\t\ttry {\n\t\t\tSystem.out.println(\"Ion tries to withdrew 150\");\n\t\t\tion.withdrawCash(150);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\t// 4. Ion realizes that only 100 is available in hand\n\t\t\t// and plans to take 100 from the emergency fund.\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tion.withdrawCashFromEmgFund(100d);\n\t\t\tSystem.out.println(\"Ion withdrew from common fund : 100\" + \" | \" + showCashInHand(xon, ion));\n\t\t\tSystem.out.println(\"Ion buys item for : \" + ion.withdrawCash(150d) + \" | \" + showCashInHand(xon, ion));\n\t\t}\n\n\t\t// 4. Ion received salary of 40 and plans to put 30 out of the borrowed 100\n\t\t// back to the emergency fund.\n\t\tSystem.out.println(\"Ion adds salary : 40\");\n\t\tion.addCash(40d);\n\t\tSystem.out.println(\"Ion adds to common fund : \" + 30);\n\t\tion.addCashToEmgFund(30d);\n\n\t\tSystem.out.println(showCashInHand(xon, ion));\n\n\t\t// 5. Last time Xon checked the common fund, the cash remaining in it was 150.\n\t\t// Assuming Ion had not borrowed anything from it, Xon orders a product for\n\t\t// cash on delivery which would cost 150.\n\t\ttry {\n\t\t\t// tries to withdraw 100 from fund to pay for CoD.\n\t\t\tSystem.out.println(\"Xon tries to withdrew 100 from common fund\");\n\t\t\txon.withdrawCashFromEmgFund(100d);\n\t\t} catch (InsufficientFundsException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.out.println(\"Xon checks funds... \");\n\t\t\tSystem.out.println(showCashInHand(xon));\n\t\t\tSystem.out.println(\"Xon is unable to pay 150 due to insufficient funds\\nTHE END\");\n\t\t}\n\n\t}", "public void updateUTXOPool(Transaction tx) {\n ArrayList<Transaction.Input> inputs = tx.getInputs();\n for (Transaction.Input input : inputs) {\n UTXO utxo = new UTXO(input.prevTxHash, input.outputIndex);\n U.removeUTXO(utxo);\n }\n ArrayList<Transaction.Output> outputs = tx.getOutputs();\n int numOutputs = outputs.size();\n for (int i = 0; i < numOutputs; i++) {\n Transaction.Output output = outputs.get(i);\n UTXO utxo = new UTXO(tx.getHash(), i);\n U.addUTXO(utxo, output);\n }\n }", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "@Test\n public void testIdDoesNotExist() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // generate ID not assigned to any transaction in the shop\n int nonExistentId = generateId(shop.getCreditsAndDebits(null, null).stream()\n .map(BalanceOperation::getBalanceId)\n .collect(Collectors.toList()));\n\n // if ID does not exist -1 is returned\n assertEquals(-1, shop.receiveCashPayment(nonExistentId, 10), 0.001);\n }", "@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }", "@Test\n public void testTooManyInput(){\n //set up\n CurrencyRates test = new CurrencyRates();\n\n //add sample user input\n InputStream in = new ByteArrayInputStream(\"ABC123 BCD234 WER456 FDG435\".getBytes());\n System.setIn(in);\n\n //test if system exits when user input is incorrect\n assertNull(test.takeInput());\n\n return;\n }", "public void completeTx(SendRequest req) throws InsufficientMoneyException {\n try {\n checkArgument(!req.completed, \"Given SendRequest has already been completed.\");\n // Calculate the amount of value we need to import.\n Coin value = Coin.ZERO;\n for (TransactionOutput output : req.tx.getOutputs()) {\n value = value.add(output.getValue());\n }\n\n log.info(\"Completing send tx with {} outputs totalling {} and a fee of {}/kB\", req.tx.getOutputs().size(),\n value.toFriendlyString(), req.feePerKb.toFriendlyString());\n\n // If any inputs have already been added, we don't need to get their value from wallet\n Coin totalInput = Coin.ZERO;\n for (TransactionInput input : req.tx.getInputs())\n if (input.getConnectedOutput() != null)\n totalInput = totalInput.add(input.getConnectedOutput().getValue());\n else\n log.warn(\"SendRequest transaction already has inputs but we don't know how much they are worth - they will be added to fee.\");\n value = value.subtract(totalInput);\n\n List<TransactionInput> originalInputs = new ArrayList<TransactionInput>(req.tx.getInputs());\n\n // Check for dusty sends and the OP_RETURN limit.\n if (req.ensureMinRequiredFee && !req.emptyWallet) { // Min fee checking is handled later for emptyWallet.\n int opReturnCount = 0;\n for (TransactionOutput output : req.tx.getOutputs()) {\n if (output.isDust())\n throw new DustySendRequested();\n if (output.getScriptPubKey().isOpReturn())\n ++opReturnCount;\n }\n if (opReturnCount > 1) // Only 1 OP_RETURN per transaction allowed.\n throw new MultipleOpReturnRequested();\n }\n\n // Calculate a list of ALL potential candidates for spending and then ask a coin selector to provide us\n // with the actual outputs that'll be used to gather the required amount of value. In this way, users\n // can customize coin selection policies. The call below will ignore immature coinbases and outputs\n // we don't have the keys for.\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, req.missingSigsMode == MissingSigsMode.THROW);\n\n CoinSelection bestCoinSelection;\n TransactionOutput bestChangeOutput = null;\n List<Coin> updatedOutputValues = null;\n if (!req.emptyWallet) {\n // This can throw InsufficientMoneyException.\n FeeCalculation feeCalculation = calculateFee(req, value, originalInputs, req.ensureMinRequiredFee, candidates);\n bestCoinSelection = feeCalculation.bestCoinSelection;\n bestChangeOutput = feeCalculation.bestChangeOutput;\n updatedOutputValues = feeCalculation.updatedOutputValues;\n } else {\n // We're being asked to empty the wallet. What this means is ensuring \"tx\" has only a single output\n // of the total value we can currently spend as determined by the selector, and then subtracting the fee.\n checkState(req.tx.getOutputs().size() == 1, \"Empty wallet TX must have a single output only.\");\n CoinSelector selector = req.coinSelector == null ? coinSelector : req.coinSelector;\n bestCoinSelection = selector.select(params.getMaxMoney(), candidates);\n candidates = null; // Selector took ownership and might have changed candidates. Don't access again.\n req.tx.getOutput(0).setValue(bestCoinSelection.valueGathered);\n log.info(\" emptying {}\", bestCoinSelection.valueGathered.toFriendlyString());\n }\n\n for (TransactionOutput output : bestCoinSelection.gathered)\n req.tx.addInput(output);\n\n if (req.emptyWallet) {\n final Coin feePerKb = req.feePerKb == null ? Coin.ZERO : req.feePerKb;\n if (!adjustOutputDownwardsForFee(req.tx, bestCoinSelection, feePerKb, req.ensureMinRequiredFee))\n throw new CouldNotAdjustDownwards();\n }\n\n if (updatedOutputValues != null) {\n for (int i = 0; i < updatedOutputValues.size(); i++) {\n req.tx.getOutput(i).setValue(updatedOutputValues.get(i));\n }\n }\n\n if (bestChangeOutput != null) {\n req.tx.addOutput(bestChangeOutput);\n log.info(\" with {} change\", bestChangeOutput.getValue().toFriendlyString());\n }\n\n // Now shuffle the outputs to obfuscate which is the change.\n if (req.shuffleOutputs)\n req.tx.shuffleOutputs();\n\n // Now sign the inputs, thus proving that we are entitled to redeem the connected outputs.\n if (req.signInputs)\n signTransaction(req);\n\n // Check size.\n final int size = req.tx.unsafeUlordSerialize().length;\n if (size > UldTransaction.MAX_STANDARD_TX_SIZE)\n throw new ExceededMaxTransactionSize();\n\n // Label the transaction as being a user requested payment. This can be used to render GUI wallet\n // transaction lists more appropriately, especially when the wallet starts to generate transactions itself\n // for internal purposes.\n req.tx.setPurpose(UldTransaction.Purpose.USER_PAYMENT);\n // Record the exchange rate that was valid when the transaction was completed.\n req.tx.setMemo(req.memo);\n req.completed = true;\n log.info(\" completed: {}\", req.tx);\n } finally {\n }\n }", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "public static void main(String[] args) {\n\tScanner input = new Scanner(System.in);\n\tSystem.out.println(\"What is your balance?\");\n\t\n\tint balance = input.nextInt();\n\t\n\t//500\n\tint count=0; \n\t\n\twhile(balance>0) {\n\t\tSystem.out.println(\"What is your transaction?\");\n\t\t\n\t\tint transaction = input.nextInt(); //100\n\t\t\n\t\tif (balance<transaction) {\n\t\tSystem.out.println(\"You dont have enough balance to make this transaction.\");\n\t}else {\n\t\tbalance-=transaction;\n\t\tcount++;\n\t\tSystem.out.println(\"Your new balance: \"+balance);\n\t}\n\t}\n\tSystem.out.println(\"You are out balance now.\\n You made \"+count+\" transactions.\");\n\t}", "public void requestCoinsFromChat(Player player, Trade t) {\n TradeMain.getIns().getChatRequests().requestChatInformation(player, \"INSERT_COIN_AMOUND\")\n .thenAccept((message) -> {\n int coins;\n\n try {\n\n coins = Integer.parseInt(message);\n\n } catch (NumberFormatException ex) {\n\n MainData.getIns().getMessageManager().getMessage(\"COINS_MUST_BE_NUMBER\")\n .sendTo(player);\n\n requestCoinsFromChat(player, t);\n\n return;\n }\n\n PlayerData pD = MainData.getIns().getPlayerManager().getPlayer(player.getUniqueId());\n\n MainData.getIns().getServerCurrencyHandler().removeCurrency(pD, coins)\n .thenAccept((result) -> {\n\n if (result) {\n\n t.setCoins(player.getUniqueId(), coins);\n\n Inventory tradeInventory = t.getPlayerInv(pD.getPlayerID());\n\n player.openInventory(tradeInventory);\n\n } else {\n\n MainData.getIns().getMessageManager().getMessage(\"NOT_ENOUGH_COINS\")\n .format(\"%coins%\", coins)\n .sendTo(pD);\n\n requestCoinsFromChat(player, t);\n }\n });\n });\n }", "@Test\r\n\tpublic void testCoinRejected() {\r\n\t\tCoin coin = new Coin(7);\r\n\t\tTheCoinSlotListener csListener = new TheCoinSlotListener();\r\n\t\tcsListener.coinRejected(vend.getCoinSlot(), coin);\r\n\t\tassertEquals(csListener.getCurrentCredit(), 0);\t\t\t\r\n\t}", "private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }", "private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] coins=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tcoins[i]=sc.nextInt();\n\t\tArrays.sort(coins);\n\t\tint sum=sc.nextInt();\n\t\tint temp=mincoins(coins,n,sum);\n\t\tSystem.out.println(temp!=0?temp:\"Not Possible\");\n\t\tsc.close();\n\t}", "@Test\n public void SameTokenNameOpenTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }", "@Test\n\tpublic void testInvalidCustomerTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\t\n\t\t//database.addCustomer(customer); not registered\n\t\tdatabase.addCustomer(merchant);\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This barcode does not belong to any of DTUPay users\",verifyParticipants);\n\t}", "public void removeBitcoins(double amount) throws NotEnoughBitcoinsException{\r\n if (amount < 0) throw new IllegalArgumentException(\"Amount may not be less than 0\");\r\n \r\n\r\n if (!this.CheckCostToBuildOrUpgrade(amount)) throw new NotEnoughBitcoinsException(\"You do not have enough Bitcoins to build this module.\");\r\n\r\n if (amount > this.getBitcoins())\r\n {\r\n throw new NotEnoughBitcoinsException (\"Not enough bitcoins\");\r\n } \r\n\r\n \r\n this.bitcoins -= amount;\r\n }", "@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }", "@Test\n public void TestUserEntersEnoughForChipsTenderisZero()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n //coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse deposited = vendingController.Post(request);\n\n VendingRequest secondrequest = new VendingRequest();\n secondrequest.IsEmpty= false;\n secondrequest.Selection = new Chips().type();\n\n VendingResponse result = vendingController.Post(secondrequest);\n\n assertThat(result.TenderValue, Is.is(0));\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "@Test\n public void coinsC() throws EmptyListE {\n Coin quarter = new Coin(25);\n Coin dime = new Coin(10);\n Coin nickel = new Coin(5);\n Coin penny = new Coin(1);\n List<Coin> coins =\n new Node<>(quarter,\n new Node<>(dime, new Node<>(nickel, new Node<>(penny, new Empty<>()))));\n assertEquals(1, DP.coinChange(coins, 3));\n assertEquals(2, DP.coinChange(coins, 6));\n assertEquals(242, DP.coinChange(coins, 100));\n assertEquals(1, DP.bucoinChange(coins, 3));\n assertEquals(2, DP.bucoinChange(coins, 6));\n assertEquals(242, DP.bucoinChange(coins, 100));\n }", "private void validt() {\n\t\t// -\n\t\tnmfkpinds.setPgmInd99(false);\n\t\tstateVariable.setZmsage(blanks(78));\n\t\tfor (int idxCntdo = 1; idxCntdo <= 1; idxCntdo++) {\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00005 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0003\", \"XWABCD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - If addition, pull the price from file:\n\t\t\tif (nmfkpinds.funKey06()) {\n\t\t\t\tstateVariable.setXwpric(stateVariable.getXwanpr());\n\t\t\t}\n\t\t\t// -\n\t\t\tstoreMaster.retrieve(stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00006 Store not found on Store_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0369\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstockBalances.retrieve(stateVariable.getXwabcd(), stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00007 Store not found on Stock_Balances or CONDET.Contract_Qty >\n\t\t\t// BR Onhand_Quantity\n\t\t\tif (nmfkpinds.pgmInd99() || (stateVariable.getXwa5qt() > stateVariable.getXwbhqt())) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0370\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Transaction Type:\n\t\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00008 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0371\", \"XWRICD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Unit of measure:\n\t\t\t// BR00009 U_M = 'EAC'\n\t\t\tif (equal(\"EAC\", stateVariable.getXwa2cd())) {\n\t\t\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0372\", \"XWA2CD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void SameTokenNameOpenExchangeBalanceIsNotEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100_000_001L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void test2() {\n cashRegister.addTens(5);\n try {\n cashRegister.withdraw(0, 5);\n fail();\n } catch (InsufficientCashException e) {\n assertEquals(e.getMessage(), \"Not enough denominations\");\n }\n }", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "@Test\n public void test5() throws InsufficientCashException {\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n map1.put(1000, 0);\n map1.put(500, 10);\n map1.put(100, 1);\n map1.put(25, 0);\n map1.put(10, 0);\n map1.put(5, 0);\n map1.put(1, 99);\n try {\n assertEquals(map1, cashRegister.withdraw(50, 100));\n } catch (InsufficientCashException e) {\n fail();\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"Invalid arguments\");\n }\n }", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "@Test\n public void SameTokenNameOpenNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n\tpublic void testInventoryNotEnoughCoffee() {\n\t\tcoffeeMaker.addRecipe(recipe6);\n\t\tassertEquals(1000, coffeeMaker.makeCoffee(0, 1000));\n\t}", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}", "public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }", "@Test\n public void transactionSum() {\n final Transaction transaction1 = new Transaction(\"774cedda\", State.CANCELED, 1000L, new Date());\n final Account account1 = new Account(\"1001\", 0L, Collections.singletonList(transaction1));\n final Transaction transaction2 = new Transaction(\"337868a7\", State.FINISHED, 8000L, new Date());\n final Transaction transaction3 = new Transaction(\"f8047f86\", State.CANCELED, 10000L, new Date());\n final Account account2 = new Account(\"1002\", 8000L, Arrays.asList(transaction2, transaction3));\n\n final long actual = calcSumOfCancelledTransOnNonEmptyAccounts(Arrays.asList(account1, account2));\n\n Assert.assertEquals(actual, 10_000L);\n }", "public void collectAndVerifyTarget() {\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n Scanner sc = new Scanner(System.in);\n int tCount = sc.nextInt();\n for (int i = 0; i < tCount; i++) {\n System.out.println(\"Enter the value of target \");\n double d = sc.nextDouble();\n double aTarget = 0;\n for (int j = 0; j < tranCount; j++) {\n aTarget = aTarget + transactions[j];\n if (aTarget >= d) {\n System.out.println(\"Target achieved after \" + (j + 1) + \" transactions \\n\");\n break;\n }\n }\n if (aTarget < d) {\n System.out.println(\"Given target is not achieved\");\n }\n }\n }", "@Test\n public void SameTokenNameOpenExchangeBalanceIsNotEnough2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 2;\n String firstTokenId = \"_\";\n long firstTokenQuant = 1000_000_000001L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n void shouldNotSeeNonExistingNode() throws Exception\n {\n try ( KernelTransaction tx = beginTransaction() )\n {\n assertFalse( tx.dataRead().nodeExists( 1337L ) );\n }\n }", "@Test\n\tpublic void test04_RefuseARequest(){\n\t\tinfo(\"Test 04: Refuse a request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t//createRequestsConnections();\n\t\t/*Step Number: 1\n\t\t *Step Name: Refuse a request\n\t\t *Step Description: \n\t\t\t- Login as mary\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of Jack(demo)\n\t\t\t- Click on Refuse icon\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- Invitations of root, james are displayed on Invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- The invitation of jack fades out and is permanently removed from the list\n\t\t\t- Requests of James is moved to the top of the gadget*/\n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"Sign in with john account\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tUtils.pause(2000);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_REFUSE_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n void bankListIsAccountExistToTransfer_accountExistWithSufficientMoneyToTransfer_success() {\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n BankList bankList = new BankList(storage);\n Ui uiTest = new Ui();\n Bank newSavingAccount = new Saving(\"Test Saving Account\", 1000, 2000);\n Bank newInvestmentAccount = new Investment(\"Test Investment Account\", 1000);\n String expectedReturnType = \"investment\";\n\n try {\n bankList.bankListAddBank(newSavingAccount, uiTest);\n bankList.bankListAddBank(newInvestmentAccount, uiTest);\n outContent.reset();\n String returnType = bankList.getTransferBankType(\"Test Investment Account\",\n 500);\n assertEquals(expectedReturnType, returnType);\n\n\n } catch (BankException error) {\n System.out.println(\"Expected no throw, but error thrown\");\n }\n\n assertEquals(2, bankList.getBankListSize());\n\n }", "public boolean checkNewTrans(JsonObject block){\n \tJsonArray transactions = block.get(\"Transactions\").getAsJsonArray();\n \tint N = transactions.size();\n \tfor (int i=0; i<N; i++) {\n \t\tJsonObject Tx = transactions.get(i).getAsJsonObject();\n \t\tif (TxPool_used.contains(Tx))\n \t\t\treturn false;\n }\n return true;\n }", "@Test\n\t//getting errors recognizing labooncoin so i used 'one'\n\tpublic void testHappyBlockPrint()\n\t{\n\t\tLaboonCoin one = new LaboonCoin();\n\t\tone.blockchain.add(\"All your base\");\n\t\tone.blockchain.add(\"are belong\");\n\t\tone.blockchain.add(\"to us\");\n\t\tassertEquals(\"All your base\" + '\\n' + \"are belong\" + '\\n' + \"to us\" + '\\n', one.getBlockChain());\n\t}", "@Test\n public void SameTokenNameCloseNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "public Transaction[] handleTxs(Transaction[] possibleTxs) {\n // IMPLEMENT THIS\n if(possibleTxs == null)\n return new Transaction[0];\n \n ArrayList<Transaction> validTxs = new ArrayList<>();\n \n //iterate through each transaction, validate, remove spent UTXO, add new UTXO\n for(int i = 0; i < possibleTxs.length; i++){\n \n //validate tx\n if(isValidTx(possibleTxs[i])){\n possibleTxs[i].finalize();\n validTxs.add(possibleTxs[i]);\n \n //remove valid/spent UTXOs from current pool\n for(Transaction.Input x:possibleTxs[i].getInputs()){\n UTXO inputUTXO = new UTXO(x.prevTxHash, x.outputIndex);\n currentPool.removeUTXO(inputUTXO);\n }\n \n //add new UTXOs to current pool\n int utxoIndex = 0;\n for(Transaction.Output x:possibleTxs[i].getOutputs()){\n UTXO outputUTXO = new UTXO(possibleTxs[i].getHash(), utxoIndex);\n currentPool.addUTXO(outputUTXO, x);\n utxoIndex++;\n }\n \n }\n }\n \n //return list of validated \n Transaction[] validatedTxs = new Transaction[validTxs.size()];\n \n validatedTxs = validTxs.toArray(validatedTxs);\n \n return validatedTxs;\n }", "@Test\r\n\tpublic void testNoPersonMarkup() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 0, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"107.10\"));\r\n\t}", "@Test\n public void SameTokenNameOpenTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = -1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void SameTokenNameCloseExchangeBalanceIsNotEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100_000_001L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void SameTokenNameCloseTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long quant = 1L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), 1000L);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n\tpublic void testInput1() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"1299.99\"), 3, \"food\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"1591.58\"));\r\n\t}", "@Test(expected=InsufficientCreditException.class)\n\tpublic void testNotEnoughtCredit() throws Exception {\n\t\tfor (int i = 49; i >= -1000; i--) {\n\t\t\td.dispense(i, 13);\n\t\t}\n\t}", "public void applyTransaction(Transaction tx, byte[] coinbase) {\n\t\tif (blockchain != null)\n\t\t\tblockchain.addWalletTransaction(tx);\n\n\t\t// TODO: what is going on with simple wallet transfer ?\n\n\t\t// 1. VALIDATE THE NONCE\n\t\tbyte[] senderAddress = tx.getSender();\n\n\t\tAccountState senderAccount = repository.getAccountState(senderAddress);\n\n\t\tif (senderAccount == null) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"No such address: {}\",\n\t\t\t\t\t\tHex.toHexString(senderAddress));\n\t\t\treturn;\n\t\t}\n\n\t\tBigInteger nonce = repository.getNonce(senderAddress);\n\t\tif (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"Invalid nonce account.nonce={} tx.nonce={}\",\n\t\t\t\t\t\tnonce.longValue(), new BigInteger(tx.getNonce()));\n\t\t\treturn;\n\t\t}\n\n\t\t// 2.1 PERFORM THE GAS VALUE TX\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\n\t\t// first of all debit the gas from the issuer\n\t\tBigInteger gasDebit = tx.getTotalGasValueDebit();\n\n\t\t// The coinbase get the gas cost\n\t\trepository.addBalance(coinbase, gasDebit);\n\n\t\tbyte[] contractAddress;\n\n\t\t// Contract creation or existing Contract call\n\t\tif (tx.isContractCreation()) {\n\n\t\t\t// credit the receiver\n\t\t\tcontractAddress = tx.getContractAddress();\n\t\t\trepository.createAccount(contractAddress);\n\t\t\tstateLogger.info(\"New contract created address={}\",\n\t\t\t\t\tHex.toHexString(contractAddress));\n\t\t} else {\n\n\t\t\tcontractAddress = tx.getReceiveAddress();\n\t\t\tAccountState receiverState = repository.getAccountState(tx\n\t\t\t\t\t.getReceiveAddress());\n\n\t\t\tif (receiverState == null) {\n\t\t\t\trepository.createAccount(tx.getReceiveAddress());\n\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\tstateLogger.info(\"New account created address={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\t\t\t}\n\t\t}\n\n\t\t// 2.2 UPDATE THE NONCE\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\t\tBigInteger balance = repository.getBalance(senderAddress);\n\t\tif (balance.compareTo(BigInteger.ZERO) == 1) {\n\t\t\trepository.increaseNonce(senderAddress);\n\n\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\tstateLogger.info(\n\t\t\t\t\t\t\"Before contract execution the sender address debit with gas total cost, \"\n\t\t\t\t\t\t\t\t+ \"\\n sender={} \\n gas_debit= {}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()), gasDebit);\n\t\t}\n\n\t\t// actual gas value debit from the sender\n\t\t// the purchase gas will be available for the\n\t\t// contract in the execution state, and\n\t\t// can be validate using GAS op\n\t\tif (gasDebit.signum() == 1) {\n\t\t\tif (balance.compareTo(gasDebit) == -1) {\n\t\t\t\tlogger.info(\"No gas to start the execution: sender={}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trepository.addBalance(senderAddress, gasDebit.negate());\n\t\t}\n\n\t\t// 3. START TRACKING FOR REVERT CHANGES OPTION !!!\n\t\tRepository trackRepository = repository.getTrack();\n\t\ttrackRepository.startTracking();\n\n\t\ttry {\n\n\t\t\t// 4. THE SIMPLE VALUE/BALANCE CHANGE\n\t\t\tif (tx.getValue() != null) {\n\n\t\t\t\tBigInteger senderBalance = repository.getBalance(senderAddress);\n\t\t\t\tBigInteger contractBalance = repository.getBalance(contractAddress);\n\n\t\t\t\tif (senderBalance.compareTo(new BigInteger(1, tx.getValue())) >= 0) {\n\n\t\t\t\t\trepository.addBalance(contractAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()));\n\t\t\t\t\trepository.addBalance(senderAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()).negate());\n\n\t\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\t\tstateLogger.info(\"Update value balance \\n \"\n\t\t\t\t\t\t\t\t+ \"sender={}, receiver={}, value={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(senderAddress),\n\t\t\t\t\t\t\t\tHex.toHexString(contractAddress),\n\t\t\t\t\t\t\t\tnew BigInteger(tx.getValue()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. FIND OUT WHAT IS THE TRANSACTION TYPE\n\t\t\tif (tx.isContractCreation()) {\n\n\t\t\t\tbyte[] initCode = tx.getData();\n\n\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\tlogger.info(\"running the init for contract: addres={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getContractAddress()));\n\n\t\t\t\tVM vm = new VM();\n\t\t\t\tProgram program = new Program(initCode, programInvoke);\n\t\t\t\tvm.play(program);\n\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\tsenderAddress, tx.getContractAddress(), coinbase);\n\n\t\t\t} else {\n\n\t\t\t\tbyte[] programCode = trackRepository.getCode(tx\n\t\t\t\t\t\t.getReceiveAddress());\n\t\t\t\tif (programCode != null) {\n\n\t\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\t\tlogger.info(\"calling for existing contract: addres={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\n\t\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\t\tVM vm = new VM();\n\t\t\t\t\tProgram program = new Program(programCode, programInvoke);\n\t\t\t\t\tvm.play(program);\n\n\t\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\t\tsenderAddress, tx.getReceiveAddress(), coinbase);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\ttrackRepository.rollback();\n\t\t\treturn;\n\t\t}\n\t\ttrackRepository.commit();\n\t\tpendingTransactions.put(Hex.toHexString(tx.getHash()), tx);\n\t}", "@Override\n public List<PooledTransaction> removeTxsWithNonceLessThan(Map<AionAddress, BigInteger> accNonce) {\n\n List<ByteArrayWrapper> bwList = new ArrayList<>();\n for (Map.Entry<AionAddress, BigInteger> en1 : accNonce.entrySet()) {\n AccountState as = this.getAccView(en1.getKey());\n lock.writeLock().lock();\n Iterator<Map.Entry<BigInteger, AbstractMap.SimpleEntry<ByteArrayWrapper, BigInteger>>>\n it = as.getMap().entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<BigInteger, AbstractMap.SimpleEntry<ByteArrayWrapper, BigInteger>> en =\n it.next();\n if (en1.getValue().compareTo(en.getKey()) > 0) {\n bwList.add(en.getValue().getKey());\n it.remove();\n } else {\n break;\n }\n }\n lock.writeLock().unlock();\n\n Set<BigInteger> fee = Collections.synchronizedSet(new HashSet<>());\n if (this.getPoolStateView(en1.getKey()) != null) {\n this.getPoolStateView(en1.getKey())\n .parallelStream()\n .forEach(ps -> fee.add(ps.getFee()));\n }\n\n fee.parallelStream()\n .forEach(\n bi -> {\n if (this.getFeeView().get(bi) != null) {\n this.getFeeView()\n .get(bi)\n .entrySet()\n .removeIf(\n byteArrayWrapperTxDependListEntry ->\n byteArrayWrapperTxDependListEntry\n .getValue()\n .getAddress()\n .equals(en1.getKey()));\n\n if (this.getFeeView().get(bi).isEmpty()) {\n this.getFeeView().remove(bi);\n }\n }\n });\n\n as.setDirty();\n }\n\n List<PooledTransaction> removedTxl = Collections.synchronizedList(new ArrayList<>());\n bwList.parallelStream()\n .forEach(\n bw -> {\n if (this.getMainMap().get(bw) != null) {\n PooledTransaction pooledTx = this.getMainMap().get(bw).getTx();\n removedTxl.add(pooledTx);\n\n long timestamp = pooledTx.tx.getTimeStampBI().longValue() / multiplyM;\n synchronized (this.getTimeView().get(timestamp)) {\n if (this.getTimeView().get(timestamp) == null) {\n LOG.error(\n \"Txpool.remove can't find the timestamp in the map [{}]\",\n pooledTx.toString());\n return;\n }\n\n this.getTimeView().get(timestamp).remove(bw);\n if (this.getTimeView().get(timestamp).isEmpty()) {\n this.getTimeView().remove(timestamp);\n }\n }\n\n lock.writeLock().lock();\n this.getMainMap().remove(bw);\n lock.writeLock().unlock();\n }\n });\n\n this.updateAccPoolState();\n this.updateFeeMap();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"TxPoolA0.remove {} TX\", removedTxl.size());\n }\n\n return removedTxl;\n }", "private int takeCoinInput() {\n\t\tSystem.out.println(\"Enter a denomination\");\n\n\t\tString denomination = scan.next();\n\t\twhile (!denomination.matches(\"\\\\d+\")) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\tdenomination = scan.next();\n\t\t}\n\n\t\tint coin = Integer.valueOf(denomination);\n\n\t\treturn coin;\n\t}", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "public static void main(String[] args) throws Exception{\n\n\t\tLogo.printLogo();\n\t\tSystem.out.print(\"GUMBOCOIN version: 0-0-0 made by Carson\");\n//\t\tfor(int i = 0;i<5;i++){\n//\t\t\tThread.sleep(100);\n//\t\t\tSystem.out.print(\".\");\n//\t\t}\n\t\tSystem.out.println(\"\\nstarting!\\n\\n\");\n\t\t\n//\t\t\n//\t\tnew ClientConsole(\"public key\").prifatHelp();\n//\t\t\n//\t\tSystem.exit(0);\n\t\t\n\t\tboolean server = false;\n\t\t\n\t\t\n\t\tString publicKey1 = \"key--publicKey1\";\n\t\tString privateKey1 = \"key--privateKey1\";\n\t\tString publicKey2 = \"key--publicKey2\";\n\t\tString privateKey2 = \"key--privateKey2\";\n\t\t\n\t\t\n\t\t\n\t\tif(server) {\n\t\t\tBlockChainManager manager = new BlockChainManager();\n\t\t\tnew Server(manager).start(1111);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tConversation.summitUser(new UserPayload(publicKey1,privateKey1));\n\t\t\n\t\t\n//\t\tUserPayload user1 = new UserPayload(publicKey1, privateKey1);\n//\t\tUserPayload user2 = new UserPayload(publicKey2, privateKey2);\n//\t\t\n//\t\tConversation.summitUser(user1);\n\t\t\n//\t\t\n//\t\tTransaction t = new Transaction(BlockClient.hashKeys(publicKey1, privateKey1),publicKey1,publicKey2);\n//\t\tt.sign(privateKey1);\n//\t\tt.setAmount(10);\n\t\t\n//\t\tmanager.addTransaction(t);\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\tfor(int i = 0;i<5;i++) {\n//\t\t\tThread.sleep(1000);\n//\t\t\tSystem.out.println(\"\\n\\n\\nstarting loop\");\n//\t\t\tDataPayload data = Conversation.getDataPayload();\n//\t\t\tSystem.out.println(\"=========\\\\/data from server:\" + ObjectToJson.dataPayloadToString(data));\n//\t\t\tdata.blockchain.printChainHashes();\n//\t\t\tSystem.out.println(\"received data\");\n//\t\t\tBlockChain chain;\n//\t\t\tchain = data.blockchain.copy();\n//\t\t\tSystem.out.println(\"========hashing data\");\n//\t\t\tchain.hashAllBlocks();\n//\t\t\tSystem.out.println(\"========mining\");\n//\t\t\tchain.mine(data);\n//\t\t\tSystem.out.println(\"=========\\\\/total chain:\" + ObjectToJson.dataPayloadToString(new DataPayload(chain,new BlockChainDataContainer())));//just to print the chain\n//\t\t\tchain.printChainHashes();\n//\t\t\tSystem.out.println(Conversation.requestSync(new SyncPayload(chain, (i%2 == 0 ? publicKey1 : publicKey2))));\n//\t\t}\n//\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\tfor(int i = 0;i<5;i++) {\n\t\t\tThread.sleep(1000);\n\t\t\tSystem.out.println(\"\\n\\n\\nstarting loop\");\n\t\t\tDataPayload data = Conversation.getDataPayload();\n\t\t\tSystem.out.println(\"=========\\\\/data from server:\" + ObjectToJson.dataPayloadToString(data));\n\t\t\tdata.blockchain.printChainHashes();\n\t\t\tSystem.out.println(\"received data\");\n\t\t\tBlockChain chain;\n\t\t\tchain = data.blockchain.copy();\n\t\t\tSystem.out.println(\"========hashing data\");\n\t\t\tchain.hashAllBlocks();\n\t\t\tSystem.out.println(\"========mining\");\n\t\t\tchain.mine(data);\n\t\t\tSystem.out.println(\"=========\\\\/total chain:\" + ObjectToJson.dataPayloadToString(new DataPayload(chain,new BlockChainDataContainer())));//just to print the chain\n\t\t\tchain.printChainHashes();\n\t\t\tSystem.out.println(Conversation.requestSync(new SyncPayload(chain, (i%2 == 0 ? publicKey1 : publicKey2))));\n\t\t}\n}", "@Test\r\n public void testPurChaseBeverageWithNotEnoughInventory() {\r\n coffeeMaker.addRecipe(recipe2); // add mocha which use 20 chocolate while we only have 15 chocolate\r\n assertEquals(75, coffeeMaker.makeCoffee(0, 75)); // not enough recipe\r\n }", "@Test(expected = TransactionException.class)\n \tpublic void testApplyTo_UserNonExistent() throws DataFormatException, TransactionException{\n \t\tVector<Account> TestAccounts = new Vector<Account>();\n \t\tVector<Ticket> TestTickets = new Vector<Ticket>();\n \n \t\tSystem.out.println(\"DeleteTest 11: Test the applyTo() method, test the delete transaction to delete a specified user account when the username and account do not exist (not found) in the accounts vector\");\n \t\tDelete test = new Delete(\"newuser SS 000500.00\");\n \t\t//TestAccounts will be empty, thus 'newuser' does not exist\n \t\ttest.applyTo(TestAccounts, TestTickets);\n \t}", "@Test\n public void SameTokenNameOpenAccountIsNotCreator() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_SECOND);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), firstTokenQuant, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_SECOND, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[a0548794500882809695a8a687866e76d4271a1abc]\"\n + \" is not creator\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void preDefine_TestC()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"No such Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"Important\");\n\n Assert.assertEquals(false,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void TestUserEntersCoinsSeesValueReturnedwithEject()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse result = vendingController.Post(request);\n assertThat(result.TenderValue, Is.is(25));\n\n }", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "@Test\n void test008_addValidUsers() {\n // adding new user (check that allUsers has increased).\n\n // (Adding same user name but to different networks shouldnt throw any\n // exception.\n\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n\n Set<User> allUsersChristmasSet = christmasBuddENetwork.getAllUsers();\n int numUsersChristmas = allUsersChristmasSet.size();\n if (numUsersChristmas != 10) {\n fail(\"test008_addValidUsers(): FAILED! Did NOT return 10 users for \"\n + \"the network, but instead: \" + numUsersChristmas);\n }\n\n\n } catch (Exception e) {\n fail(\"test008_addValidUsers(): FAILED! Threw an improper exception! :(\");\n\n }\n\n\n }", "@Test\n public void SameTokenNameOpenExchangeNotExist() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 4;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"Exchange not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Exchange[4] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "@Test\n public void preDefine_TestA()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"High Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"high\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void SameTokenNameOpenInvalidAddress() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_INVALID, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"Invalid address\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Invalid address\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n void test001_addValidFriendshipFor2BuddiesInNetwork() {\n\n try {\n christmasBuddENetwork.addFriendship(\"santa\", \"grinch\");\n christmasBuddENetwork.addFriendship(\"santa\", \"rudolph\");\n christmasBuddENetwork.addFriendship(\"comet\", \"santa\");\n christmasBuddENetwork.addFriendship(\"prancer\", \"grinch\");\n christmasBuddENetwork.addFriendship(\"prancer\", \"comet\");\n\n\n // no exception should be thrown because this is a different network:\n lonelERedNosedRudolphNetwork.addFriendship(\"santa\", \"grinch\");\n // adding another friendship to the different network\n lonelERedNosedRudolphNetwork.addFriendship(\"blitzen\", \"donder\");\n // the lonelERedNosedRudolphNetwork should have 4 buddEs: santa, grinch,\n // blitzen, and donder\n Set<User> lonelERudolphSet = lonelERedNosedRudolphNetwork.getAllUsers();\n int numLonelERudolphBuddEs = lonelERudolphSet.size();\n if (numLonelERudolphBuddEs != 4) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did \"\n + \"NOT return 4 for the # of BuddEs in the \"\n + \"lonelERedNosedRudolphNetwork but instead returned: \"\n + numLonelERudolphBuddEs);\n }\n // we should see that blitzen and donder each just have 1 buddE in the\n // lonelERedNosedRudolphNetwork:\n lonelERedNosedRudolphNetwork.setCentralUser(\"blitzen\");\n User centralUserBlitzen = lonelERedNosedRudolphNetwork.getCentralUser();\n Set<User> blitzensFriends = centralUserBlitzen.getFriends();\n int numFriendsOfBlitzen = blitzensFriends.size(); // please note this\n // should be 1\n\n if (numFriendsOfBlitzen != 1) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 1 for the # of buddEs Blitzen has (Donder) and \"\n + \"instead returned: \" + numFriendsOfBlitzen);\n }\n for (User i : blitzensFriends)\n\n if ((!i.getName().equals(\"donder\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Blitzens buddE list is NOT correct\");\n\n }\n\n lonelERedNosedRudolphNetwork.setCentralUser(\"donder\");\n User centralUserDonder = lonelERedNosedRudolphNetwork.getCentralUser();\n Set<User> dondersFriends = centralUserDonder.getFriends();\n int numFriendsOfDonder = dondersFriends.size(); // please note this should\n // be 1\n\n if (numFriendsOfDonder != 1) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 1 for the # of buddEs Donder has (Blitzen) and \"\n + \"instead returned: \" + numFriendsOfDonder);\n }\n\n for (User i : dondersFriends) {\n if ((!i.getName().equals(\"blitzen\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Donders buddE list is NOT correct\");\n\n }\n }\n\n\n\n // ensuring we have added all 5 buddEs to the christmasBuddENetwork\n // because addFriendship should do\n // this :)\n // we should have 5 buddEs: santa, grinch, rudolph, comet, and prancer in\n // the network\n Set<User> allChristmasBuddEsSet = christmasBuddENetwork.getAllUsers();\n int numOfBuddEs = allChristmasBuddEsSet.size();\n if (numOfBuddEs != 5) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did \"\n + \"NOT return 5 for the # of BuddEs in the christmasBuddENetwork \"\n + \"but instead returned: \" + numOfBuddEs);\n }\n\n // checking Santa's friendships:\n // Santa's friends: grinch, rudolph, and comet (3 friends)\n christmasBuddENetwork.setCentralUser(\"santa\");\n User centralUserSanta = christmasBuddENetwork.getCentralUser();\n Set<User> santasFriends = centralUserSanta.getFriends();\n int numFriendsOfSanta = santasFriends.size(); // please note this should\n // be 3\n\n if (numFriendsOfSanta != 3) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 3 for the # of friends Santa has (Grinch, Rudolph, \"\n + \"and Comet) and instead returned: \" + numFriendsOfSanta);\n }\n\n ArrayList<String> santaBudsList = new ArrayList<String>();\n for (User i : santasFriends) {\n santaBudsList.add(i.getName());\n }\n\n if ((!santaBudsList.contains(\"grinch\"))\n || (!santaBudsList.contains(\"comet\"))\n || (!santaBudsList.contains(\"rudolph\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Santas buddE list is NOT correct\");\n\n }\n\n // checking Grinch's friendships:\n // we should have 2 friends: santa and prancer\n christmasBuddENetwork.setCentralUser(\"grinch\");\n User centralUserGrinch = christmasBuddENetwork.getCentralUser();\n Set<User> grinchsFriends = centralUserGrinch.getFriends();\n int numFriendsOfGrinch = grinchsFriends.size(); // please note this should\n // be 2\n\n if (numFriendsOfGrinch != 2) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 2 for the # of friends Grinch has (Santa and \"\n + \"Prancer) and instead returned: \" + numFriendsOfGrinch);\n }\n\n ArrayList<String> grinchBudsList = new ArrayList<String>();\n for (User i : grinchsFriends) {\n grinchBudsList.add(i.getName());\n }\n\n\n if ((!grinchBudsList.contains(\"santa\"))\n || (!grinchBudsList.contains(\"prancer\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Grinchs buddE list is NOT correct\");\n\n }\n\n // checking Comet's friendships:\n // Comet's friends: Santa and Prancer (2 buddEs)\n christmasBuddENetwork.setCentralUser(\"comet\");\n User centralUserComet = christmasBuddENetwork.getCentralUser();\n Set<User> cometsFriends = centralUserComet.getFriends();\n int numFriendsOfComet = cometsFriends.size(); // please note this should\n // be 2\n\n if (numFriendsOfComet != 2) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 2 for the # of buddEs reindeer Comet has (Santa and \"\n + \"Prancer) and instead returned: \" + numFriendsOfComet);\n }\n\n ArrayList<String> cometBudsList = new ArrayList<String>();\n for (User i : cometsFriends) {\n cometBudsList.add(i.getName());\n }\n\n if ((!cometBudsList.contains(\"santa\"))\n || (!cometBudsList.contains(\"prancer\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Comets buddE list is NOT correct\");\n\n }\n\n // checking Prancer's friendships:\n // Prancer's friends: Grinch and Comet (2 buddEs)\n christmasBuddENetwork.setCentralUser(\"prancer\");\n User centralUserPrancer = christmasBuddENetwork.getCentralUser();\n Set<User> prancersFriends = centralUserPrancer.getFriends();\n int numFriendsOfPrancer = cometsFriends.size(); // please note this should\n // be 2\n\n if (numFriendsOfPrancer != 2) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 2 for the # of buddEs reindeer Prancer has (Grinch \"\n + \"and Comet) and instead returned: \" + numFriendsOfPrancer);\n }\n\n ArrayList<String> prancerBudsList = new ArrayList<String>();\n for (User i : prancersFriends) {\n prancerBudsList.add(i.getName());\n }\n\n if ((!prancerBudsList.contains(\"grinch\"))\n || (!prancerBudsList.contains(\"comet\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Prancers buddE list is NOT correct\");\n }\n\n // checking Rudolph's friendships:\n // Rudolph's friends: Santa (1 buddE)\n christmasBuddENetwork.setCentralUser(\"rudolph\");\n User centralUserRudolph = christmasBuddENetwork.getCentralUser();\n Set<User> rudolphsFriends = centralUserRudolph.getFriends();\n int numFriendsOfRudolph = rudolphsFriends.size(); // please note this\n // should be 1\n\n if (numFriendsOfRudolph != 1) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Did\"\n + \" NOT return 1 for the # of buddEs Red-Nose reindeer Rudolph has \"\n + \"(Santa) and instead returned: \" + numFriendsOfRudolph);\n }\n\n ArrayList<String> rudolphBudsList = new ArrayList<String>();\n for (User i : rudolphsFriends) {\n rudolphBudsList.add(i.getName());\n }\n\n\n if ((!rudolphBudsList.contains(\"santa\"))) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :(\"\n + \" Rudolphs buddE list is NOT correct\");\n }\n\n } catch (IllegalNullArgumentException e1) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Threw \"\n + \"an IllegalNullArgumentException when trying to add a valid \"\n + \"friendship!\");\n } catch (UserNotFoundException e2) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Threw \"\n + \"a UserNotFoundException when trying to add a valid friendship!\");\n } catch (Exception e3) {\n fail(\"test001_addValidFriendshipFor2BuddiesInNetwork(): FAILED! :( Threw \"\n + \"an Exception when trying to add a valid friendship!\");\n }\n\n\n\n // please see if Grinch is in this set\n\n\n }", "@Test\n public void SameTokenNameCloseAccountIsNotCreator() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_SECOND);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), firstTokenQuant);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_SECOND, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[a0548794500882809695a8a687866e76d4271a1abc]\"\n + \" is not creator\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n\tpublic void validateBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF VALID\n\t\tassertEquals(true, newBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE REFERENCE\n\t\tBlock invalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), new byte[128], newBlock.getTimestamp(), newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE TIMESTAMP\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), 1L, newBlock.getGeneratingBalance(), newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//CHANGE BASETARGET\n\t\tinvalidBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), 1L, newBlock.getGenerator(), newBlock.getGeneratorSignature());\n\t\t\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD INVALID TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(-100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tinvalidBlock.addTransaction(payment);\t\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t\t\n\t\t//ADD GENESIS TRANSACTION\n\t\tinvalidBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\ttransaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), newBlock.getTimestamp());\n\t\tinvalidBlock.addTransaction(transaction);\t\n\t\t\n\t\t//CHECK IF INVALID\n\t\tassertEquals(false, invalidBlock.isValid(databaseSet));\n\t}", "@Test\n\tpublic void testInvalidBarcodeTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(merchant); //Merchant not in database\n\t\t//database.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This barcode does not exist\",verifyParticipants);\n\t}", "@Test\n public void processTestC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),5,10);\n\n Assert.assertEquals(false,trans.process());\n }" ]
[ "0.72274995", "0.71212155", "0.667702", "0.66446173", "0.6514525", "0.64363116", "0.64208394", "0.6392885", "0.6157644", "0.5708065", "0.5674238", "0.5596965", "0.55162436", "0.55059946", "0.5481297", "0.5477984", "0.5476718", "0.54681015", "0.544454", "0.54280865", "0.54234755", "0.5406053", "0.5379455", "0.5331755", "0.5318348", "0.53129774", "0.52735066", "0.52710253", "0.525634", "0.5252859", "0.52513796", "0.5247958", "0.5246117", "0.5245741", "0.5240062", "0.5237319", "0.52357155", "0.5211682", "0.5206969", "0.5203252", "0.52007234", "0.5192176", "0.51918703", "0.51893425", "0.51814497", "0.51772654", "0.5172402", "0.5169402", "0.5168168", "0.5162033", "0.5148069", "0.5147878", "0.5140887", "0.5134282", "0.51337117", "0.5116529", "0.5107016", "0.5088214", "0.5087195", "0.50767124", "0.5069853", "0.5068067", "0.5063179", "0.5061371", "0.5053173", "0.50526804", "0.50475687", "0.5039375", "0.5036739", "0.50366396", "0.5033368", "0.5027122", "0.50171405", "0.5013618", "0.5011997", "0.5010318", "0.5009197", "0.49972725", "0.4994078", "0.49876222", "0.4982904", "0.49789032", "0.4967471", "0.49667445", "0.49594152", "0.4951584", "0.49514577", "0.49500164", "0.49462587", "0.49362978", "0.49191913", "0.4915917", "0.49159", "0.49086744", "0.49084765", "0.49080828", "0.49055767", "0.48960635", "0.48935857", "0.48924282" ]
0.7573722
0
Initialize our new UI component
@Override protected void init(VaadinRequest request) { final ClosableAccordion component = new ClosableAccordion() { { setSizeUndefined(); setWidth("100%"); for (numTab = 1; numTab < 4; numTab++) { Tab tab = addTab(new VerticalLayout() { { setMargin(true); setSpacing(true); addComponent(new Label(loremIpsum)); } }); tab.setClosable(true); tab.setCaption("Tab #" + numTab); tab.setStyleName("trash"); } // Close handler setCloseHandler(new CloseHandler() { @Override public void onTabClose(TabSheet tabsheet, Component tabContent) { Tab tab = tabsheet.getTab(tabContent); Notification.show("Closing " + tab.getCaption()); // We need to close it explicitly in the handler tabsheet.removeTab(tab); } }); // For adding new tabs final Label addNewTabContent = new Label(); Tab addNewTab = addTab(addNewTabContent, "+ Add a new tab"); addNewTab.setStyleName("addnew"); addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { if (event.getTabSheet().getSelectedTab() .equals(addNewTabContent)) { removeTab(getTab(addNewTabContent)); Tab newTab = addTab(new VerticalLayout() { { setMargin(true); setSpacing(true); addComponent(new Label(loremIpsum)); } }); newTab.setClosable(true); newTab.setCaption("Tab #" + numTab++); newTab.setStyleName("trash"); event.getTabSheet().setSelectedTab(newTab); addTab(addNewTabContent, "+ Add a new tab") .setStyleName("addnew"); } } }); } }; setContent(new VerticalLayout() { { setSizeUndefined(); setWidth("100%"); setMargin(false); setId("demo-base-layout"); addComponent(new Panel() { { setSizeUndefined(); setWidth("100%"); setCaption("Accordion w/ closable tabs"); // Show it in the middle of the screen setContent(new HorizontalLayout() { { setStyleName("demoContentLayout"); setSizeUndefined(); setWidth("100%"); setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); addComponent(component); } }); } }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UI() {\n initComponents();\n }", "private void initUI() {\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "public RummyUI(){\n \n //Call method initComponents\n initComponents();\n \n }", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "public mainUI() {\n initComponents();\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "public uitax() {\n initComponents();\n }", "void initUI();", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private void initcomponent() {\n\r\n\t}", "public GUI() {\n\t\tinitComponents();\n\t}", "public HealthUI() {\n init();\n }", "public userinterface() {\n initComponents();\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "public UI() {\n initComponents();\n setResizable(false);\n }", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "public GUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "public void init() {\n initComponents();\n initData();\n }", "public Library() {\r\n initComponents();\r\n }", "public MHTYGUI() {\n\t\t\tinitComponents();\n\t\t}", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "public RagaiGUI() {\n initComponents();\n \n }", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "public PropsGUI() {\n initComponents();\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public abstract void initUiAndListener();", "public void initComponents();", "public Gui() {\n initComponents();\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "public LinkNodesUI() {\n initComponents();\n }", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public DrugUI() {\n initComponents();\n }", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "@Override\r\n public void initComponent() {\n }", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "public AulaView() {\n initComponents();\n }", "public ReportUi() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }", "private UI()\n {\n this(null, null);\n }", "public ConverterGUI() {\n initComponents();\n }", "protected abstract void initializeComponent(View view);", "public ElevatorUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "protected void initControl() {\n\t\t\r\n\t}", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "public Libros() {\n initComponents();\n }", "public adivinaGUI() {\n initComponents();\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }", "public soal2GUI() {\n initComponents();\n }", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "public Gui() { \n preInitComponents(); \n initComponents();\n postInitComponents(); \n setVisible(true);\n appInitialization();\n }", "public AplicationGUI() {\n initComponents();\n }", "public ViewInit() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}", "public EjemplarUI() {\n initComponents();\n controlador = Controladores.peliculaController;\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "protected void initializeGUI() {\n\n\t}", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "protected void initializeComponents() {\n\t\t/* Create fonts for information nodes */\n\t\tFont titleFont = Font.font(\"Arial\", FontWeight.BOLD, 18);\n\t\tFont descriptionFont = Font.font(\"Arial\", 14);\n\t\t/* Configure information nodes */\n\t\tconfigureTitle(titleFont);\n\t\tconfigureDescription(descriptionFont);\n\t\tconfigureIconContainer();\n\t\tconfigureWindow();\n\t\t/* set scene */\n\n\t\tgetContent().add(notificationContainer);\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }", "public MainView() {\n initComponents();\n \n }", "private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}", "public orgGui() {\n initComponents();\n }", "public void initialize() {\n\t\ttoolBar.setDrawingPanel(this.drawingPanel);\r\n\t\t//component initialize\r\n\t\tmenuBar.initialize();\r\n\t\ttoolBar.initialize();\r\n\t\tdrawingPanel.initialize();\r\n\t\t\r\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void init() {\n initView();\n setListener();\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}", "public DeviceSelectionComponentBase() {\n initComponents();\n }", "public TetrisGUI() {\r\n initializeFields();\r\n }", "private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }", "private void initComponents() {\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(2);\n add(rootLayout);\n Empsn_Label= new nextapp.echo2.app.Label();\n Empsn_Label.setText(\"N_TIME_BEAR.EMPSN\");\n rootLayout.add(Empsn_Label);\n \n Empsn_DscField = new dsc.echo2app.component.DscField();\n Empsn_DscField.setId(\"Empsn_DscField\");\n Empsn_DscField.setWidth(new Extent(4, Extent.CM));\n rootLayout.add(Empsn_DscField);\n \n\t}", "public Analizer() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public Avontool() {\n initComponents();\n }", "public void init() {\n setLayout(new BorderLayout());\n }", "public MainUI() {\r\n initComponents();\r\n this.setLocationRelativeTo(null);\r\n /**/\r\n }", "public VComponente() {\n initComponents();\n }", "@Override\n\tpublic void initGui() {\n\t\tfield_154330_a.init();\n\t\tsuper.initGui();\n\t}", "public MainView() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "public DesktopGUI() {\n initComponents();\n }", "public UICadMovel() {\n initComponents();\n }" ]
[ "0.8051734", "0.80307454", "0.79322994", "0.7798693", "0.776069", "0.7695912", "0.768819", "0.76034015", "0.75913465", "0.75913465", "0.7584113", "0.75382036", "0.7505128", "0.7486792", "0.74551654", "0.7448896", "0.7442558", "0.7436078", "0.74053717", "0.7397952", "0.7389507", "0.73702854", "0.73424983", "0.73402625", "0.7325233", "0.73232985", "0.73232985", "0.7277827", "0.7257669", "0.72555643", "0.72472155", "0.7245871", "0.7217482", "0.7217482", "0.7216718", "0.72132105", "0.72088903", "0.7202894", "0.7198522", "0.71911085", "0.7190863", "0.718951", "0.7179652", "0.7177431", "0.71719104", "0.71714497", "0.71664715", "0.7151662", "0.71366054", "0.71240276", "0.70991945", "0.7087636", "0.7087285", "0.70841855", "0.707914", "0.7071662", "0.7068191", "0.70678383", "0.7065401", "0.7061917", "0.7061519", "0.7050565", "0.7041899", "0.7037299", "0.7016616", "0.70121694", "0.7011781", "0.70113105", "0.7006498", "0.70052576", "0.6998825", "0.6996609", "0.6994174", "0.6985333", "0.6984554", "0.69819504", "0.6980509", "0.6976962", "0.69757557", "0.6975152", "0.6965947", "0.69610065", "0.69582695", "0.6956844", "0.6952998", "0.6951134", "0.6944468", "0.69429326", "0.69427806", "0.69392866", "0.6939059", "0.69355863", "0.69323343", "0.69213504", "0.69170684", "0.6916723", "0.6908987", "0.6905225", "0.6905225", "0.6899647", "0.68958056" ]
0.0
-1
Constructor for the FormPoule object
public FormJoueur(Competition competition) { super("Liste des joueurs de la compétition", true, true); //setClosable(false); this.competition = competition; competition.addObserver(this); JoueursTableModel modelJoueur = new JoueursTableModel(); sorter = new TableSorter(modelJoueur); tableJoueurs = new JTable(sorter); sorter.setTableHeader(tableJoueurs.getTableHeader()); tableJoueurs.setPreferredScrollableViewportSize(new Dimension(500, 70)); tableJoueurs.setAutoscrolls(true); tableJoueurs.getTableHeader().setToolTipText( "Click to specify sorting; Control-Click to specify secondary sorting"); modelJoueur.addTableModelListener(this); PlaceTableCellRenderer renderer = new PlaceTableCellRenderer(); PlaceTableCellRenderer renderer2 = new PlaceTableCellRenderer(); tableJoueurs.setDefaultRenderer( Number.class, renderer ); tableJoueurs.setDefaultRenderer( String.class, renderer2 ); renderer.setHorizontalAlignment(PlaceTableCellRenderer.CENTER); JScrollPane scrollPane = new JScrollPane(tableJoueurs); //add(scrollPane); setBounds(10, 10, 500, 300); GridBagConstraints constraints = new GridBagConstraints(); JPanel panel = new JPanel(new BorderLayout()); panel.setLayout(new GridBagLayout()); tableJoueurs.getSelectionModel().addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent arg0) { selectionJoueurChanged(arg0); } }); tableJoueurs.addKeyListener(new KeyListener() { public void keyTyped(KeyEvent e) { } public void keyPressed(KeyEvent e) { actionKeyPressed(e); } public void keyReleased(KeyEvent e) { } }); rbLincencie.addChangeListener( new ChangeListener() { public void stateChanged(ChangeEvent e) { rbLincencieStateChanged(e); } }); bAjouter.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { ajouterJoueur(e); } }); bAddClub.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { ajouterClub(e); } }); bImprimerPresents.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { imprimerPresents(e); } }); bImprimerJoueurs.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { imprimerJoueurs(e); } }); bSupprimer.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { supprimerJoueur(e); } }); bModifier.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { modifierJoueur(e); } }); bSauverListe.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { sauverListe(e); } }); bSauverSelection.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { sauverSelection(e); } }); bChargerListe.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { chargerListe(e); } }); bRAZPart.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { clearParticipation(e); } }); bAjouter.setToolTipText("Ajoute ce joueur à la liste des joueurs."); bAddClub.setToolTipText("Ajoute le club renseigné à la liste des clubs."); bChargerListe.setToolTipText("Charge une liste de joueurs à partir d'un fichier."); bImprimerJoueurs.setToolTipText("Imprime la liste des joueurs."); bImprimerPresents.setToolTipText("Imprime la liste des joueurs présents dans le tournoi."); bModifier.setToolTipText("Modifie le joueur sélectionné."); bRAZPart.setToolTipText("Remet à zéro le nombre de participation de tous les joueurs."); bSauverListe.setToolTipText("Sauvegarde la liste des joueurs dans un fichier."); bSauverSelection.setToolTipText("Sauvegarde la liste des joueurs présents dans un fichier."); bSupprimer.setToolTipText("Efface le joueur sélectionné."); tfCltNew.setToolTipText("Nouveau classement (EX:1685)"); cbCltOld.setToolTipText("Ancien classement"); tfClub.setToolTipText("Permet de renseigner un nouveau club"); int ligne = 0; //================= 1ere ligne ========================= ligne++; constraints.gridy = ligne; constraints.gridx = 3; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHEAST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(lblNom, constraints); constraints.gridy = ligne; constraints.gridx = 4; constraints.gridwidth = 3; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(tfNom, constraints); constraints.gridx = 0; constraints.gridy = ligne; constraints.gridwidth = 3; constraints.gridheight = 9; constraints.weightx = 1.0; constraints.weighty = 0.8; constraints.anchor = GridBagConstraints.CENTER; constraints.fill = GridBagConstraints.BOTH; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(scrollPane, constraints); constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHEAST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(lblPrenom, constraints); constraints.gridx = 4; constraints.gridwidth = 3; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(tfPrenom, constraints); //================= 3eme ligne ========================= bgSexe.add(rbFeminin); bgSexe.add(rbMasculin); constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(lblMasculin, constraints); constraints.gridx = 4; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(rbMasculin, constraints); constraints.gridx = 5; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(lblFeminin, constraints); constraints.gridx = 6; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(rbFeminin, constraints); //================= 3eme ligne ========================= bgLicencie.add(rbLincencie); bgLicencie.add(rbNonLicencie); constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(new JLabel("licencié"), constraints); constraints.gridx = 4; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(rbLincencie, constraints); constraints.gridx = 5; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(new JLabel("Non licencié"), constraints); constraints.gridx = 6; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(rbNonLicencie, constraints); //======================================================= constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(new JLabel("Club"), constraints); constraints.gridx = 4; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(cbClub, constraints); constraints.gridx = 5; panel.add(tfClub, constraints); constraints.gridx = 6; panel.add(bAddClub, constraints); //=================== 4ème ligne ========================= constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(lblClt, constraints); constraints.gridx = 4; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(tfCltNew, constraints); constraints.gridx = 5; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(cbCltOld, constraints); constraints.gridx = 6; tfNumero.setToolTipText("joueurs numérotés"); panel.add(tfNumero, constraints); //=================== 4ème ligne ========================= constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(new JLabel("Catégorie"), constraints); constraints.gridx = 4; constraints.gridwidth = 3; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTHWEST; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(cbCategorie, constraints); //================== 5 ligne ==================== JPanel panelButtonsJoueurs = new JPanel(new GridLayout(1,3)); constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 5; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.NORTH; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(panelButtonsJoueurs, constraints); panelButtonsJoueurs.add(bAjouter); panelButtonsJoueurs.add(bModifier); panelButtonsJoueurs.add(bSupprimer); JPanel panelButtonsListe = new JPanel(new GridLayout(3,2)); constraints.gridx = 3; constraints.gridy = ++ligne; constraints.gridwidth = 5; constraints.gridheight = 1; constraints.weightx = 0.0; constraints.weighty = 0.0; constraints.anchor = GridBagConstraints.SOUTH; constraints.fill = GridBagConstraints.NONE; constraints.ipadx = 0; constraints.ipady = 0; constraints.insets = new Insets(2, 2, 2, 2); panel.add(panelButtonsListe, constraints); panelButtonsListe.add(bSauverListe); panelButtonsListe.add(bSauverSelection); panelButtonsListe.add(bChargerListe); panelButtonsListe.add(bImprimerPresents); panelButtonsListe.add(bImprimerJoueurs); panelButtonsListe.add(bRAZPart); bSauverListe.setFocusable(false); bSauverSelection.setFocusable(false); bChargerListe.setFocusable(false); bImprimerPresents.setFocusable(false); bImprimerJoueurs.setFocusable(false); selectDefaultValue(); getContentPane().add(BorderLayout.CENTER, panel); setResizable(true); setMaximizable(true); setIconifiable(true); //pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FormFieldsReport() {}", "public Formulario() {\n initComponents();\n }", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "public FormPortlet( )\n {\n }", "public ValidFrequencyForm() {\r\n initComponents();\r\n }", "public FormularioP() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public UserForm(){ }", "public Form() {\n initComponents();\n }", "public ProposalSpecialReviewForm() {\r\n }", "public AuditFunctionForm() {\n initComponents();\n init();\n }", "public FormPemilihan() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public Ventaform() {\n initComponents();\n }", "public formPrincipal() {\n initComponents();\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}", "public DisciplinaForm() {\n initComponents();\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}", "public PatientModelSetForm() {\n\n\t}", "public quanlixe_form() {\n initComponents();\n }", "public BtxDetailsKcFormDefinition() {\n super();\n }", "public TransferOfFundsForm() {\n super();\n }", "private ValidatorForm(){}", "public FormUtama() {\n initComponents();\n }", "public ScheduleForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public FormProduct() {\n initComponents();\n getData();\n }", "public FormDataManagement() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Complex() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public ValidaCpf() {\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public frmPessoa() {\n initComponents();\n }", "public UserTypeForm() {\n\t\tthis(null);\n\t}", "DataFormDefinitionParser() {\n super();\n }", "Constructor() {\r\n\t\t \r\n\t }", "public S2SSubmissionDetailForm() {\r\n initComponents();\r\n }", "public FormularioCliente() {\n initComponents();\n }", "private FrmMainForm() {\n }", "public PatientRegForm() {\n initComponents();\n }", "public Form_soal() {\n initComponents();\n tampil_soal();\n }", "public FormPpal() {\n initComponents();\n setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(\"Imagenes/icon.png\")));\n setLocationRelativeTo(null);\n setTitle(\"Men\\372 principal\");\n setResizable(false);\n formBackUp = null;\n formBuscador = null;\n fb1 = null;\n fb2 = null;\n formListado = null;\n conn = new Conn();\n pacientesCumpleanos = new LinkedList();\n pacientesControl = new LinkedList();\n cargarCumpleanos();\n cargarControlesHoy();\n }", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public DDSViewCollectionForm() {\n\t}", "public FrmCampus() {\n initComponents();\n }", "public frmPrincipal() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public ProcedureFormPanel() {\n initComponents();\n }", "public StorageForm() {\n}", "public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }", "public Pregunta23() {\n initComponents();\n }", "public FrmBus() {\n initComponents();\n }", "public PantallaPrincipal() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public FrmFactura() {\n initComponents();\n }", "public FormInserir() {\n initComponents();\n }", "public LibrosFormBean() {\r\n libr = new ConjuntoLibro();\r\n }", "public VentaPrincipal() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public AwardAmountFNADistributionForm() {\r\n initComponents();\r\n }", "public JfrmPrincipal() {\n initComponents();\n }", "public frmAfiliado() {\n initComponents();\n \n }", "public ConsultaMaterial() {\n initComponents();\n }", "public AdmissionDetails() {\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public AnaPencere() {\n initComponents();\n }", "public Pregunta1() {\n initComponents();\n }", "public IMRSelectForm() {\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public frm_tutor_subida_prueba() {\n }", "public InvoiceCreate() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public PDocente() {\n initComponents();\n }", "public Field() {\r\n\t}", "public RecipeForm(){\n\t\tFactory ingredientFactory = new Factory() {\n\t\t\tpublic Object create() {\n\t\t\t\treturn new Ingredient();\n\t\t }\n\t\t};\n\t\tFactory quantityFactory = new Factory(){\n\t\t\tpublic Object create(){\n\t\t\t\treturn new Quantity();\n\t\t\t}\n\t\t};\n\t\t\n\t\tingredientsList = LazyList.decorate(new ArrayList<Ingredient>(), ingredientFactory);\n\t\tquantities = LazyList.decorate(new ArrayList<Quantity>(), quantityFactory);\n\t}", "public FormPrincipal() {\n initComponents();\n setLocationRelativeTo( null );\n \n }", "public Etf() {\n\t}", "public ValidationComponent ()\n\t\t{\n\t\t}", "public frmModelMainForm() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public Patient_Info() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public Constructor(){\n\t\t\n\t}", "public FrmKashidashi() {\n initComponents();\n }", "public Informacion() {\n initComponents();\n }", "public Pasien() {\r\n }", "public Punto_venta() {\n initComponents();\n }", "public Captura() {\n initComponents();\n }", "public ListingFormValidationObject() {\n this.titleValid = true;\n this.descriptionValid = true;\n this.initPriceValid = true;\n this.minBidValid = true;\n this.startDateAndTimeValid = true;\n this.categoryValid = true;\n this.endDateAndTimeValid = true;\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }" ]
[ "0.7326562", "0.71555567", "0.71442914", "0.7132011", "0.7062115", "0.70453507", "0.70449924", "0.7032036", "0.70307624", "0.7021171", "0.7019508", "0.6988696", "0.695626", "0.6925731", "0.69208443", "0.68815947", "0.6881579", "0.688107", "0.6843893", "0.68191284", "0.6803832", "0.6800123", "0.6794433", "0.67643094", "0.6755482", "0.674359", "0.67380744", "0.67289805", "0.67252266", "0.6684347", "0.6675354", "0.6667339", "0.66618484", "0.66338944", "0.6614955", "0.6609951", "0.6606632", "0.659974", "0.6590076", "0.6579989", "0.65609956", "0.6554522", "0.6553514", "0.654676", "0.6545559", "0.6541033", "0.65394336", "0.65259486", "0.6522499", "0.65182817", "0.6506476", "0.6492718", "0.64911044", "0.6488178", "0.6483197", "0.6481043", "0.6480931", "0.6473178", "0.645817", "0.64375633", "0.643023", "0.6426456", "0.64167833", "0.6400737", "0.63962275", "0.6389178", "0.6386572", "0.638515", "0.6382289", "0.63803726", "0.6374854", "0.6374309", "0.637033", "0.6364046", "0.63633883", "0.6361041", "0.6360717", "0.6359443", "0.6346467", "0.6344446", "0.63437486", "0.6337902", "0.63328177", "0.6320492", "0.6317939", "0.63132083", "0.63105035", "0.6309548", "0.62985015", "0.62915957", "0.628981", "0.628789", "0.62845534", "0.62844485", "0.6275469", "0.626923", "0.6263511", "0.62630177", "0.62630177", "0.62630177", "0.62614965" ]
0.0
-1
Description of the Method
public void selectDefaultValue() { cbCategorie.setSelectedIndex(1); cbCltOld.setSelectedIndex(0); cbClub.setSelectedIndex(0); rbLincencie.setSelected(true); rbMasculin.setSelected(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void ajouterJoueur(ActionEvent e) { tableJoueurs.scrollRectToVisible(tableJoueurs.getCellRect(tableJoueurs.getRowCount()-1,1,true)); Joueur j = getJoueur(); if (j == null) { // afficher un message d'erreur return; } boolean ajout = ((JoueursTableModel)sorter.getTableModel()).addJoueur(j); if(ajout) { ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged(); selectRowOff(j); } else { effacerSaisie(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void effacerSaisie() { tfCltNew.setText(""); tfNumero.setText(""); tfNom.setText(""); tfPrenom.setText(""); selectDefaultValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void chargerListe(ActionEvent evt) { JFileChooser fileChooser = new JFileChooser(); MyFileFilter filter = new MyFileFilter(); filter.addExtension("xml"); fileChooser.setFileFilter(filter); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); int returnVal = fileChooser.showOpenDialog(FormJoueur.this); if (returnVal == JFileChooser.APPROVE_OPTION) { //=== suppression des joueurs === ((JoueursTableModel)sorter.getTableModel()).clear(); File file = fileChooser.getSelectedFile(); try { XMLDecoder d = new XMLDecoder( new BufferedInputStream( new FileInputStream(file))); while(true) { try { Object result = d.readObject(); ((JoueursTableModel)sorter.getTableModel()).addJoueur((Joueur)result); } catch(ArrayIndexOutOfBoundsException exp) { break; } }; d.close(); } catch(Exception exp) { logger.error(exp); } } ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged(); //competition.notifyJoueursChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void sauverListe(ActionEvent evt) { JFileChooser fileChooser = new JFileChooser(); MyFileFilter filter = new MyFileFilter(); filter.addExtension("xml"); fileChooser.setFileFilter(filter); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); int returnVal = fileChooser.showOpenDialog(FormJoueur.this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); try { // si le fichier n'existe pas on le créer if(!file.exists()) { if(!file.getName().endsWith(".xml")&&!file.getName().endsWith(".XML")) { file = new File(file.getAbsolutePath()+".xml"); if(!file.createNewFile()) { JOptionPane.showMessageDialog(this,"Erreur lors de l'enregistrement !","Erreur",JOptionPane.ERROR_MESSAGE); } } } XMLEncoder e = new XMLEncoder( new BufferedOutputStream( new FileOutputStream(file))); Iterator joueurs = ((JoueursTableModel)sorter.getTableModel()).getJoueurs().iterator(); while(joueurs.hasNext()) { Joueur joueur = (Joueur)joueurs.next(); joueur.setHere(false); e.writeObject(joueur); } e.close(); } catch(Exception exp) { logger.error(exp); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void supprimerJoueur(ActionEvent e) { int index = tableJoueurs.getSelectedRow(); index = sorter.modelIndex(index); if (index != -1) { ((JoueursTableModel)sorter.getTableModel()).removeJoueur(index); ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void clearParticipation(ActionEvent e) { ArrayList joueurs = ((JoueursTableModel)sorter.getTableModel()).getJoueurs(); for (Iterator iter = joueurs.iterator(); iter.hasNext();) { Joueur j = (Joueur) iter.next(); j.setNbParticipation(0); } ((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Description of the Method
public void selectionJoueurChanged(ListSelectionEvent e) { if(tableJoueurs.getRowCount()<=0) return; int index = tableJoueurs.getSelectedRow(); if (index == -1) { effacerSaisie(); return; } index = sorter.modelIndex(index); Joueur j = ((JoueursTableModel)sorter.getTableModel()).getJoueur(index); if(j==null) { effacerSaisie(); } else { Classement clt = j.getClassement(); tfNom.setText(j.getNom()); tfPrenom.setText(j.getPrenom()); rbFeminin.setSelected(!j.isMasculin()); rbMasculin.setSelected(j.isMasculin()); cbCategorie.setSelectedItem(j.getCategorie().getCategorie()); cbClub.setSelectedItem(j.getClub()); if (!j.isLicencie()) { rbNonLicencie.setSelected(true); } else if (!j.isClasse()) { rbLincencie.setSelected(true); if(j.getClassement()!=null) { tfCltNew.setText(""+j.getClassement().getNewClassement()); } cbCltOld.setSelectedIndex(0); } else { rbLincencie.setSelected(true); tfCltNew.setText(Integer.toString(clt.getNewClassement())); cbCltOld.setSelectedItem(new Integer(clt.getOldClassement())); tfNumero.setText(Integer.toString(clt.getNumero())); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public void method(){}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "protected abstract MethodDescription accessorMethod();", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public abstract void description();", "MethodName getMethod();", "public abstract String description();", "public abstract String description();", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21793R() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method_4270() {}", "public void mo55254a() {\n }", "void method();", "void method();", "public void mo21791P() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public void mo21779D() {\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public void method_193() {}", "public void method_199() {}", "public void method_201() {}", "public void mo21877s() {\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}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "public void mo21789N() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "String getMethod();", "String getMethod();", "public void method_192() {}", "public void mo21780E() {\n }", "public void method() {\r\n\t\tSystem.out.println(\"4. 전체(다른 패키지) 접근 확인 - 상속\");\r\n//\t\tSystem.out.println(prot);\r\n//\t\tSystem.out.println(pub);\r\n\t}", "public void mo21795T() {\n }", "public void method_115() {}", "public void method_202() {}", "@Override\n public void memoria() {\n \n }", "public void mo97908d() {\n }", "public void mo21794S() {\n }", "public abstract String commandDocumentation();", "public void mo21880v() {\n }", "public void method1()\r\n\t{\r\n\t}", "public void mo21782G() {\n }", "@Override\n\tpublic String algorithmDescription() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"analyze all methods and generate all stem methods.\";\r\n\t}", "public void mo21825b() {\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 }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public int method_113() {\r\n return 0;\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String methodReturn() {\n\t\t\n\t\treturn \"Executing a method which returns a String Text\";\n\t}", "public void mo21783H() {\n }", "public String getMethod ()\n {\n return method;\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "@Override\n public String getDescription() {\n return description;\n }", "public String description();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void amethod() {\n\t}", "public int getMethod(){\n return method;\n }", "public void mo21788M() {\n }", "public void mo44053a() {\n }", "public void mo21785J() {\n }", "void info() {\n System.out.println(\"E16_OverloadJavaDoc is \" + height + \" feet tall\");\n }", "private String getName() {\n return method.getName();\n }", "public void mo2471e() {\n }", "public abstract String getDescription ( );", "public void mo21784I() {\n }", "void method_115();", "@Override\n\tpublic String getDescription();", "abstract void method();", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "public void mo6944a() {\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}" ]
[ "0.7217758", "0.68454057", "0.68454057", "0.6830933", "0.67493093", "0.6695145", "0.6556487", "0.65147936", "0.64617175", "0.644865", "0.6421961", "0.6410508", "0.6398772", "0.63464755", "0.63173974", "0.63173974", "0.628983", "0.6287181", "0.6277629", "0.62759244", "0.62692744", "0.6261489", "0.62570226", "0.62355864", "0.6224918", "0.6224918", "0.6223306", "0.61818606", "0.6178247", "0.6174813", "0.6174373", "0.6171649", "0.61707073", "0.61704904", "0.61695683", "0.6152007", "0.61482906", "0.6142712", "0.6141223", "0.61359864", "0.6127939", "0.6126343", "0.6126343", "0.61162657", "0.61161625", "0.61136705", "0.61064136", "0.61061233", "0.6091723", "0.6091678", "0.6084798", "0.6081336", "0.6074525", "0.60741127", "0.6071798", "0.6069493", "0.6062952", "0.6052934", "0.6051018", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60499376", "0.60490304", "0.6040154", "0.6038334", "0.6038334", "0.6038334", "0.6035963", "0.6027962", "0.6027503", "0.602503", "0.60217303", "0.60216063", "0.6014245", "0.6007991", "0.59978735", "0.59964025", "0.5992624", "0.59914416", "0.5987587", "0.5976837", "0.59732383", "0.5972544", "0.5970677", "0.5964908", "0.59509534", "0.5944301", "0.5942249", "0.5941093", "0.5939091", "0.5935497", "0.59299725", "0.5929544", "0.59277457", "0.5927593", "0.5923222", "0.5923222" ]
0.0
-1
Constructs a ParamException with the specified detail message. A detail message is a String that describes this particular exception.
public ParamException( String msg ) { super( msg ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ParameterException(String message) {\n\t\tsuper(message);\n\t}", "public InvalidParameterValueException(String message) {\n super(message);\n }", "public ParameterException(String message, Exception e) {\n\t\tsuper(message, e);\n\t}", "public IllegalParameterException(final String message) {\n super(message);\n }", "public InvalidParameterValueException(String message, Throwable cause) {\n super(message, cause);\n }", "public StatsParamException(String toDisplay)\r\n\t{\r\n\t\tsuper(toDisplay);\r\n\t}", "public PDUStringException(String message, StringParameter parameter) {\n super(message);\n this.parameter = parameter;\n }", "public ParameterNotFoundException( String s )\n\t{\n\t\tsuper( s );\n\t}", "public DAOException(String message, String... params)\r\n {\r\n super(message, params);\r\n }", "MessageParameter createMessageParameter();", "public ParameterNotFoundException()\n\t{\n\t\tsuper();\n\t}", "public FormatException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "public NotValidException(String message) {\r\n super(message);\r\n }", "public PreparationException(final String message) {\n\t\tsuper(message);\n\t}", "public BadMessageException(final String message) {\r\n\t\tsuper(message);\r\n\t}", "public KeywordsParam(String param) throws BadParamException {\r\n\t\tsuper(param);\r\n\t}", "public PreprocessorException(String message) {\r\n super(message);\r\n }", "public InvalidModelException(String message) {\n super(message);\n }", "protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);", "public APIException(String message) {\n\t\tsuper(message, null);\n\t}", "public JavaException(@Nullable String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t}", "public ValidationException(String msg) {\n\t\tsuper(msg);\n\t}", "public JDBFException (String message){\r\n super(Messages.message(message));\r\n }", "public InvalidInvocationException(String detailMessage)\n {\n super(detailMessage);\n }", "public PriceModelException(final String message) {\n super(message);\n }", "public DslException(String message) {\n\t\tsuper(message);\n\t}", "public NotFoundException(final String message) {\r\n super(Response.status(Responses.NOT_FOUND).\r\n entity(message).type(\"text/plain\").build());\r\n myDetailMessage = message;\r\n }", "public MyException(String message)\n { super(message); }", "public ParsingException(String message) {\n super(message);\n }", "public PropertyNotDefinedException(String message) {\n super(message);\n }", "public WeldExceptionStringMessage(String message) {\n // This will not be further localized\n this.message = message;\n }", "public MessageParseException(String message) {\n super(message);\n }", "public TwilioRestException(String message, int errorCode, String moreInfo) {\n\t\tsuper(message);\n\n\t\tthis.message = message;\n\t\tthis.errorCode = errorCode;\n\t\tthis.moreInfo = moreInfo;\n\t}", "public BaseException(String message) {\n super(message);\n setErrorCode();\n }", "public void testConstructorWithMessage() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", null, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "public ValueOutOfRangeException(String message) {\n this.message = message;\n }", "public OLMSException(String message) {\r\n super(message);\r\n }", "public BadVehicleInformationException(String message) {\n\t\tsuper(message);\n\t}", "public NoTraceOntimizeJEEException(String message, Object[] msgParameters) {\r\n this(message, null, msgParameters, null, false, false);\r\n }", "public AbstractCodeGenException(final String message) {\n super(message);\n }", "public InvalidInputException(String errMessage)\n\t{\n\t\tthis.errMessage = errMessage;\n\t}", "public SenhaInvalidaException(String message) {\n\t\tsuper(message);\n\t}", "public MethodException(String informative) {\n super(VARIABLE_EXCEPTION_MESSAGE + informative);\n }", "public BadRequestException(String message) {\n super(message);\n if(!message.equals(\"\")){errorText = errorText.concat(\": \" + message);}\n }", "public ImageFormatException(String message) {\n\t\tsuper(message);\n\t}", "public WorkflowException(ErrorCode errorCode, Object... params) {\n super(errorCode.getTemplate()+\" \" + params);\n }", "public JDBFException (String message, Object [] args){\r\n super(Messages.format(message, args));\r\n }", "public VerifyException(String message) {\n\t\tsuper(message);\n\t}", "Param createParam();", "Param createParam();", "Param createParam();", "public MyException(String message) {\r\n\t\tsuper(message);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }", "public InvalidArtifactException(final String msg) {\r\n super(msg);\r\n }", "public InjectionCycleException(@NotNull String message) {\n super(message);\n }", "public PersistenceException(String message) {\n super(message);\n }", "@Test\n public void testConstructorWithMessage()\n {\n final LoaderException e = new LoaderException(\"Custom message\");\n assertEquals(\"Custom message\", e.getMessage());\n }", "public OfferingException(String msg) {\n super(msg);\n }", "MyException(String str)\n {\n //parametrize constructor\n super(str);\n }", "public ValidationException(String msgKey) {\r\n\t\tsuper(getMessageValue(msgKey));\r\n\t}", "public ArgumentException(String msg) {\n super(msg);\n }", "public TDLProException(String message)\n {\n super(message);\n }", "public EmployeeException(String message) {\n\t\tsuper(message);\n\t}", "public SSHException(String message) {\n super(message);\n }", "public ExceptionDate(String parMessage){\n\t\tsuper(parMessage);\n\t}", "public ConverterException(String message) {\n super(message);\n this.cause = null;\n }", "public CompilationException(String message) {\n\t\tsuper(message);\n\t}", "public PolynomialException(String msg) {\n super(msg);\n }", "public OperationFailedException(String message, Exception causeOfException){\n super(message, causeOfException);\n }", "public Neo4jException(String message) {\n this(\"N/A\", message);\n }", "public InvalidInvocationException(String detailMessage, Throwable throwable)\n {\n super(detailMessage, throwable);\n }", "public ControllerException(String msg) {\n super(msg);\n }", "@Api(1.4)\n public HaloParsingException(@Nullable String message, @Nullable Exception e) {\n super(message, e);\n }", "public PizzaException(String message) {\n super(message);\n }", "public IncorrectInputException(String message) {\r\n super(message);\r\n }", "public RecordNotFoundException(String message) {\n this(message, null);\n }", "public PlotException(String message) {\n\tsuper(message);\n }", "public Error(String message) {\r\n \tsuper(message);\r\n \t}", "public VelocityEmailException(String msg)\n {\n super(msg);\n }", "public FileFormatException(String message) {\r\n super(message);\r\n }", "public SensorException(String message) {\r\n super(message);\r\n }", "public InvalidNumberException(String message) {\n\t\tsuper(message);\n\t}", "public InvalidProcessException(String message) {\n super(message);\n }", "public SearchException(String msg) {\n super(msg);\n }", "public JDBFException (String message, Object type){\r\n super(Messages.format(message, type));\r\n }", "@ParametersAreNonnullByDefault\n\tpublic ApplicationException(String message) {\n\t\tsuper(message);\n\t}", "public VariableNotSetException(String msg) {\n super(msg);\n }", "public VocabularioIOException(String msg)\n {\n message = msg;\n }", "public InstrumenterException(String message) {\r\n super(message);\r\n }", "public DslException(String message, Exception e) {\n\t\tsuper(message, e);\n\t}", "public ConnectionException(String pMessage) {\n super(pMessage);\n }", "public RDISException(String msg) {\n\t\tthis(msg, null);\n\t}", "public CommunicationException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public AditoGitException(String pMessage)\n {\n super(pMessage);\n }", "public OperationException(String message) {\n super(message);\n }", "public ProductIdIsNotValidException(String msg)\r\n\t{\r\n\t\tsuper(msg);\r\n\t}", "public FullCarException(String message) {\r\n super(message);\r\n }", "public InvalidDatumException(String message) {\n \n super(message);\n }" ]
[ "0.71335393", "0.67999786", "0.65879434", "0.65568686", "0.62319964", "0.6031298", "0.5954662", "0.5952979", "0.59056985", "0.5891376", "0.58859587", "0.5844585", "0.57993263", "0.57535225", "0.5735159", "0.57318807", "0.5725102", "0.5641071", "0.5639179", "0.56241953", "0.5604112", "0.56035846", "0.5594056", "0.5575555", "0.5572998", "0.55670065", "0.5547424", "0.5538235", "0.5527754", "0.55264705", "0.55136454", "0.5494212", "0.5493029", "0.5487263", "0.5466146", "0.54528385", "0.54462415", "0.5431203", "0.54179513", "0.5415496", "0.5415383", "0.5406767", "0.5404207", "0.5400996", "0.5396875", "0.53959095", "0.5394359", "0.5386162", "0.53837425", "0.5380923", "0.5375295", "0.5375295", "0.5375295", "0.53687733", "0.5362909", "0.53466827", "0.5343562", "0.53404033", "0.53373516", "0.5335733", "0.53307056", "0.5330523", "0.5328146", "0.53198516", "0.53185666", "0.5315689", "0.5309596", "0.5304325", "0.5298202", "0.52944964", "0.5292138", "0.5291962", "0.52803314", "0.5277435", "0.52757114", "0.52743185", "0.52730495", "0.5266437", "0.5260649", "0.52575415", "0.5244361", "0.5228254", "0.5226338", "0.5224009", "0.52196085", "0.5218816", "0.52182215", "0.52126354", "0.52054465", "0.5202701", "0.5201231", "0.5199934", "0.5199435", "0.5189865", "0.518913", "0.518802", "0.5187967", "0.51800203", "0.51790994", "0.5175214" ]
0.7513908
0
Returns a short description of the ParamException.
public String toString() { return getMessage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ParamException( String msg ) {\n\t\tsuper( msg );\n\t}", "public ParameterException(String message) {\n\t\tsuper(message);\n\t}", "@Override public String toString(){\n return \"Logic Parameter Exception\";\n }", "public ParameterException(String message, Exception e) {\n\t\tsuper(message, e);\n\t}", "public String getParamDesc() {\n return paramDesc;\n }", "public String getParamDesc() {\n return paramDesc;\n }", "public ParameterNotFoundException( String s )\n\t{\n\t\tsuper( s );\n\t}", "public ParameterNotFoundException()\n\t{\n\t\tsuper();\n\t}", "protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);", "public StatsParamException(String toDisplay)\r\n\t{\r\n\t\tsuper(toDisplay);\r\n\t}", "public InvalidParameterValueException(String message) {\n super(message);\n }", "public IllegalParameterException(final String message) {\n super(message);\n }", "BasicException.Parameter getIdParameter();", "public void parameterChangeFailed(ParameterChangeFailEvent e) {\n\n\t\tString S = C + \" : parameterChangeFailed(): \";\n\n\t\tStringBuffer b = new StringBuffer();\n\n\t\tParameter param = (Parameter) e.getSource();\n\n\t\tParameterConstraint constraint = param.getConstraint();\n\t\tString oldValueStr = e.getOldValue().toString();\n\t\tString badValueStr = e.getBadValue().toString();\n\t\tString name = param.getName();\n\n\t\tb.append(\"The value \");\n\t\tb.append(badValueStr);\n\t\tb.append(\" is not permitted for '\");\n\t\tb.append(name);\n\t\tb.append(\"'.\\n\");\n\t\tb.append(\"Resetting to \");\n\t\tb.append(oldValueStr);\n\t\tb.append(\". The constraints are: \\n\");\n\t\tb.append(constraint.toString());\n\n\t\tJOptionPane.showMessageDialog(this, b.toString(),\n\t\t\t\t\"Cannot Change Value\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public String getParam() {\n\t\treturn getTextContent(paramElem);\n\t}", "public Label getParamLabel() {\n\t\treturn paramLabel;\n\t}", "public void setParamDesc(String paramDesc) {\n this.paramDesc = paramDesc;\n }", "public void setParamDesc(String paramDesc) {\n this.paramDesc = paramDesc;\n }", "public InvalidParameterValueException(String message, Throwable cause) {\n super(message, cause);\n }", "public KeywordsParam(String param) throws BadParamException {\r\n\t\tsuper(param);\r\n\t}", "public Param getExperimentParams() throws InvalidFormatException;", "public String getParameterName()\r\n\t{\r\n\t\treturn this.paramName;\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Exception is..\" + msg;\r\n\t}", "protected String getChangeParameterLabel() {\n return \"Add Parameter...\";\n }", "public String getParamName() {\r\n\treturn this.paramName;\r\n }", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public String getParamName () {\n\treturn this.paramName;\n }", "String getParam( String paraName );", "public String getParam() {\n return param;\n }", "public String getParam() {\n return param;\n }", "public Param getSampleParams() throws InvalidFormatException;", "public String getParamAsString(String paramName);", "java.lang.String getParameterValue();", "public org.apache.spark.ml.param.Param<java.lang.String> handleInvalid () { throw new RuntimeException(); }", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "String getInvalidMessage();", "public String getParamCode() {\n return paramCode;\n }", "public String parameterDetails()\r\n\t{\r\n\t\treturn m_ls.parameterDetails();\r\n\t}", "java.lang.String getParameterName();", "public String getParamName() {\n return paramName;\n }", "public String getEcParam() {\r\n return ecParam;\r\n }", "public String getParameter(String name) throws IllegalArgumentException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getParameter() \" \n\t\t+ name);\n Via via=(Via)sipHeader;\n \n if (name == null) throw new\n IllegalArgumentException(\"JAIN-EXCEPTION: null argument\");\n return via.getParameter(name);\n }", "@Override\n public String kind() {\n return \"@param\";\n }", "public ExceptionParamJeu(error type){\r\n\t\tthis.explication = type;\r\n\t}", "private void checkParams() throws InvalidParamException{\r\n String error = svm.svm_check_parameter(this.problem, this.param);\r\n if(error != null){\r\n throw new InvalidParamException(\"Invalid parameter setting!\" + error);\r\n }\r\n }", "public String param() {\n\tif (param_count >= params.size())\n\t return null;\n\treturn (String) params.elementAt(param_count++);\n }", "public String getParameter(Parameter p) {\n\t\treturn parameters.get(p);\n\t}", "@Override\r\n public String toString() {\r\n return \"Parameter Code: \" + this.code + \"\\nDescription: \" + this.description + \"\\nCategory Description: \" + this.categoryDescription;\r\n }", "@Override\r\n\tpublic String getProblemDescription() {\n\t\treturn null;\r\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}", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n parameterName_ = s;\n }\n return s;\n }\n }", "@Override\n public final String toString() {\n return ErrorMessages.invalidOperation(getMessage());\n }", "protected String paramString() {\n return super.paramString() + \",\" + \"caretColor=\" + caretColor + \",\"\n + \"disabledTextColor=\" + disabledTextColor + \",\" + \"editable=\"\n + isEditable + \",\" + \"margin=\" + margin + \",\"\n + \"selectedTextColor=\" + selectedTextColor + \",\"\n + \"selectionColor=\" + selectionColor;\n\n }", "public PDUStringException(String message, StringParameter parameter) {\n super(message);\n this.parameter = parameter;\n }", "public String getParamString() {\n\t\tStringBuilder s = new StringBuilder();\n\t\tif (!((image instanceof SATImage ) ||\n\t\t\t\t(image instanceof IMAImage ))) {\n\t\t\ts.append(super.getParamString());\n\t\t} \n\t\ts.append(stringShort);\n\t\ts.append(\"(\");\n\t\ts.append(\")\");\n\t\treturn s.toString();\n\t}", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"com.cg.Exercise4Exception\"+super.getMessage();\r\n\t}", "public FieldValidatorException(String description)\n {\n super(description);\n }", "public String getParameterName()\n {\n checkPrecondition(hasParameterName(), \"no parameter name\");\n return this.paramName;\n }", "public void setDescription(String paramDesc) {\n\tstrDesc = paramDesc;\n }", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 22 && !try_visit_field(ph, 22) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "public abstract String paramsToString();", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 8 && !try_visit_field(ph, 8) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 32 && !try_visit_field(ph, 32) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "String getCauseException();", "public String getMessage ()\n {\n String message = super.getMessage();\n\n if (message == null && exception != null) {\n return exception.getMessage();\n } else {\n return message;\n }\n }", "public String getParameterName( )\n {\n return _strParameterName;\n }", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n parameterName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 38 && !try_visit_field(ph, 38) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "public java.lang.String getParameterValue() {\n java.lang.Object ref = parameterValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n parameterValue_ = s;\n }\n return s;\n }\n }", "public String parameterComment() {\n return parameterComment;\n }", "public OfferingException(String msg) {\n super(msg);\n }", "public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }", "DescribeParametersResult describeParameters(DescribeParametersRequest describeParametersRequest);", "public String getParamName()\r\n/* 23: */ {\r\n/* 24:59 */ return this.paramName;\r\n/* 25: */ }", "public String getMessage() {\n\t\tif (iCause == null) { return super.getMessage(); }\n\t\treturn super.getMessage() + \"; nested exception is: \\n\\t\" + iCause.toString();\n\t}", "public final org.apache.spark.ml.param.Param<java.lang.String> metricName () { throw new RuntimeException(); }", "public java.lang.String getParameterId() {\n java.lang.Object ref = parameterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n parameterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getException();", "String getException();", "public FieldNotFoundException(String msg) {\n super(msg);\n }", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "@Override\n\tpublic String getMessage() {\n\t\treturn null;\n\t}" ]
[ "0.763778", "0.7018743", "0.67742026", "0.660596", "0.66012716", "0.66012716", "0.65235525", "0.65136385", "0.6504392", "0.65002066", "0.6345382", "0.61296594", "0.60664725", "0.5986146", "0.5975166", "0.59491116", "0.58764344", "0.58764344", "0.584738", "0.5765119", "0.57517385", "0.5729254", "0.5698691", "0.567805", "0.5665502", "0.56633824", "0.5647569", "0.5645747", "0.5639442", "0.5639442", "0.5608515", "0.55989796", "0.55734545", "0.55651367", "0.5563169", "0.556075", "0.5526808", "0.5512423", "0.55042964", "0.5503166", "0.54706913", "0.5469928", "0.54534316", "0.5436036", "0.5428143", "0.5390428", "0.5381186", "0.5372684", "0.5366607", "0.5366327", "0.53158766", "0.5313722", "0.5313496", "0.53115934", "0.53036696", "0.5296069", "0.52847075", "0.52779055", "0.52741313", "0.5268934", "0.5267217", "0.5264163", "0.5259868", "0.52557486", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5252946", "0.5249215", "0.5244287", "0.5237931", "0.52369165", "0.5233087", "0.5220149", "0.5219598", "0.5217564", "0.52170324", "0.52085704", "0.5198565", "0.51946074", "0.5189091", "0.51879156", "0.5183236", "0.51829773", "0.51829773", "0.51809895", "0.51774424", "0.5175073" ]
0.0
-1
loadDataFromDB Uses data from database to fill in the fields in the layout.
public void loadDataFromDB() { if(user == null) { return; } decodeImage(user.getProfilePic(), imageView); usernameTV.setText(user.getUserID()); emailTV.setText(user.getEmail()); followingTV.setText(Integer.toString(user.getFollowingList().size())); followerTV.setText(Integer.toString(user.getNumFollwers())); list.clear(); for (int i = 0; i < user.getNotification().size(); i++) { list.add(user.getNotification().get(i).getString()); } getUsers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }", "private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }", "private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }", "private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }", "protected void loadData()\n {\n }", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "void setDataFromDBContent() {\n\n }", "private void loadData(){\n Dh.refresh();\n }", "void populateData();", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "public void setLoadData() {\n\t\tUserDao userDao = new UserDaoImp();\n\t\tList<User> users = userDao.findAll();\n\t\t\n\t\tMessageDao msgDao = new MessageDaoImp();\n\t\tList<Message> msgs = msgDao.findAll();\n\t\t\n\t\tString userName = \"\";\n\t\tString mensajes = \"\";\n\t\tfor (Message message : msgs) {\n\t\t\t\n\t\t\tfor (User user : users) {\n\t\t\t\tif (user.getId() == message.getUserId())\n\t\t\t\t\tuserName = user.getNombre();\n\t\t\t}\n\t\t\tmensajes += \" By \" + userName + \" - \" + message.getFecha() +\"\\n \"+ message.getMsg() + \"\\n\\n\\n\";\n\t\t}\n\t\ttxtPulls.setText(mensajes);\n\t}", "protected abstract void loadData();", "void loadData();", "void loadData();", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "private void readFromDb() {\n mMonthsList.clear();\n if(mDatabaseHandler.getMonthsList()!=null) {\n mMonthsList = mDatabaseHandler.getMonthsList();\n setMonthListAdapter(mMonthsList);\n }\n else\n LoggerUtility.makeShortToast(HomeActivity.this,getString(R.string.error_empty_database));\n }", "private void populate() {\r\n \tSharedPreferences settings = getSharedPreferences(TEMP, 0);\r\n \tLong tempId = settings.getLong(DbAdapter.KEY_ROWID, -1);\r\n \tif (tempId != null && tempId.equals(mRowId)) {\r\n \t\t// load from properties\r\n \tmTime = settings.getLong(DbAdapter.KEY_DATE, -1);\r\n \tDate date = new Date();\r\n \tDateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());\r\n \tString text = dateFormat.format(date);\r\n \tmDatePickerText.setText(text);\r\n \tmPayeeText.setText(settings.getString(DbAdapter.KEY_PAYEE, \"\"));\r\n \tmAmountText.setText(settings.getString(DbAdapter.KEY_AMOUNT, \"\"));\r\n \tmCategoryText.setText(settings.getString(DbAdapter.KEY_CATEGORY, \"\"));\r\n \tmMemoText.setText(settings.getString(DbAdapter.KEY_MEMO, \"\"));\r\n \tmTagText.setText(settings.getString(DbAdapter.KEY_TAG, \"\"));\r\n \t} else if (mRowId != null) {\r\n \t// load existing from db\r\n \tmDbHelper.open();\r\n \tCursor cursor = mDbHelper.fetch(mRowId);\r\n \tstartManagingCursor(cursor);\r\n \tDate date = new Date();\r\n \tmTime = cursor.getLong(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_DATE));\r\n \tDateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getApplicationContext());\r\n \tString text = dateFormat.format(date);\r\n \tmDatePickerText.setText(text);\r\n \tmPayeeText.setText(cursor.getString(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_PAYEE)));\r\n \tmAmountText.setText(cursor.getString(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_AMOUNT)));\r\n \tmCategoryText.setText(cursor.getString(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_CATEGORY)));\r\n \tmMemoText.setText(cursor.getString(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_MEMO)));\r\n \tmTagText.setText(cursor.getString(\r\n \t\t\tcursor.getColumnIndexOrThrow(DbAdapter.KEY_TAG)));\r\n \tmDbHelper.close();\r\n } else { // new entry\r\n\t\t\tsetToday();\r\n\t\t\tupdateDate();\r\n }\r\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "private void fetchDataFromDatabase() {\n\n listOfPersons.clear();\n Cursor cursor = AppDatabase.getInstance(context).getPersonList();\n if (cursor != null && cursor.moveToFirst()) {\n do {\n String firstName = cursor.getString(cursor.getColumnIndex(\"firstName\"));\n String lastName = cursor.getString(cursor.getColumnIndex(\"lastName\"));\n String email = cursor.getString(cursor.getColumnIndex(\"email\"));\n String dob = cursor.getString(cursor.getColumnIndex(\"dobDate\"));\n String phoneNumber = cursor.getString(cursor.getColumnIndex(\"phoneNumber\"));\n String pictureUrl = cursor.getString(cursor.getColumnIndex(\"pictureMediumUrl\"));\n String pictureImageData = cursor.getString(cursor.getColumnIndex(\"pictureImageData\"));\n String fullName = firstName + \" \" + lastName;\n Bitmap imageBitmap = UtilFunctions.stringToBitmap(pictureImageData);\n\n PersonWrapper person = new PersonWrapper(fullName, email, dob, phoneNumber, pictureUrl, imageBitmap);\n listOfPersons.add(person);\n\n } while (cursor.moveToNext());\n }\n\n initView(listOfPersons);\n }", "private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}", "private void loadDataFromDBJSON() {\n loadCriteriaList();\n loadCriteriaLeft();\n Button btnNextEnable = (Button) findViewById(R.id.btnNext);\n btnNextEnable.setEnabled(true);\n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "private void loadDatabase(){\n \t\n String db = jFieldDBFile.getText().trim();\n boolean badzip = false;\n \n Collection<String> zf = new LinkedList<String>();\n \n // handle zipcodes if zip filtering specified\n if(jCheckBoxZipFilter.isSelected()){\n\t \n \tString zips = jTextFieldZipcodes.getText().trim();\n\t \n\t String[] z = zips.split(\",\");\n\t for(int i = 0; i < z.length; i++){\n\t \tzf.add(z[i].trim());\n\t }\n\t \n\t for(String s : zf){\n\t \tif(s.length() != 5){\n\t \t\tbadzip = true;\n\t \t}\n\t \ttry{\n\t \t\tInteger.parseInt(s);\n\t \t}catch(NumberFormatException ex){\n\t \t\tbadzip = true;\n\t \t}\n\t }\n\t \n }\n \n // if the zipcode input is bad\n if(badzip){\n \toutputResults(\"Please check your zipcodes.\\nA zipcode must be a 5 digit number...\\n\");\n \tjButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n \tjButtonDBLoad.setText(\"Check Zipcodes\");\n }else{\n\t // attempt to load database\n\t try{\n\t \t\n\t \tif(DEBUG_SETDB) db = DEBUG_DB;\n\t \t\n\t \tjButtonDBLoad.setForeground(Color.BLACK);\n\t \tjButtonDBLoad.setText(\"Loading...\");\n\t \tvirtualGPS = DirectionsFinder.getDirectionsFinder(db, zf);\n\t jButtonDBLoad.setText(\"Load Database\");\n\t \n\t \tjPanelAddr.setVisible(true);\n\t \tjPanelDB.setVisible(false);\n\t jButtonDBToAddr.setVisible(true);\n\t \t\n\t }catch(InvalidDatabaseException ex){\n\t \toutputResults(\"Please check the database path.\\nThe path name must refer \" +\n\t \t\t\t\"to a valid Tiger Database...\\n\");\n\t jButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n\t jButtonDBLoad.setText(\"Check Database\");\n\t }\n }\n \t\n }", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void loadLabelData(){\n try {\n QueryManager Query = new QueryManager();\n String query = \"SELECT * FROM users where username = '\"\n + LoginController.username + \"';\"; // get data from user table using username used for logged in\n ResultSet rs = Query.getDataQuery(query);\n\n if (rs.next()) {\n txtFirstname.setText(rs.getString(\"firstname\"));\n txtLastname.setText(rs.getString(\"lastname\"));\n txtEmailAddress.setText(rs.getString(\"email\"));\n txtDefUsername.setText(rs.getString(\"username\"));\n String date = (rs.getString(\"dob\"));\n if (date.equalsIgnoreCase(\"none\")) {\n dobPicker.setPromptText(\"Date of Birth\");\n } else {\n dobPicker.setValue(LocalDate.parse(date));\n }\n txtPNum.setText(rs.getString(\"contact\"));\n String gender = rs.getString(\"gender\");\n if (gender.equalsIgnoreCase(\"female\")) {\n radFemale.setSelected(true);\n radMale.setSelected(false);\n } else {\n radFemale.setSelected(false);\n radMale.setSelected(true);\n }\n System.out.println(\"We in\");\n }\n } catch (SQLException ex) {\n Logger.getLogger(LoginDetailsController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void loadDescribedTemplateData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> DescribedTemplateCore.loadDescribedTemplateData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n try {\r\n String strDTNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n\r\n // acquire described template info; note: template to described_template is 1 to many, so from described_template to template is 1:1\r\n resultSet = statement.executeQuery( \"SELECT fk_version_set, fk_template, description_hash, synchronized, hash, enabled, steps \" +\r\n \"FROM described_template \" +\r\n \"JOIN template ON fk_template = pk_template \" +\r\n \"WHERE pk_described_template = \" + strDTNum );\r\n\r\n if ( resultSet.next() ) {\r\n dbDescribedTemplate.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n dbDescribedTemplate.fk_template = resultSet.getLong(\"fk_template\");\r\n dbDescribedTemplate.description_hash = resultSet.getBytes(\"description_hash\");\r\n dbDescribedTemplate.dtSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.template_hash = resultSet.getBytes(\"hash\");\r\n dbDescribedTemplate.enabled = resultSet.getBoolean(\"enabled\");\r\n dbDescribedTemplate.steps = resultSet.getString(\"steps\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads data from described template record \" + pk_described_template);\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n } else {\r\n throw new Exception(\"described template data not present\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // acquire matching run info\r\n try {\r\n String strTemplateNum = String.valueOf(dbDescribedTemplate.fk_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_run, artifacts, start_time, ready_time, end_time, passed \" +\r\n \"FROM run \" +\r\n \"WHERE fk_template = \" + strTemplateNum );\r\n while ( resultSet.next() ) {\r\n DBRun dbRun = new DBRun(resultSet.getLong(\"pk_run\"));\r\n dbRun.artifacts = resultSet.getBytes(\"artifacts\");\r\n dbRun.start_time = resultSet.getDate(\"start_time\");\r\n dbRun.ready_time = resultSet.getDate(\"ready_time\");\r\n dbRun.end_time = resultSet.getDate(\"end_time\");\r\n dbRun.passed = resultSet.getBoolean(\"passed\");\r\n dbDescribedTemplate.pkdtToDBRun.put(pk_described_template, dbRun);\r\n System.out.println(\" <internal> TemplateCore.loadTemplateData() loads data from described_template-matched run record \" + dbRun.pk_run);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n \r\n // acquire matching test_instance info; note: described_template to test_instance is 1:1\r\n try {\r\n String strDescribedTemplateNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_test_instance, fk_run, due_date, phase, synchronized \" +\r\n \"FROM test_instance \" +\r\n \"WHERE fk_described_template = \" + strDescribedTemplateNum);\r\n while ( resultSet.next() ) {\r\n DBTestInstance dbTestInstance = new DBTestInstance(resultSet.getLong(\"pk_test_instance\"));\r\n dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n dbTestInstance.iSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.pkdtToDBTestInstance.put(pk_described_template, dbTestInstance);\r\n System.out.println(\" <internal> TemplateCore.loadDescribedTemplateData() loads data from described_template-matched test_instance record \" + dbTestInstance.pk_test_instance);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n\r\n // acquire corresponding multiple lines of data\r\n try {\r\n String strPKDT = String.valueOf(dbDescribedTemplate.pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n \"FROM dt_line \" +\r\n \"WHERE fk_described_template = \" + strPKDT );\r\n while ( resultSet.next() ) {\r\n DBDTLine dtLine = new DBDTLine();\r\n dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n dtLine.line = resultSet.getInt(\"line\");\r\n dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n\r\n dbDescribedTemplate.pkdtToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n \"FROM artifact_to_dt_line \" +\r\n \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n \"WHERE fk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n dtLine.reason = resultSet.getString(\"reason\");\r\n dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding version information; not every dtLine has corresponding version information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n \"FROM version \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.version = resultSet.getString(\"version\");\r\n dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding content information; not every dtLine has corresponding content information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n \"FROM content \" +\r\n \"JOIN artifact ON fk_content = pk_content \" +\r\n \"WHERE pk_artifact = \" + strPKArtifact );\r\n if ( resultSet.next() ) {\r\n dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding component information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT name \" +\r\n \"FROM component \" +\r\n \"JOIN version ON fk_component = pk_component \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.componentName = resultSet.getString(\"name\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n }\r\n\r\n // get corresponding resource information; not every dtLine has corresponding resource information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n \"FROM dt_line \" +\r\n \"JOIN resource ON fk_resource = pk_resource \" +\r\n \"WHERE pk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n dtLine.resourceName = resultSet.getString(\"name\");\r\n dtLine.resourceDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n }", "private void initData(View view) {\n /*\n * the array of item which need to show in gridview\n * it contains string and a picture\n * */\n ArrayList<HashMap<String, Object>> mList = new ArrayList<HashMap<String, Object>>();\n\n\n /**\n * download info from local database\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n Cursor cursor = contentResolver.query(uri, null, null, null, null);\n if (cursor != null) {\n while (cursor.moveToNext()) {\n HashMap<String, Object> map = new HashMap<String, Object>();\n String bookname = cursor.getString(cursor.getColumnIndex(\"name\"));\n map.put(\"image\", mImgUrl+\"bookimg_\"+bookname+\".png\");\n map.put(\"text\", bookname);\n mList.add(map);\n }\n /**\n * use the new data to show in gridview\n * */\n initGridView(view, mList);\n }\n cursor.close();\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "private void addLoad() {\n\n\t\ttry {\n\t\t\tString company_name = company_name_txtfield.getText();\n\t\t\tString company_phone = company_phone_txtfield.getText();\n\t\t\tString pickup_name_of_place = pickup_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_street_address = pickup_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_city = pickup_city_txtfield.getText();\n\t\t\tString pickup_state = pickup_state_txtfield.getText();\n\t\t\tString pickup_zip_code = pickup_zipcode_txtfield.getText();\n\t\t\tString delivery_name_of_place = delivery_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_street_address = delivery_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_city = delivery_city_txtfield.getText();\n\t\t\tString delivery_state = delivery_state_txtfield.getText();\n\t\t\tString delivery_zip_code = delivery_zipcode_txtfield.getText();\n\t\t\tString pickup_date = Utils.getDate(pickup_date_field);// pickup_date_field.getDate().toString();\n\t\t\tString delivery_date = Utils.getDate(delivery_date_field);// delivery_date_field.getDate().toString();\n\t\t\tString driver_assigned = driver_assigned_combolist\n\t\t\t\t\t.getSelectedItem().toString();\n\t\t\tString status = status_combolist.getSelectedItem().toString();\n\t\t\tString driver_assigned_id = driver_assigned.split(\"/\")[0];\n\t\t\tString driver_assigned_name = driver_assigned.split(\"/\")[1];\n\n\t\t\tLoadBean bean = new LoadBean();\n\t\t\tbean.setCompany_name(company_name);\n\t\t\tbean.setCompany_phone(company_phone);\n\t\t\tbean.setPickup_name_of_place(pickup_name_of_place);\n\t\t\tbean.setPickup_street_address(pickup_street_address);\n\t\t\tbean.setPickup_state(pickup_state);\n\t\t\tbean.setPickup_city(pickup_city);\n\t\t\tbean.setPickup_zip_code(pickup_zip_code);\n\t\t\tbean.setPickup_date(pickup_date);\n\t\t\tbean.setDelivery_date(delivery_date);\n\t\t\tbean.setDelivery_name_of_place(delivery_name_of_place);\n\t\t\tbean.setDelivery_state(delivery_state);\n\t\t\tbean.setDelivery_street_address(delivery_street_address);\n\t\t\tbean.setDelivery_city(delivery_city);\n\t\t\tbean.setDelivery_zip_code(delivery_zip_code);\n\t\t\tbean.setDriver_assigned_id(driver_assigned_id);\n\t\t\tbean.setDriver_assigned_name(driver_assigned_name);\n\t\t\tbean.setStatus(status);\n\n\t\t\tif (DatabaseManager.getInstance() != null) {\n\t\t\t\tif (DbConnectionManager.getConnection() != null) {\n\t\t\t\t\tboolean flag = DatabaseManager.getInstance().insertLoad(\n\t\t\t\t\t\t\tDbConnectionManager.getConnection(), bean);\n\t\t\t\t\tif (flag) {\n\t\t\t\t\t\tframe.updateLoadList();\n\t\t\t\t\t\tAddLoadInformations.this.dispose();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.infoBox(\"DB Connection Error\", \"Connection Error\");\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}", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "public abstract void loadData();", "public abstract void loadData();", "private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }", "public abstract void loadFromDatabase();", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "public void load2() throws Exception {\n String query = \"select * from catalog_snapshot where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_item_id = '\" + this.fac_item_id + \"'\";\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setItemId( (int) rs.getInt(\"ITEM_ID\"));\n setFacItemId(rs.getString(\"FAC_ITEM_ID\"));\n setMaterialDesc(rs.getString(\"MATERIAL_DESC\"));\n setGrade(rs.getString(\"GRADE\"));\n setMfgDesc(rs.getString(\"MFG_DESC\"));\n setPartSize( (float) rs.getFloat(\"PART_SIZE\"));\n setSizeUnit(rs.getString(\"SIZE_UNIT\"));\n setPkgStyle(rs.getString(\"PKG_STYLE\"));\n setType(rs.getString(\"TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"PRICE\")));\n setShelfLife( (float) rs.getFloat(\"SHELF_LIFE\"));\n setShelfLifeUnit(rs.getString(\"SHELF_LIFE_UNIT\"));\n setUseage(rs.getString(\"USEAGE\"));\n setUseageUnit(rs.getString(\"USEAGE_UNIT\"));\n setApprovalStatus(rs.getString(\"APPROVAL_STATUS\"));\n setPersonnelId( (int) rs.getInt(\"PERSONNEL_ID\"));\n setUserGroupId(rs.getString(\"USER_GROUP_ID\"));\n setApplication(rs.getString(\"APPLICATION\"));\n setFacilityId(rs.getString(\"FACILITY_ID\"));\n setMsdsOn(rs.getString(\"MSDS_ON_LINE\"));\n setSpecOn(rs.getString(\"SPEC_ON_LINE\"));\n setMatId( (int) rs.getInt(\"MATERIAL_ID\"));\n setSpecId(rs.getString(\"SPEC_ID\"));\n setMfgPartNum(rs.getString(\"MFG_PART_NO\"));\n\n //trong 3-27-01\n setCaseQty(BothHelpObjs.makeZeroFromNull(rs.getString(\"CASE_QTY\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void loadComicData() {\n int comicID = mainActivity.ISSUE_ID;\n issueCheck(comicID);\n\n //Set main activity comic id to -1\n mainActivity.ISSUE_ID = -1;\n\n //Query db\n comic = dbHandler.getComicById(comicID);\n\n //Load text views\n txtViewTitle.setText(comic.getComicTitle());\n txtViewVolume.setText(\"Volume: \" + comic.getComicVolume());\n txtViewIssue.setText(\"Issue: \" + comic.getComicIssue());\n txtViewPublisher.setText(comic.getComicPublisherName());\n txtViewCoverPrice.setText(comic.getComicCoverPrice());\n txtViewCondition.setText(comic.getComicConditionText());\n txtViewFormat.setText(comic.getComicFormat().toString());\n txtViewNotes.setText(comic.getComicNotes());\n\n imgViewCover.setImageBitmap(FileUtils.getCoverImage(comic.getComicCoverImage(), getActivity()));\n\n loadRecycler(comic.getComicCreators());\n\n }", "private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\n\t}", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "private void loadData() {\n columnName = new String[]{\"姓名\", \"邮箱\"};\n adlMainVector = new Vector<Vector<String>>();\n adlmainTableModel = new AbstractTableModel() { // 实现表格抽象类的接口\n\n private static final long serialVersionUID = 500000L;\n\n @Override\n public Class<? extends Object> getColumnClass(int c) // 获取列标所对的类\n {\n return getValueAt(0, c).getClass();\n }\n\n @Override\n public int getColumnCount() { // 获取列数\n return columnName.length;\n }\n\n @Override\n public String getColumnName(int column) // 获取列标\n {\n return columnName[column];\n }\n\n @Override\n public int getRowCount() { // 获取行数\n return adlMainVector.size();\n }\n\n @Override\n public Object getValueAt(int row, int column) { // 获取row行column列的值\n if (!adlMainVector.isEmpty()) {\n return ((Vector<?>) adlMainVector.elementAt(row)).elementAt(column);\n } else {\n return null;\n }\n }\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n\n @Override\n public void setValueAt(Object value, int row, int column) // 设定row行column列的值\n {\n }\n };\n EmailTable.setModel(adlmainTableModel);\n EmailTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n listShow(\"Select * From ADDRESSLISTTABLE ORDER BY ID+10000\");\n }", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "private void importData() {\n // if alarmAdapter null it's means data have not imported, yet or database is empty\n if (alarmAdapter == null) {\n // initialize database manager\n dataBaseManager = new DataBaseManager(this);\n // get Alarm ArrayList from database\n ArrayList<Alarm> arrayList = dataBaseManager.getAlarmList();\n // create Alarm adapter to display detail through RecyclerView\n alarmAdapter = new AlarmAdapter(arrayList, this);\n\n }\n }", "private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "public static void populateData() {\n\n }", "private void fillData() {\n table.setRowList(data);\n }", "private void loadFieldGuideData() {\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.d(TAG, \"Loading data via loadData()\");\n\t\t\t\t\t\tloadData();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}", "private void initdata() {\n\t\tProgressDialogUtil.showProgressDlg(this, \"加载数据\");\n\t\tProdDetailRequest req = new ProdDetailRequest();\n\t\treq.id = prodInfo.id+\"\";\n\t\tRequestParams params = new RequestParams();\n\t\ttry {\n\t\t\tparams.setBodyEntity(new StringEntity(req.toJson()));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew HttpUtils().send(HttpMethod.POST, Api.GETGOODSDETAIL, params, new RequestCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tT.showNetworkError(CommodityInfosActivity.this);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> resp) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tProdDetailResponse bean = new Gson().fromJson(resp.result, ProdDetailResponse.class);\n\t\t\t\tLog.e(\"\", \"\"+resp.result);\n\t\t\t\tif(Api.SUCCEED == bean.result_code && bean.data != null) {\n\t\t\t\t\tupview(bean.data);\n\t\t\t\t\tdatas = bean.data;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void loadData (){\n\t\tImageView profilepict = (ImageView) findViewById(R.id.profilepict);\t\t\n\t\tTextView nickname = (TextView) findViewById(R.id.nickname);\n\t\tTextView alliance = (TextView) findViewById(R.id.alliance);\n\t\tTextView level = (TextView) findViewById(R.id.level);\n\t\tTextView dollars = (TextView) findViewById(R.id.bedollars);\n\t\tTextView bescore = (TextView) findViewById(R.id.salary);\n\t\tLinearLayout contestsContainer = (LinearLayout) findViewById(R.id.contests);\n\t\tif(currentPlayer.getUser() != null){\t\t\t\n\t\t\tprofilepict.setTag(currentPlayer.getUser().getUserimg());\n\t\t\timageManager.displayImage(currentPlayer.getUser().getUserimg(), context, profilepict);\t\t\t\n\t\t\tnickname.setText(currentPlayer.getUser().getNickname());\n\t\t\tlevel.setText(getContext().getString(R.string.profileLevel)+fromIntToLevel(currentPlayer.getUser().getLevel()));\n\t\t\tdollars.setText(\"Bedollars: \"+currentPlayer.getUser().getBedollars());\n\t\t\tbescore.setText(\"Bescore: \"+currentPlayer.getUser().getBescore());\n\t\t}else{\n\t\t\tnickname.setText(\"Player\");\n\t\t\tlevel.setVisibility(View.INVISIBLE);\n\t\t\tdollars.setVisibility(View.INVISIBLE);\n\t\t\tprofilepict.setImageResource(R.drawable.profbt);\n\t\t}\n\t\tif(currentPlayer.getAlliance() != null){\n\t\t\talliance.setText(currentPlayer.getAlliance().getName());\n\t\t}else{\n\t\t\talliance.setVisibility(View.GONE);\n\t\t}\t\t\t\n\t\t\n\t\tMap<String, PlayerScore> playerScore = currentPlayer.getPlayerScore();\n\t\t\n\t\tif(playerScore != null) { // THE USER HAS SCORES FOR THE APP\n\t\t\tIterator<?> it = playerScore.entrySet().iterator();\n\t\t while (it.hasNext()) {\t\t\t \t\n\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\tMap.Entry<String, PlayerScore> pairs = (Map.Entry<String, PlayerScore>) it.next();\n\t\t if(pairs.getValue().getContest().isPublic()){\n\t\t\t PlayerScore pscore = pairs.getValue();\n\t\t\t \n\t\t\t LinearLayout contestsRow = new LinearLayout(getContext());\n\t\t\t LinearLayout contestsNameFeed = new LinearLayout(getContext());\n\t\t\t LinearLayout contests = new LinearLayout(getContext());\n\t\t\t LinearLayout grayLine = new LinearLayout(getContext());\n\t\t\t LinearLayout grayLine2 = new LinearLayout(getContext());\n\t\t\t \n\t\t\t contestsRow.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contestsRow.setOrientation(LinearLayout.VERTICAL);\n\t\t\t contestsNameFeed.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contestsNameFeed.setOrientation(LinearLayout.VERTICAL);\t\t\n\t\t\t contestsNameFeed.setPadding(12,5,0,5);\n\t\t\t contestsNameFeed.setBackgroundDrawable(new BDrawableGradient(0,(int)(ratio*27),BDrawableGradient.GRAY_GRADIENT));\t\t\t \n\t\t\t contests.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contests.setOrientation(LinearLayout.HORIZONTAL);\t\t\n\t\t\t contests.setPadding(12,5,0,5);\n\t\t\t grayLine.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,1));\n\t\t\t grayLine.setBackgroundColor(Color.parseColor(\"#8F9193\"));\t\t\t \n\t\t\t grayLine2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,1));\n\t\t\t grayLine2.setBackgroundColor(Color.parseColor(\"#8F9193\"));\n\t\t\t \n\t\t\t \n\t\t\t TextView contestName = new TextView(getContext());\t\t\t\t \n\t\t\t TextView feedData = null;\n\t\t\t TextView totalScore = new TextView(getContext());\n\t\t\t TextView lastScore = new TextView(getContext());\n\t\t\t TextView bestScore = new TextView(getContext());\n\t\t\t \n\t\t\t contestName.setText(pscore.getContest().getName());\n\t\t\t contestName.setTextColor(Color.BLACK);\t \t\t\t \n\t\t\t contestsNameFeed.addView(contestName);\n\t\t\t \n\t\t\t String feed = pscore.getContest().getFeed();\t\t\t \n\t\t\t if(feed != null){\n\t\t\t \tfeedData = new TextView(getContext());\n\t\t\t \tfeedData.setTextColor(Color.parseColor(\"#6E6E6E\"));\t \t\t\t \t\t\t\t\t \n\t\t\t \tfeedData.setText(feed);\n\t\t\t \tcontestsNameFeed.addView(feedData);\n\t\t\t \tcontestsNameFeed.setBackgroundDrawable(new BDrawableGradient(0,(int)(ratio*60),BDrawableGradient.GRAY_GRADIENT));\n\t\t\t }\n\t\t\t \n\t\t\t //totalScore.setPadding(15,5,0,5);\n\t\t\t totalScore.setText(getContext().getString(R.string.profileTotalScore)+pscore.getBalance());\n\t\t\t totalScore.setTextSize(12);\n\t\t\t totalScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \n\t\t\t lastScore.setPadding(10,0,0,0);\n\t\t\t lastScore.setText(getContext().getString(R.string.profileLastScore)+pscore.getLastscore());\n\t\t\t lastScore.setTextSize(12);\n\t\t\t lastScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \n\t\t\t bestScore.setPadding(10,0,0,0);\n\t\t\t bestScore.setText(getContext().getString(R.string.profileBestScore)+pscore.getBestscore());\n\t\t\t bestScore.setTextSize(12);\n\t\t\t bestScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \t\t\t\t \n\t\t\t \n\t\t\t contestsRow.addView(contestsNameFeed);\n\t\t\t contestsRow.addView(grayLine);\n\t\t\t contests.addView(totalScore);\t\t\t \n\t\t\t contests.addView(lastScore);\n\t\t\t contests.addView(bestScore);\n\t\t\t contestsRow.addView(contests);\n\t\t\t contestsRow.addView(grayLine2);\n\t\t\t \n\t\t\t contestsContainer.addView(contestsRow);\t\t\t \n\t\t }\n\t\t }\n\t\t}else { // NO SCORES FOR THE APP\n\t\t\tif(currentSection == CURRENT_USER_PROFILE){\n\t\t\t\tTextView noScores = new TextView(getContext());\n\t\t\t\tnoScores.setText(getContext().getString(R.string.profileNoScores));\n\t\t\t\tnoScores.setPadding(5,10,0,2);\n\t\t\t\tnoScores.setTextColor(Color.BLACK);\n\t\t\t\tcontestsContainer.addView(noScores);\t\n\t\t\t}\n\t\t} \n\t\t\n\t\tLinearLayout mc = (LinearLayout) findViewById(R.id.maincontainer);\n\t\tLinearLayout l = (LinearLayout) findViewById(R.id.loading);\n\t\tmc.removeView(l);\t\t\n\t\tLinearLayout gc = (LinearLayout) findViewById(R.id.goodcontent);\n\t\tgc.setVisibility(LinearLayout.VISIBLE);\n\t}", "@Override\n\tpublic D loadInBackground() {\n\t\tmData = createData();\n\t\treturn mData;\n\t}", "private void loadDataFromDatabase(){\n //get database connection\n DeezerOpener deezerOpener = new DeezerOpener(this);\n db = deezerOpener.getWritableDatabase();\n\n //define columns and create cursor\n String [] columns = {DeezerOpener.COL_ID, DeezerOpener.COL_ARTIST, DeezerOpener.COL_TITLE, DeezerOpener.COL_ALBUM, DeezerOpener.COL_DUR, DeezerOpener.COL_COVER};\n Cursor results = db.query( DeezerOpener.TABLE_NAME, columns, null, null, null, null, null);\n\n //get column indices\n int idColIndex = results.getColumnIndex(DeezerOpener.COL_ID);\n int artistColIndex = results.getColumnIndex(DeezerOpener.COL_ARTIST);\n int titleColIndex = results.getColumnIndex(DeezerOpener.COL_TITLE);\n int albumColIndex = results.getColumnIndex(DeezerOpener.COL_ALBUM);\n int durColIndex = results.getColumnIndex(DeezerOpener.COL_DUR);\n int coverColIndex = results.getColumnIndex(DeezerOpener.COL_COVER);\n\n //loop through the database obtaining data\n while(results.moveToNext()){\n long id = results.getLong(idColIndex);\n String artistDB = results.getString(artistColIndex);\n String titleDB = results.getString(titleColIndex);\n String albumDB = results.getString(albumColIndex);\n int durationDB = results.getInt(durColIndex);\n String coverURL_DB = results.getString(coverColIndex);\n\n //create the cover Bitmap\n Bitmap coverDB = getBitmapFromURL(coverURL_DB);\n\n //add to favourites list\n deezerFavList.add(new DeezerSong(titleDB, albumDB, artistDB, coverURL_DB, coverDB, durationDB, id));\n }\n }", "private void displayData() {\n dataBase = mHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"\n + DbHelper.TABLE_NAME, null);\n\n userId.clear();\n user_fName.clear();\n user_lName.clear();\n user_size.clear();\n user_pay.clear();\n user_produce.clear();\n user_genre.clear();\n if (mCursor.moveToFirst()) {\n do {\n userId.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_ID)));\n user_fName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_FNAME)));\n user_lName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_LNAME)));\n user_size.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_SIZE)));\n user_pay.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PAY)));\n user_produce.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PRODUCE)));\n user_genre.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_GENRE)));\n\n } while (mCursor.moveToNext());\n }\n DisplayAdapter disadpt = new DisplayAdapter(DisplayActivity.this, userId, user_fName, user_lName, user_size, user_pay, user_produce, user_genre);\n userList.setAdapter(disadpt);\n mCursor.close();\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "private void fillData()\r\n\t{\n\t\tif(mManager.getLoader(LOADER_LOG) != null && !mManager.getLoader(LOADER_LOG).isReset())\r\n\t\t{\r\n\t\t\tmManager.restartLoader(LOADER_LOG, null, this);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmManager.initLoader(LOADER_LOG, null, this);\r\n\t\t}\r\n\t\t\r\n\t\tif(selectMode != WorkoutMode.Tactical)\r\n\t\t{\r\n\t\t\tif(mManager.getLoader(LOADER_LOG_CARDIO) != null && !mManager.getLoader(LOADER_LOG_CARDIO).isReset())\r\n\t\t\t{\r\n\t\t\t\tmManager.restartLoader(LOADER_LOG_CARDIO, null, this);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmManager.initLoader(LOADER_LOG_CARDIO, null, this);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tboolean ok = true;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(selectMode == WorkoutMode.Tactical || this.dayMode ==WorkoutMode.Tactical)\r\n\t\t\t{\r\n\t\t\t\tlogAdapter = new LogAdapter(this, null, // mGroupCursor,\r\n\t\t\t\t\t\tR.layout.log_ex_name,\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE},\r\n\t\t\t\t\t\tnew int[]{R.id.ex_name},\r\n\t\t\t\t\t\tR.layout.log_tacktical_details,\t\t\t\t\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE, DBAdapter.COL_LAPS},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_name,R.id.txt_laps});\t\r\n\t\t\t\t\r\n\t\t\t\t//Hide cardio\r\n\t\t\t\thideCardio();\r\n\t\t\t}\r\n\t\t\telse //weigh + cardio, only weight; only cardio; \r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tlogAdapter = new LogAdapter(this, null, // mGroupCursor,\r\n\t\t\t\t\t\tR.layout.log_ex_name,\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE},\r\n\t\t\t\t\t\tnew int[]{R.id.ex_name},\r\n\t\t\t\t\t\tR.layout.log_ex_details,\t\t\t\t\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_SET_NUM, DBAdapter.COL_REPS,DBAdapter.COL_WEIGHT,DBAdapter.COL_UNITS},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_set,R.id.txt_reps,R.id.txt_wt,R.id.txt_units});\r\n\t\t\t\t\r\n\t\t\t\tcardioAdapter = new SimpleCursorAdapter(this, R.layout.log_item_cardio,null,\r\n\t\t\t\t\t\tnew String[]{ DBAdapter.COL_DISTANCE, DBAdapter.COL_UNITS, DBAdapter.COL_EQUIPMENT,DBAdapter.COL_TIME},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_cardio_dist,R.id.txt_cardio_units,R.id.img_cardio,R.id.txt_cardio_time}, \r\n\t\t\t\t\t\tCursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);\r\n\t\t\t\t\r\n\t\t\t\tListView cardioList = (ListView)findViewById(R.id.list_log_cardio);\r\n\t\t\t\tcardioList.setAdapter(cardioAdapter);\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tok = false;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif(ok){\r\n\t\t\tsetListAdapter(logAdapter);\r\n//\t\t\tfinal int cnt =logAdapter.getGroupCount();\r\n//\t\t\tfor(int i=0; i < cnt; i++)\r\n//\t\t\t{\r\n//\t\t\t\tlist.expandGroup(i);\r\n//\t\t\t}\r\n\t\t}\r\n\t\t//getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.group_selector));\r\n\t}", "private void loadData() {\n reminderData.loadDataFromSharedPreferences();\n reminderText.setText(reminderData.getNotificationText());\n timePicker.setMinute(reminderData.getMinutes());\n timePicker.setHour(reminderData.getHours());\n }", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "private void loadTestInstanceData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> TemplateCore.loadTestInstanceData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n// try {\r\n// String strINum = String.valueOf(pk_test_instance);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT fk_described_template, fk_run, due_date, phase, test_instance.synchronized, fk_version_set, fk_template, description_hash, described_template.synchronized, hash, enabled, steps \" +\r\n// \"FROM test_instance \" +\r\n// \"JOIN described_template ON fk_described_template = pk_described_template \" +\r\n// \"JOIN template ON fk_template = pk_test_instance \" +\r\n// \"WHERE pk_test_instance = \" + strINum );\r\n // everything in this query is 1:1 relationship, so resultSet has exactly 1 or 0 entry\r\n\r\n// if ( resultSet.next() ) {\r\n// dbTestInstance.pk_described_template = resultSet.getLong(\"fk_described_template\"); // null entry returns 0\r\n// dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n// dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n// dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n// dbTestInstance.iSynchronized = resultSet.getBoolean(\"test_instance.synchronized\");\r\n//\r\n// dbTestInstance.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n// dbTestInstance.fk_template = resultSet.getLong(\"fk_template\"); // null entry returns 0\r\n// dbTestInstance.description_hash = resultSet.getBytes(\"description_hash\");\r\n// dbTestInstance.dtSynchronized = resultSet.getBoolean(\"described_template.synchronized\");\r\n//\r\n// dbTestInstance.template_hash = resultSet.getBytes(\"hash\");\r\n// dbTestInstance.enabled = resultSet.getBoolean(\"enabled\");\r\n// dbTestInstance.steps = resultSet.getString(\"steps\");\r\n//\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads 1:1 data from test_instance \" + dbTestInstance.pk_test_instance + \", pk_described_template \" + dbTestInstance.pk_described_template +\r\n// \", pk_test_instance \" + dbTestInstance.fk_template + (dbTestInstance.fk_run!=0 ? \", TEST RESULT ALREADY STORED\" : \"\"));\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// } else {\r\n// throw new Exception(\"instance data not present\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n//\r\n// // get corresponding multiple lines of data\r\n// try {\r\n// String strPKDT = String.valueOf(dbTestInstance.pk_described_template);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n// \"FROM dt_line \" +\r\n// \"WHERE fk_described_template = \" + strPKDT );\r\n// while ( resultSet.next() ) {\r\n// DBDTLine dtLine = new DBDTLine();\r\n// dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n// dtLine.line = resultSet.getInt(\"line\");\r\n// dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// dbTestInstance.pkToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n//\r\n// // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n// \"FROM artifact_to_dt_line \" +\r\n// \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n// \"WHERE fk_dt_line = \" + strPKDTLine );\r\n// if ( resultSet.next() ) {\r\n// dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n// dtLine.reason = resultSet.getString(\"reason\");\r\n// dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n// dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding version information; not every dtLine has corresponding version information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKVersion = String.valueOf(dtLine.pk_version);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n// \"FROM version \" +\r\n// \"WHERE pk_version = \" + strPKVersion );\r\n// if ( resultSet.next() ) {\r\n// dtLine.version = resultSet.getString(\"version\");\r\n// dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n// dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n// dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding content information; not every dtLine has corresponding content information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n// \"FROM content \" +\r\n// \"JOIN artifact ON fk_content = pk_content \" +\r\n// \"WHERE pk_artifact = \" + strPKArtifact );\r\n// if ( resultSet.next() ) {\r\n// dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n// dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding component information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKVersion = String.valueOf(dtLine.pk_version);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT name \" +\r\n// \"FROM component \" +\r\n// \"JOIN version ON fk_component = pk_component \" +\r\n// \"WHERE pk_version = \" + strPKVersion );\r\n// if ( resultSet.next() ) {\r\n// dtLine.componentName = resultSet.getString(\"name\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// }\r\n//\r\n// // get corresponding resource information; not every dtLine has corresponding resource information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n// \"FROM dt_line \" +\r\n// \"JOIN resource ON fk_resource = pk_resource \" +\r\n// \"WHERE pk_dt_line = \" + strPKDTLine );\r\n// if ( resultSet.next() ) {\r\n// dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n// dtLine.resourceName = resultSet.getString(\"name\");\r\n// dtLine.resourceDescription = resultSet.getString(\"description\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n }", "public static void loadDB() throws Exception {\n\t\t// Remove previously loaded data\n\t\tcolToData.clear();\n\t\t// Load dictionary from disk\n\t\tloadDictionary();\n\t\t// Collect columns to load in parallel\n\t\tList<ColumnRef> colsToLoad = new ArrayList<ColumnRef>();\n\t\tfor (TableInfo table : CatalogManager.currentDB.nameToTable.values()) {\n\t\t\tString tableName = table.name;\n\t\t\tfor (ColumnInfo column : table.nameToCol.values()) {\n\t\t\t\tString columnName = column.name;\n\t\t\t\tcolsToLoad.add(new ColumnRef(tableName, columnName));\n\t\t\t}\n\t\t}\n\t\t// Load columns\n\t\tcolsToLoad.stream().parallel().forEach((colRef) -> {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Loading column \" + colRef.toString());\n\t\t\t\tloadColumn(colRef);\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error loading column \" + colRef.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Loaded database.\");\n\t}", "private void loadRec() {\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< t.items.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + t.items.get(i).name +\", \" \n\t\t\t\t\t+ t.items.get(i).amount + \n\t\t\t\t\t\", $\"+ t.items.get(i).price +\"\\n\";\n\t\t}\n\t\tthis.reciet.setText(test);\n\t}", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "public void loadDataFromCovidDatabase(){\n\n String [] columns = {CovidOpener.COL_COUNTRY, CovidOpener.COL_COUNTRYCODE, CovidOpener.COL_PROVINCE, CovidOpener.COL_CITY, CovidOpener.COL_CASES, CovidOpener.COL_DATE, CovidOpener.COL_ID};\n\n Cursor results = cdb.query(false, CovidOpener.TABLE_NAME, columns, null, null, null, null, null, null);\n\n int countryColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRY);\n int countryCodeColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRYCODE);\n int provinceColIndex = results.getColumnIndex(CovidOpener.COL_PROVINCE);\n int cityColIndex = results.getColumnIndex(CovidOpener.COL_CITY);\n int casesColIndex = results.getColumnIndex(CovidOpener.COL_CASES);\n int dateColIndex = results.getColumnIndex(CovidOpener.COL_DATE);\n int idColIndex = results.getColumnIndex(CovidOpener.COL_ID);\n\n while(results.moveToNext()){\n country = results.getString(countryColIndex);\n countryCode = results.getString(countryCodeColIndex);\n province = results.getString(provinceColIndex);\n city = results.getString(cityColIndex);\n cases = results.getInt(casesColIndex);\n date = results.getString(dateColIndex);\n id = results.getLong(idColIndex);\n CovArray.add(new Covid(country, countryCode, province, city, cases, date, id));\n }\n printCursor(results);\n }", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private void loading(){\n mDbHelper = new DbHelper(getActivity());\n if(!(mDbHelper.getPlanCount() == 0)){\n plan_list.addAll(mDbHelper.getAllPlan());\n }\n refreshList();\n }", "public void initData() {\n nameDetailOrder.setText(\"-\");\n tourDetailOrder.setText(\"-\");\n packDetailOrder.setText(\"-\");\n statusDetailOrder.setText(\"-\");\n }", "private void tableLoad() {\n try{\n String sql=\"SELECT * FROM salary\";\n pst = conn.prepareStatement(sql);\n rs = pst.executeQuery();\n \n table1.setModel(DbUtils.resultSetToTableModel(rs));\n \n \n }\n catch(SQLException e){\n \n }\n }", "private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }", "private void loadData() {\n //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "public LoadData(String db_dir, String data_dir) {\n this.db_dir = db_dir;\n this.data_dir = data_dir;\n this.sqlList = new ArrayList<String>();\n this.logger = Logger.getInstance();\n }", "@Override\n protected void loadAndFormatData()\n {\n // Place the data into the table model along with the column\n // names, set up the editors and renderers for the table cells,\n // set up the table grid lines, and calculate the minimum width\n // required to display the table information\n setUpdatableCharacteristics(getScriptAssociationData(allowSelectDisabled, parent),\n AssociationsTableColumnInfo.getColumnNames(),\n null,\n new Integer[] {AssociationsTableColumnInfo.AVAILABLE.ordinal()},\n null,\n AssociationsTableColumnInfo.getToolTips(),\n true,\n true,\n true,\n true);\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "private void onDataLoaded() {\n if (userLoc.getLoadingState() != LoadingState.DATA\n || randomNumberLoc1.getLoadingState() != LoadingState.DATA\n || randomNumberLoc2.getLoadingState() != LoadingState.DATA) {\n return;\n }\n\n // Let's pretend that adapting is expensive and takes a while\n try {\n Thread.sleep(ADAPT_DELAY_MS);\n } catch (InterruptedException e) {\n // can't catch a break!\n }\n\n UserService.User user = userLoc.getUser();\n assert user != null; // based on LoadingState check\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);\n\n loadingState = LoadingState.DATA;\n text1 = user.getId() + \": \" + user.getName() + \" (\" + randomNumberLoc1.getRandomNumber() + \")\";\n text2 = dateTimeInstance.format(user.getLastUpdate()) + \" (\" + randomNumberLoc2.getRandomNumber() + \")\";\n notifyPropertyChanged(BR.loadingState);\n notifyPropertyChanged(BR.text1);\n notifyPropertyChanged(BR.text2);\n }", "public void initFromDb() {\n // Get load list of symbols to query\n new AsyncTask<ContentResolver, Void, Void>() {\n @Override\n protected Void doInBackground(ContentResolver... params) {\n Cursor cursor = null;\n try {\n ContentResolver cr = params[0];\n int shownPositionBookmark = Utility.getShownPositionBookmark(cr);\n\n // Query db for data up to the list position bookmark;\n cursor = cr.query(\n StockEntry.CONTENT_URI,\n ListManipulator.STOCK_PROJECTION,\n StockProvider.LIST_POSITION_SELECTION,\n new String[]{Integer.toString(shownPositionBookmark)},\n StockProvider.ORDER_BY_LIST_POSITION_ASC_ID_DESC);\n\n // Extract StockChange data from cursor\n if (cursor != null) {\n int cursorCount = cursor.getCount();\n if (cursorCount > 0) {\n mListManipulator.setShownListCursor(cursor);\n mListManipulator.setLoadList(getLoadListFromDb(cr));\n mListManipulator.addToLoadListPositionBookmark(cursorCount);\n }\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n ListEventQueue.getInstance().post(new InitLoadFromDbFinishedEvent(\n MyApplication.getInstance().getSessionId()));\n }\n }.execute(getActivity().getContentResolver());\n }", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}", "private void loadStaticData(){\n this.specialisaties = this.dbFacade.getAllSpecialisaties();\n this.jComboBoxSpecialisatie.setModel(new DefaultComboBoxModel(this.specialisaties.toArray()));\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueert();\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n }", "private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}", "public void showDataBase(){\n List<Mission> missions = appDatabase.myDao().getMissions();\n\n\n String info = \"\";\n\n for(Mission mis : missions){\n int id = mis.getId();\n String name = mis.getName();\n String diffic = mis.getDifficulty();\n int pong = mis.getPoints();\n String desc = mis.getDescription();\n\n info = info+\"Id : \" + id + \"\\n\" + \"Name : \" + name + \"\\n\" + \"Difficulty : \" + diffic + \"\\n\" + \"Points : \" + pong + \"\\n\" + \"Description: \" + desc + \"\\n\\n\";\n }\n\n TextView databaseData = (TextView)getView().findViewById(R.id.DatabaseData);\n databaseData.setText(info);\n\n //Toggle visibility for the textview containing the data\n if(databaseData.getVisibility() == View.VISIBLE)\n databaseData.setVisibility(View.GONE);\n else\n databaseData.setVisibility(View.VISIBLE);\n\n }", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "private void loadData() {\n if (mItem != null) {\n Picasso.with(getActivity()).load(mItem.getPictureFile()).\n placeholder(R.drawable.loading)\n .error(R.drawable.error)\n .fit() //\n .into(((ImageView) getView().findViewById(R.id.detailImageView)));\n ((EditText) getView().findViewById(R.id.visitstextView))\n .setText(\"\" + mItem.getVisits());\n\n ((TextView) getView().findViewById(R.id.detailTextView))\n .setText(\"\" + mItem.getTitle());\n ((RatingBar) getView().findViewById(R.id.detailsratingBar)).setRating((float) mItem.getRating());\n\n ReviewModelAdapter mReviewAdapter = new ReviewModelAdapter(getActivity(), R.id.txt_line1);\n try {\n mReviewAdapter.addAll(mItem.getReviews(getActivity()).all().toList());\n } catch (Exception e) {\n\n }\n ((ListView) getView().findViewById(R.id.detailsreviewlistview)).setAdapter(mReviewAdapter);\n\n\n }\n }", "public void setData()\n {\n lbl_f_Name.setText(\"Name: \" + obj_Faculty.getName());\n lbl_f_ID.setText(\"ID: \" + obj_Faculty.getId());\n\n //CODE for fetching data from DB from tbl_Up_Events and show on table\n //Things for DB\n //Connection_to_DB it connects to Access DB\n Connect_to_DB obj_conDB = new Connect_to_DB();\n Connection obj_con = obj_conDB.make_Connection();\n\n //Statement is used for updating, inserting and deleting\n Statement stmt = null;\n ResultSet res = null;\n\n try\n {\n stmt = obj_con.createStatement();\n\n String str_Data = \"select * from tbl_Up_Events\";\n\n res = stmt.executeQuery(str_Data);\n\n while (res.next())\n {\n String Name = res.getString(\"evntName\");\n String Day = res.getString(\"evntDay\");\n String Date = res.getString(\"evntDate\");\n String Venue = res.getString(\"evntVenue\");\n String Budget = res.getString(\"evntBudget\");\n String Descript = res.getString(\"evntDescript\");\n String Club = res.getString(\"evntClub\");\n String Ticket = res.getString(\"evntTicket\");\n\n String table[] =\n {\n Name, Day, Date, Venue, Budget, Descript, Club, Ticket\n };\n\n DefaultTableModel tblModel = (DefaultTableModel) tbl_Event.getModel();\n tblModel.addRow(table);\n }\n\n obj_con.close();\n\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n //CODE for tables ENDS\n }", "private void load() { \n\t\tmannschaft_name.setText(helper.getTeamName(mannschaftId));\n\t\tmannschaft_kuerzel.setText(helper.getTeamKuerzel(mannschaftId));\t\t \n\t}", "public calsal() {\n initComponents(); \n //connect to DB\n con =DBconnect.connect();\n \n //load table\n tableload();\n tableloadfnl();\n }", "private void getDataFromView() throws EmptyTextFieldException, EmptyChoiceBoxException, NumberSmallerOneException {\n\n date = _view.getDate().getValue();\n title = _view.getTitle().getText();\n function = _view.getFunction().getText();\n protagonist = _view.getProtagonist().getText();\n source = _view.getSource().getText();\n references = _view.getReferences().getText();\n description = _view.getDescription().getText();\n checkForEmptyFields();\n\n priority = _view.getPriorityMap().get(_view.getPriority().getValue());\n classification = _view.getClassificationMap().get(_view.getClassification().getValue());\n checkForEmptyChoiceBox();\n\n id = Integer.parseInt(_view.getId().getText());\n ftr = Integer.parseInt(_view.getFtr().getText());\n det = Integer.parseInt(_view.getDet().getText());\n checkForNumbersSmallerOne();\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void loadPlanDataInGui() {\n String id = plan_num_label.getText();\n Helper.startSession();\n Query query = Helper.sess.createQuery(HQLHelper.GET_LOAD_PLAN_BY_ID);\n query.setParameter(\"id\", Integer.valueOf(id));\n\n Helper.sess.getTransaction().commit();\n List result = query.list();\n LoadPlan plan = (LoadPlan) result.get(0);\n WarehouseHelper.temp_load_plan = plan;\n loadPlanDataToLabels(plan, \"\");\n reloadPlanLinesData(Integer.valueOf(id), null);\n loadDestinations(Integer.valueOf(id));\n //Disable delete button if the plan is CLOSED\n if (WarehouseHelper.LOAD_PLAN_STATE_CLOSED.equals(plan.getPlanState())) {\n delete_plan_btn.setEnabled(false);\n release_plan_btn.setEnabled(false);\n export_plan_menu.setEnabled(true);\n edit_plan_menu.setEnabled(false);\n destinations_box.setEnabled(true);\n piles_box.setEnabled(false);\n set_packaging_pile_btn.setEnabled(false);\n } else {\n delete_plan_btn.setEnabled(true);\n release_plan_btn.setEnabled(true);\n export_plan_menu.setEnabled(true);\n edit_plan_menu.setEnabled(true);\n destinations_box.setEnabled(true);\n piles_box.setEnabled(true);\n set_packaging_pile_btn.setEnabled(true);\n\n }\n }" ]
[ "0.7260102", "0.6645784", "0.64370185", "0.6426221", "0.6421659", "0.64053905", "0.6360159", "0.6341319", "0.62651825", "0.62519836", "0.6236174", "0.62215346", "0.61851406", "0.6165462", "0.61590314", "0.614887", "0.614887", "0.6140092", "0.6133414", "0.6129755", "0.61131084", "0.6101174", "0.6100319", "0.6082256", "0.60182023", "0.60158825", "0.6013582", "0.5977417", "0.59667844", "0.5961352", "0.59334034", "0.5932634", "0.5915462", "0.5913959", "0.5902074", "0.58856153", "0.5856303", "0.58373857", "0.5837049", "0.5818951", "0.5818951", "0.5811843", "0.58090544", "0.5789592", "0.578119", "0.5774957", "0.5772748", "0.5739829", "0.57381725", "0.57307756", "0.5729835", "0.5721817", "0.57156485", "0.5689183", "0.56782025", "0.5676522", "0.5663509", "0.5640991", "0.5635913", "0.5628458", "0.5609832", "0.5603387", "0.55661666", "0.5558626", "0.5558567", "0.5548654", "0.5542818", "0.5538926", "0.5537198", "0.55260867", "0.55254894", "0.5510806", "0.549716", "0.5495484", "0.548953", "0.5467299", "0.5461367", "0.5447396", "0.5445041", "0.5433198", "0.54293644", "0.542564", "0.54133886", "0.54098713", "0.5406741", "0.5406045", "0.5403161", "0.5402933", "0.5396669", "0.5390244", "0.53898764", "0.53838223", "0.5381676", "0.53731775", "0.53698146", "0.5368737", "0.5368166", "0.5367141", "0.5366186", "0.53657943" ]
0.67508364
1
editProfile Is called when the user presses the edit button. It handles the dialog window that allows the user to change their profile picture and username.
public void editProfile() { dialog = new Dialog(getContext()); dialog.setContentView(R.layout.edit_profile); editUsername = dialog.findViewById(R.id.tv_uname); TextView editEmail = dialog.findViewById(R.id.tv_address); editImage = dialog.findViewById(R.id.imgUser); editUsername.setText(user.getUserID()); editEmail.setText(user.getEmail()); editEmail.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getContext(), "Email cannot be changed.", Toast.LENGTH_SHORT).show(); } }); decodeImage(user.getProfilePic(), editImage); editImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3); } }); TextView save = dialog.findViewById(R.id.save_edit); save.setOnClickListener(new View.OnClickListener() { // save changes @Override public void onClick(View v) { String username = editUsername.getText().toString(); if(username.equals("")) { Toast.makeText(getContext(), "Username cannot be null", Toast.LENGTH_SHORT).show(); return; } else if (!checkUsername(username)) { Toast.makeText(getContext(), "Username already exists", Toast.LENGTH_SHORT).show(); return; } user.setUserID(username); if(profilePicChanged) { user.setProfilePic(profilePic); profilePic = null; profilePicChanged = false; } docRef.set(user); dialog.dismiss(); loadDataFromDB(); } }); TextView cancel = dialog.findViewById(R.id.cancel_edit); cancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); // cancel changes } }); dialog.show(); dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void saveProfileEditData() {\r\n\r\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "void gotoEditProfile();", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "private void updatePicture() {\n \tif (!picture.getText().equals(\"\")) {\n\t\t\tif ( currentProfile != null ) {\n\t\t\t\t//Tries to open the given image fileName from user, throws an error if unable to open file.\n\t\t\t\tGImage image = null;\n\t\t\t\ttry {\n\t\t\t\t\timage = new GImage(picture.getText());\n\t\t\t\t} catch (ErrorException ex) {\n\t\t\t\t\tthrow ex;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Sets the currentProfile picture to the opened image and informs the user accordingly\n\t\t\t\tcurrentProfile.setImage(image);\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Picture updated\");\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change picture\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "public static EditProfileDialogue newInstance(Profile profile){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n // If we are editing a current profile\n Bundle args = new Bundle();\n args.putParcelable(\"profile\", profile);\n dialogue.setArguments(args);\n\n Log.d(TAG, \"newInstance: send profile object in args form. args = \" + args);\n return dialogue;\n }", "void gotoEditProfile(String fbId);", "private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "private void changeProfilePicture()\n {\n\n final CharSequence options[] = new CharSequence[] {\"Take Photo\", \"Choose from Library\", \"Cancel\"};\n\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(MyProfileActivity.this);\n builder.setCancelable(false);\n builder.setTitle(\"Select your option:\");\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n // the user clicked on options[which]\n if (options[item].equals(\"Take Photo\")) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, 0);\n } else if (options[item].equals(\"Choose from Library\")) {\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(\n Intent.createChooser(intent, \"Select File\"),\n 1);\n } else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n\n builder.show();\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "private void setUser(){\n try{\n if (!mainUser.getUsername().equals(\"\")){\n this.userName.setText(mainUser.getUsername());\n }else{\n this.userName.setText(\"User\");\n }\n\n\n File file = new File(mainUser.getProfileImage());\n if (!file.exists()){\n file = new File(getClass().getResource(\"../images/eren.png\").getFile());\n }\n Image img = new Image(file.toURI().toString());\n profileImage.setImage(img);\n\n setEventLabel(\"Welcome \"+mainUser.getFname()+\" \"+mainUser.getLname()+\".\");\n }catch (NullPointerException e){\n AlertBox.alert(AlertType.ERROR, stackRoot, anchorRoot, \"There was an error while updating UserInfo\");\n }\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public void loadProfileWindowEdit(DonorReceiver account) throws IOException {\n\n // Only load new window if childWindowToFront fails.\n if (!App.childWindowToFront(account)) {\n\n // Set the selected donorReceiver for the profile pane and confirm child.\n ViewProfilePaneController.setAccount(account);\n ViewProfilePaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane profilePane = loader.load(getClass().getResourceAsStream(PageNav.VIEW));\n\n // Create new scene.\n Scene profileScene = new Scene(profilePane);\n\n // Create new stage.\n Stage profileStage = new Stage();\n profileStage.setTitle(\"Profile for \" + account.getUserName());\n profileStage.setScene(profileScene);\n profileStage.show();\n profileStage.setX(App.getWindow().getX() + App.getWindow().getWidth());\n\n App.addChildWindow(profileStage, account);\n\n loadEditWindow(account, profilePane, profileStage);\n }\n }", "private void onProfileRefresh(Profile profile) {\n if (profile == null)\n throw new IllegalStateException(\"A profile cannot be null on successful profile refresh\");\n\n boolean ownProfile = userId.equals(Login.getUserId());\n\n profile.setUserId(userId);\n if (ownProfile)\n Login.setProfile(profile);\n\n profileImage.setImageBitmap(profile.getProfileImage());\n profile.setProfileImage(null); // save memory\n nameView.setText(profile.getName());\n String address = profile.getCity() + \", \" + profile.getState();\n addressView.setText(address);\n favouriteActivityView.setText(profile.getFavouriteSport());\n\n setupBioTextView(profile);\n\n onFriendsSync(profile);\n }", "public void edit_or_remove_profile_image(Connection con, int user_id, Blob profile_image )\n\t{\n\n\t\tResultSet rs; \n\t\tPreparedStatement pst;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tpst=con.prepareStatement(\" update basic_profile set personal_profile_photo=? where eid=?\" );\n\t\t\tpst.setBlob(1, profile_image);\n\t\t\tpst.setInt(2, user_id);\n\t\t\t\n\t\t\t}catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\t\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n public void onDialogPositiveClick(ProfileEditDialogFragment dialog) {\n String value = dialog.getValue();\n \n switch (this.field){\n case FIRST: updateFirst(value);\n break;\n case LAST: updateLast(value);\n break;\n case EMAIL: updateEmail(value);\n break;\n case STREET: updateStreet(value);\n break;\n case CITY: updateCity(value);\n break;\n case STATE: updateState(value);\n break;\n case ZIP: updateZip(value);\n break;\n case PHONE: updatePhone(value);\n break;\n default: break;\n }\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "public void displayEditProfile() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/EditProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Edit Profile\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }", "private void updateProfile(PrivateProfile p) {\n final ProgressDialog dialog = new ProgressDialog(SettingsActivity.this);\n dialog.setMessage(getString(R.string.progress_update_profile));\n dialog.show();\n\n // Prepare user inputs for validator\n HashMap<String, Object> fields = new HashMap<String, Object>();\n fields.put(\"firstName\", mFirstName.getText().toString().trim());\n fields.put(\"lastName\", mLastName.getText().toString().trim());\n fields.put(\"homeCity\", mHomeCity.getText().toString().trim());\n fields.put(\"phone\", mPhone.getText().toString().trim());\n fields.put(\"arriveHQBy\", mArriveHQBy.getText().toString().trim());\n fields.put(\"arriveHomeBy\", mArriveHomeBy.getText().toString().trim());\n\n validateFields(fields);\n\n userProfile.setFirstName((String) fields.get(\"firstName\"));\n userProfile.setLastName((String) fields.get(\"lastName\"));\n userProfile.setHomeCity((String) fields.get(\"homeCity\"));\n userProfile.setPhoneNumber((String) fields.get(\"phone\"));\n userProfile.setDriverStatus((Boolean) fields.get(\"driving\"));\n userProfile.setDriverCar((String) fields.get(\"car\"));\n userProfile.setArriveHQBy((String) fields.get(\"arriveHQBy\"));\n userProfile.setArriveHomeBy((String) fields.get(\"arriveHomeBy\"));\n\n userProfile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n dialog.dismiss();\n if (e != null) {\n // Show the error message\n Toast.makeText(SettingsActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n } else {\n // show user the activity was complete\n Toast.makeText(SettingsActivity.this, R.string.profile_saved, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tsuper.onClick(v);\n\t\tswitch (v.getId()) {\n\t\tcase R.id.profile_image:\n\n\t\t\tUtilities.showPickerImageDialog(ProfileActivity.this,\n\t\t\t\t\tConstants.REQUEST_CODE_PROFILE_IMAGE_CAMERA,\n\t\t\t\t\tConstants.REQUEST_CODE_PROFILE_IMAGE_GALLERY);\n\t\t\tbreak;\n\t\tcase R.id.ic_action_save:\n if(isImageChanged){\n if(imageUriUpload != null){\n //upload\n if(mLoadingDialog == null) {\n mLoadingDialog = CustomLoadingDialog.show(ProfileActivity.this, \"\", \"\", false, false);\n }\n UploadImageRequest request = new UploadImageRequest(imageUriUpload);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }\n }\n else{\n String username = mNameEdt.getText().toString().trim();\n if (username.equals(\"\")) {\n Utilities.showAlertMessage(ProfileActivity.this,\n getString(R.string.dialog_profile_input_username),\n getString(R.string.dialog_profile_title));\n return;\n }\n\n\t\t\tif (!isSocialUser) {\n\n\t\t\t\tString oldPassword = mOldPassEdt.getText().toString();\n\t\t\t\tString savedPassword = CustomSharedPreferences.getPreferences(\n\t\t\t\t\t\tConstants.PREF_PASSWORD, \"\");\n\t\t\t\tif (oldPassword.equals(\"\")\n\t\t\t\t\t\t|| !oldPassword.equals(savedPassword)) {\n\n\t\t\t\t\tUtilities\n\t\t\t\t\t\t\t.showAlertMessage(\n\t\t\t\t\t\t\t\t\tProfileActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_old_password_incorrect),\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_title));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tString newPassword = mNewPassEdt.getText().toString().trim();\n\t\t\t\tString confirmPass = mConfirmPassEdt.getText().toString()\n\t\t\t\t\t\t.trim();\n\t\t\t\tif (newPassword.equals(\"\") || confirmPass.equals(\"\")) {\n\n\t\t\t\t\tUtilities\n\t\t\t\t\t\t\t.showAlertMessage(\n\t\t\t\t\t\t\t\t\tProfileActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_new_password_not_set),\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_title));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!newPassword.equals(confirmPass)) {\n\n\t\t\t\t\tUtilities\n\t\t\t\t\t\t\t.showAlertMessage(\n\t\t\t\t\t\t\t\t\tProfileActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_new_password_not_match),\n\t\t\t\t\t\t\t\t\tgetString(R.string.dialog_profile_title));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n // Save process\n //new UpdateProfileAsyncTask().execute();\n LogUtil.d(\"QuyNT3\", \"udpate profile API 28: \");\n if(mLoadingDialog == null) {\n mLoadingDialog = CustomLoadingDialog.show(ProfileActivity.this, \"\", \"\", false, false);\n }\n callUpdateProfile();\n }\n }\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }", "void updateProfilePhoto(int userId, String filename);", "@Override\n public void Mesibo_onProfileUpdated(MesiboProfile profile) {\n toast(profile.getName() + \" has updated profile\");\n }", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "@Override\n public void onClick(View v) {\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which){\n case DialogInterface.BUTTON_POSITIVE:\n //Yes button clicked\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n //No button clicked\n break;\n }\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(ChangeProfileActivity.this);\n builder.setMessage(\"Are you sure?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n String newName = name.getText().toString();\n String DOB = DateOfBirth.getText().toString();\n String phoneNumber = PhoneNumber.getText().toString();\n String status = statusItem.getStatusName();\n\n SharedPref sharedPref = new SharedPref(ChangeProfileActivity.this);\n User user = sharedPref.load();\n\n int userID = user.getUserID();\n\n // Update profile to database\n try {\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(ChangeProfileActivity.this);\n databaseAccess.openDatabase();\n\n boolean isSuccessUpdate = databaseAccess.updateProfile(userID, newName, genderString, DateOfBirth.getText().toString(), phoneNumber, status);\n\n if(isSuccessUpdate){\n user.setAge(getAgeFromDOB(DOB));\n user.setUserName(newName);\n user.setDOB(DateOfBirth.getText().toString());\n user.setPhoneNumber(phoneNumber);\n user.setUserStatus(status);\n\n sharedPref.clearAll(ChangeProfileActivity.this);\n\n sharedPref.save(user);\n\n dialog.dismiss();\n\n Log.d(TAG, \"onClick: DOB = \" + user.getDOB());\n\n Toast.makeText(ChangeProfileActivity.this, \"Updated profile successfully\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(ChangeProfileActivity.this, NavigationBarActivity.class);\n intent.putExtra(\"goToWhichFragment\", \"profile\");\n startActivity(intent);\n finish();\n }\n databaseAccess.closeDatabase();\n }\n catch (Exception e){\n e.printStackTrace();\n Toast.makeText(ChangeProfileActivity.this, \"Something went wrong, please try again\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n\n private int getAgeFromDOB(String dob) {\n int thisYear = Calendar.getInstance().get(Calendar.YEAR);\n int yearOfDOB = Integer.parseInt(dob.substring(0, 4));\n return thisYear - yearOfDOB;\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).show();\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n updateProfile(interestsChanged, moreChanged, pictureChanged);\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n userphone=editText_phone.getText().toString();\n useremail=editText_email.getText().toString();\n\n if (validate(userphone,useremail)){\n editProfile(user_id,userphone,useremail);\n dialogInterface.dismiss();\n }\n else {\n Toast.makeText(getActivity(), \"Updation Failed\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@PutMapping(\"/user/update/\") \n\tpublic userprofiles updateUserprofiles(@RequestParam String oldUsername, @RequestParam String oldPassword, @RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.updateUser(oldUsername, oldPassword, firstname, lastname, username, password, pic);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public update_profile(int loginid) {\n initComponents();\n this.getContentPane().setBackground(new Color(98,182,170));\n this.setSize(850, 500);\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n t1.setText(\"\"+loginid);\n t1.setEditable(false);\n }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}", "@Override\n public void onUpdate(User user) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n final AlertDialog dialog = builder.create();\n LayoutInflater layoutInflater = LayoutInflater.from(getContext());\n final CustomDialogUpdateBinding binding = DataBindingUtil.inflate(layoutInflater,\n R.layout.custom_dialog_update, null, false);\n dialog.setView(binding.getRoot());\n binding.edtUsername.setText(user.getUsername());\n binding.edtPassword.setText(user.getPassword());\n binding.edtPhone.setText(user.getPhone());\n dialog.show();\n\n // get profile and update\n binding.imgUpdate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String UserName = binding.edtUsername.getText().toString().trim();\n String PassWord = binding.edtPassword.getText().toString().trim();\n String Phone = binding.edtPhone.getText().toString().trim();\n user.setUsername(UserName);\n user.setPassword(PassWord);\n user.setPhone(Phone);\n viewModel.update(user);\n dialog.dismiss();\n }\n });\n }", "private void updateProfile() {\r\n\r\n builder.setMessage(\"Are you sure you want to update?\")\r\n .setCancelable(false)\r\n .setTitle(\"Profile Update\")\r\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n //Validate fields\r\n if (!validateData()){\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.update(\"contact\", mTextViewContact.getText().toString());\r\n reference.update(\"estate\", mTextViewEstate.getText().toString());\r\n reference.update(\"houseno\", mTextViewHouseNo.getText().toString());\r\n reference.update(\"name\", mTextViewName.getText().toString())\r\n .addOnSuccessListener(new OnSuccessListener<Void>() {\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n Toast.makeText(Testing.this, \"User: \" + mTextViewName.getText().toString() + \" Profile updated successfully!\", Toast.LENGTH_LONG).show();\r\n resetFieldData();\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 while updating your profile. KIndly check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n })\r\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n dialogInterface.cancel();\r\n }\r\n });\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void getUserProfile() {\n mFirstname.setText(\"FirstName: \"+userPreferences.getAgentFirstName());\n mLastname.setText(\"LastName: \"+userPreferences.getAgentLastName());\n\n\n Log.i(\"username\",userPreferences.getAgentUsername());\n if(userPreferences.getAgentUsername()==null){\n mUsernameTxt.setText(\"\");\n }else if(userPreferences.getAgentUsername().equals(\"null\")){\n mUsernameTxt.setText(\"\");\n }else{\n mUsernameTxt.setText(userPreferences.getAgentUsername());\n }\n\n mEmail.setText(\"Email: \"+userPreferences.getAgentEmail());\n mPhoneNum.setText(\"Phone No: \"+userPreferences.getAgentPhoneNUM());\n\n\n /* mPinProfileTxt.setText(\"Pin: \"+userPreferences.getPin());\n mBank.setText(\"Bank Name: \"+userPreferences.getBank());\n mAccountName.setText(\"Acct Name: \"+userPreferences.getAccountName());\n mAccountNumber.setText(\"Acct No: \"+userPreferences.getAccountNumber());*/\n\n mProgressBarProfile.setVisibility(View.VISIBLE);\n if(personal_img_url==null) {\n Glide.with(this).load(userPreferences.getAgentProfileImg()).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n }else{\n Glide.with(this).load(personal_img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n\n }\n mProgressBarProfile.setVisibility(View.GONE);\n }", "@FXML\n\tpublic void openUpdateMyUser(ActionEvent event) throws IOException {\n\t\tTextInputDialog dialog = new TextInputDialog();\n\t\tdialog.setTitle(\"Text Input Dialog\");\n\t\tdialog.setHeaderText(\"Look, a Text Input Dialog\");\n\t\tdialog.setContentText(\"Please enter your username:\");\n\t\tdialog.showAndWait();\n\n\t\tSystemUser user = restaurant.returnUser(dialog.getEditor().getText());\n\n\t\tif (user != null) {\n\t\t\tFXMLLoader updateUser = new FXMLLoader(getClass().getResource(\"Update-User.fxml\"));\n\t\t\tupdateUser.setController(this);\n\t\t\tParent rootIUpdateUser = updateUser.load();\n\t\t\tmainPane_OptionsWindow.getChildren().setAll(rootIUpdateUser);\n\n\t\t\tLabelSystemUserName.setText(user.getUserName());\n\n\t\t\ttxtSystemUserNewname.setText(user.getNames());\n\t\t\ttxtSystemUserNewLastname.setText(user.getSurNames());\n\t\t\ttxtSystemUserNewId.setText(user.getIdNumber());\n\t\t\ttxtSystemUserNewUsername.setText(user.getUserName());\n\n\t\t} else {\n\t\t\tDialog<String> dialog1 = createDialog();\n\t\t\tdialog1.setContentText(\"No existe ningun usuario con este nombre de usuario\");\n\t\t\tdialog1.setTitle(\"Error al cargar datos\");\n\t\t\tdialog1.show();\n\t\t}\n\n\t}", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@Override\n public void onChanged(@Nullable final Profile profile) {\n userProfile = profile;\n }", "void updateProfile(@NonNull final ComapiProfile profileDetails, final String eTag, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "public void on_edit(ActionEvent actionEvent) {\r\n\t\tint index = getSelectedIndex();\r\n\t\tif ( 0 > index)\r\n\t\t\treturn;\r\n\r\n\t\tThumbnailItem thumbnailItem = ( ThumbnailItem)_defaultComboBoxModel.getElementAt( index);\r\n\r\n\t\tString original_filename = thumbnailItem._file.getName();\r\n\r\n\t\tEditImageFilenameDlg editImageFilenameDlg = new EditImageFilenameDlg( MainFrame.get_instance(),\r\n\t\t\tResourceManager.get( \"edit.image.filename.dialog.title\"),\r\n\t\t\ttrue, original_filename, _imagePropertyManager);\r\n\t\tif ( !editImageFilenameDlg.do_modal( _parent))\r\n\t\t\treturn;\r\n\r\n\t\tString new_filename = editImageFilenameDlg._new_filename;\r\n\r\n\t\tif ( !rename( thumbnailItem, new_filename))\r\n\t\t\treturn;\r\n\r\n\t\t_thumbnailListCallback.update();\r\n\r\n\t\tFile file = new File( _imageDirectory, original_filename);\r\n\t\tImage image = ( Image)AnimatorImageManager.get_instance().get( file.getAbsolutePath());\r\n\t\tif ( null != image) {\r\n\t\t\tAnimatorImageManager.get_instance().remove( file.getAbsolutePath());\r\n\t\t\tfile = new File( _imageDirectory, new_filename);\r\n\t\t\tAnimatorImageManager.get_instance().put( file.getAbsolutePath(), image);\r\n\t\t}\r\n\r\n\t\tObjectManager.get_instance().update_image( original_filename, new_filename);\r\n\r\n\t\tAnimatorView.get_instance().repaint();\r\n\r\n\t\tmodified();\r\n\t}", "private void updateStudentProfile() {\n\t\t\n\t\t//Initiate Windows\n\t\tDimension dimension = new Dimension(updateStudentPWidth, updateStudentPHeight);\n\t\tupdateStudentPWindow = new JFrame(\"Update Profile\");\n\t\tupdateStudentPWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tupdateStudentPWindow.setSize(dimension);\n\t\tupdateStudentPWindow.setLayout(new BorderLayout());\n\t\tupdateStudentPWindow.setResizable(false);\n\t\tupdateStudentPWindow.setLocationRelativeTo(null);\n\t\tupdateStudentPWindow.setMinimumSize(dimension);\n\t\tupdateStudentPWindow.setMaximumSize(dimension);\n\t\tupdateStudentPWindow.setPreferredSize(dimension);\n\t\t\n\t\t//Set Background\n\t\t//JLabel background = new JLabel(new ImageIcon(\"Resource/loginBackground.jpg\"));\n\t\tJLabel background = new JLabel();\n\t\tbackground.setBounds(0, 0, updateStudentPWidth, updateStudentPHeight);\n\t\tupdateStudentPWindow.add(background, BorderLayout.CENTER);\n\t\t\t\t\t\t\n\t\t//Student: FirstName JLabel | JTextField\n\t\tsFirstNameL.setBounds(25, 25, 75, 40);\n\t\tsFirstNameL.setForeground(Color.BLACK);\n\t\tbackground.add(sFirstNameL);\n\t\tsFirstNameTF.setBounds(95, 25, 210, 40);\n\t\tsFirstNameTF.setBorder(compound);\n\t\tbackground.add(sFirstNameTF);\n\t\t\n\t\t//Teacher: LastName JLabel | JTextField\n\t\tsLastNameL.setBounds(25, 70, 75, 40);\n\t\tsLastNameL.setForeground(Color.BLACK);\n\t\tbackground.add(sLastNameL);\n\t\tsLastNameTF.setBounds(95, 70, 210, 40);\n\t\tsLastNameTF.setBorder(compound);\n\t\tbackground.add(sLastNameTF);\n\t\t\t\t\t\t\n\t\t//Teacher: SchoolName JLabel | JTextField\n\t\tsSchoolNameL.setBounds(25, 115, 75, 40);\n\t\tsSchoolNameL.setForeground(Color.BLACK);\n\t\tbackground.add(sSchoolNameL);\n\t\tsSchoolNameTF.setBounds(95, 115, 210, 40);\n\t\tsSchoolNameTF.setBorder(compound);\n\t\tbackground.add(sSchoolNameTF);\n\t\t\n\t\t//Teacher: \"Update\" JButton\n\t\tJButton updateB = new JButton(\"Update\");\n\t\tupdateB.setBounds(95, 170, 100, 45);\n\t\tupdateB.setBorder(compound);\n\t\tupdateB.setOpaque(true);\n\t\tupdateB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tsUpdateProfile = true;\n\t \t\tverifyStudent();\n\t }\n\t \t});\n\t\tbackground.add(updateB);\n\t\t\n\t\t//Teacher: \"Exit\" JButton\n\t\tJButton exitB = new JButton(\"Exit\");\n\t\texitB.setBounds(205, 170, 100, 45);\n\t\texitB.setBorder(compound);\n\t\texitB.setOpaque(true);\n\t\texitB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tupdateStudentPWindow.dispose();\n\t }\n\t \t});\n\t\tbackground.add(exitB);\n \n //Display the window\n updateStudentPWindow.pack();\n updateStudentPWindow.setVisible(true);\n\t}", "private void editUserCard() {\n getUserCard();\n }", "private void showEditDialog() {\n String[] array = {\"Change Name\", \"Change Password\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(UserProfileActivity.this);\n builder.setTitle(\"What would you like to change?\")\n .setItems(array, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n changeNameDialogFragment fragment1\n = new changeNameDialogFragment();\n fragment1.show(getSupportFragmentManager(),\n \"changeNameDialogFragment\");\n break;\n case 1:\n changePasswordDialogFragment fragment2\n = new changePasswordDialogFragment();\n fragment2.show(getSupportFragmentManager(),\n \"changePasswordDialogFragment\");\n break;\n default:\n break;\n }\n dialog.dismiss();\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int i) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.edit_profile:\n\t editProfileAlertDialog();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n public boolean onProfileChanged(View view, IProfile profile, boolean current) {\n Intent intent = null;\n if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_ADD_ACCOUNT) {\n intent = new Intent(MainActivity.this, AddAccountActivity.class);\n //TODO: Save profile\n //TODO: Create profile drawer item from saved profile and show it in UI\n /*\n IProfile profileNew = new ProfileDrawerItem()\n .withNameShown(true)\n .withName(\"New Profile\")\n .withEmail(\"[email protected]\")\n .withIcon(getResources().getDrawable(R.drawable.profile_new));\n\n if (accountHeader.getProfiles() != null) {\n //we know that there are 2 setting elements. set the new profile above them\n accountHeader.addProfile(profileNew, accountHeader.getProfiles().size() - 2);\n } else {\n accountHeader.addProfiles(profileNew);\n }\n */\n } else if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_MANAGE_ACCOUNT) {\n intent = new Intent(MainActivity.this, ManageAccountActivity.class);\n //TODO: update the UI\n }else if(profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_USER) {\n Toast.makeText(sApplicationContext, \"The User\", Toast.LENGTH_SHORT).show();\n SharedPreferences sp = sApplicationContext.getSharedPreferences(PREF_NAME, MODE_PRIVATE);\n String currentUserUUIDString = sp.getString(PREF_CURRENT_USER_UUID, null);\n if(((UserProfile)profile).getId().toString().equalsIgnoreCase(currentUserUUIDString)){\n Toast.makeText(sApplicationContext, \"SAME User\", Toast.LENGTH_SHORT).show();\n //TODO:\n }else{\n Toast.makeText(sApplicationContext, \"Different User\", Toast.LENGTH_SHORT).show();\n //TODO:\n SharedPreferences.Editor spe = sp.edit();\n spe.putString(PREF_CURRENT_USER_UUID, ((UserProfile)profile).getId().toString());\n spe.commit();\n\n UpdateContentUI();\n }\n }\n\n if(intent != null){\n MainActivity.this.startActivity(intent);\n }\n\n //false if you have not consumed the event And it should close the drawer\n return false;\n }", "private void loadEditWindow(DonorReceiver account, AnchorPane pane, Stage stage)\n throws IOException {\n\n // Set the selected account for the profile pane and confirm child.\n EditPaneController.setAccount(account);\n EditPaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane editPane = loader.load(getClass().getResourceAsStream(PageNav.EDIT));\n // Create new scene.\n Scene editScene = new Scene(editPane);\n TabPane tabPane = (TabPane) editPane.lookup(\"#mainTabPane\");\n TabPane profileViewTabbedPane = (TabPane) pane.lookup(\"#profileViewTabbedPane\");\n int tabIndex = profileViewTabbedPane.getSelectionModel().getSelectedIndex();\n tabIndex += 5;\n tabPane.getSelectionModel().clearAndSelect(tabIndex);\n // Retrieve current stage and set scene.\n Stage current = (Stage) stage.getScene().getWindow();\n current.setScene(editScene);\n\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void showProfilePicture() {\n File pic = sender.getProfilePic();\n if (pic == null || !pic.exists()) {\n profilePic.setText(Wrapers.htmlWraper(\"No Profile Picture Found.\"));\n } else {\n profilePic.setIcon(Images.profilePic(pic));\n profilePic.setText(null);\n }\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "public void onChangeProfilePicture(View view) {\n checkPermissions();\n\n if ((ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n == PackageManager.PERMISSION_GRANTED) &&\n (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n == PackageManager.PERMISSION_GRANTED)) {\n launchProfilePicOptions();\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // We check permissions for this\n if (!this.checkPermissions()) {\n ActivityCompat.requestPermissions(this, new String[]{\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE,\n android.Manifest.permission.READ_EXTERNAL_STORAGE},\n 0\n );\n }\n setContentView(R.layout.activity_profile_edit);\n // Toolbar\n toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n // Edit text\n etName=(EditText)findViewById(R.id.etName);\n etSurname=(EditText)findViewById(R.id.etSurname);\n etDescription=(EditText)findViewById(R.id.etDescription);\n // Buttons\n btSaveProfile=(Button)findViewById(R.id.btSaveProfile);\n btClearProfile =(Button)findViewById(R.id.btClearProfile);\n btTakeBack=(Button)findViewById(R.id.btTakeBack);\n btTakePhoto=(Button)findViewById(R.id.btTakePhoto);\n // Button Actions\n btSaveProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveProfile();\n }\n });\n btClearProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n clearForm();\n }\n });\n btTakeBack.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n takeBack();\n }\n });\n btTakePhoto.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n takePhoto();\n }\n });\n // ProfileImage\n ivProfileImage=(ImageView)findViewById(R.id.ivProfileImage);\n ivProfileImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n takePhoto();\n }\n });\n }", "public String updateUserProfileAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse = getService().getUserMgmtService().updateUser(getAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "void updateProfile(@NonNull final Map<String, Object> profileDetails, final String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "@Override\n public void edit(User user) {\n }", "private void setProfileWidgets(UserSettings userSettings){\n User user = userSettings.getUser();\n user_id = user.getUserID();\n if(user.getImage().equals(\"default\"))\n {\n UniversalImageLoader.setImage(user.getImage(), mProfilePhoto, null, \"drawable://\" );\n }else {\n UniversalImageLoader.setImage(user.getImage(), mProfilePhoto, null, \"\");\n }\n final String nuser = user.getUserID();\n final String name = user.getUserName();\n mName.setText(user.getUserName());\n mEmail.setText(user.getEmail());\n mPhoneNumber.setText(user.getPhoneNumber());\n\n message.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(mContext, MessageActivity.class);\n i.putExtra(\"user_id\",nuser );\n i.putExtra(\"user_name\", name);\n mContext.startActivity(i);\n }\n });\n// mBackArrow.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// Log.d(TAG, \"onClick: navigating back\");\n// getActivity().getSupportFragmentManager().popBackStack();\n// getActivity().finish();\n// }\n// });\n\n }", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "@Override\n\tpublic boolean updateProfile(String name, String address, String dob, String gender, String phone, String email,\n\t\t\t String status, int id) {\n\t\treturn false;\n\t}", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}", "public boolean updateProfilePhoto(Profile profile) throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"updatePhoto\", profile.toString());\n \t\t}\n \t\tif (profile == null) {\n \t\t\tthrow new IllegalArgumentException(Messages.InvalidArgument_3);\n \t\t}\n \t\tboolean returnVal = true;\n \n \t\tMap<String, String> parameters = new HashMap<String, String>();\n \t\tif (isEmail(profile.getReqId())) {\n \t\t\tparameters.put(ProfileRequestParams.EMAIL, profile.getReqId());\n \t\t} else {\n \t\t\tparameters.put(ProfileRequestParams.USERID, profile.getReqId());\n \t\t}\n \t\tString filePath = profile.getFieldsMap().get(\"imageLocation\");\n\t\tjava.io.File file;\n\t\ttry{\n\t\t\tfile = new java.io.File(filePath);\n\t\t}catch(NullPointerException e){\n\t\t\tthrow new ProfileServiceException(e);\n\t\t}\n \t\tString name = filePath.substring(filePath.lastIndexOf('\\\\') + 1);\n \n \t\tint dot = name.lastIndexOf('.');\n \t\tString ext = null;\n \t\tif (dot > -1) {\n \t\t\text = name.substring(dot + 1); // add one for the dot!\n \t\t}\n \t\tif (StringUtil.isEmpty(ext)) {\n \t\t\ttry {\n \t\t\t\tthrow new Exception(Messages.UpdateProfileInfo_1);\n \t\t\t} catch (Exception e) {\n \t\t\t\treturnVal = false;\n \t\t\t}\n \t\t}\n \t\tMap<String, String> headers = new HashMap<String, String>();\n \t\tif (ext.equalsIgnoreCase(\"jpg\")) {\n \t\t\theaders.put(Headers.ContentType, \"image/jpeg\");\t// content-type should be image/jpeg for file extension - jpeg/jpg\n \t\t} else {\n \t\t\theaders.put(Headers.ContentType, \"image/\" + ext);\n \t\t}\n \t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\tProfileType.UPDATEPROFILEPHOTO.getProfileType());\n \t\treturnVal = executePut(url, parameters, headers, file, ClientService.FORMAT_NULL);\n \n \t\tprofile.clearFieldsMap();\n \t\tremoveProfileDataFromCache(profile.getReqId());\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.exiting(sourceClass, \"updatePhoto\" + returnVal);\n \t\t}\n \t\treturn returnVal;\n \t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\n self = this;\n\t \n\t prefs = AccountManager.getCurrentUser(getApplicationContext());\n\t email = prefs.getString(\"email\");\n\t role = prefs.getString(\"role\");\n\t \n\t setContentView(R.layout.edit_profile);\n// \tview_currentPw = (EditText)findViewById(R.id.editprofile_currentpw);\n// \tview_newPw = (EditText)findViewById(R.id.editprofile_newpw);\n// \tview_confirmNewPw = (EditText)findViewById(R.id.editprofile_confirmnewpw);\n \tview_displayName = (EditText)findViewById(R.id.editprofile_displayname);\n \tview_address = (EditText)findViewById(R.id.editprofile_address);\n \tview_address_label = (TextView)findViewById(R.id.editprofile_label_address);\n \t\n\t if (role.equals(AppData.ROLE_SELLER)){\n\t \tview_address_label.setVisibility(View.VISIBLE);\n\t \tview_address.setVisibility(View.VISIBLE);\n\t }\n\t \n\t \n\t // Pre-populate fields with existing data\n\t // Callback for querying the server\n Handler.Callback getUserDetailsCallback = new Handler.Callback() {\n Bundle result;\n JSONObject user;\n\n @Override\n public boolean handleMessage(Message message) {\n result = message.getData();\n\n // Return if an error occurs\n if (result.getInt(\"success\") != 1 || result.getInt(\"status\") != 200) {\n Log.w(\"ACCOUNT_MANAGER\", getString(R.string.editprofile_connerror));\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_connerror), Toast.LENGTH_LONG).show();\n return false;\n }\n\n try {\n user = RestClient.parseJsonObject(new ByteArrayInputStream(result.getString(\"response\").getBytes(\"UTF-8\")));\n\n // If no user was found\n if (user == null) {\n Log.w(\"ACCOUNT_MANAGER\", \"ERROR: No user found.\");\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_usernotfound), Toast.LENGTH_LONG).show();\n return false;\n }\n \n // Populate relevant fields depending on role\n if (role.equals(AppData.ROLE_KG)){\n \tview_displayName.setText(user.getString(AppData.KarungGunis.COLUMN_NAME_DISPLAY_NAME));\n }\n else if (role.equals(AppData.ROLE_SELLER)){\n \tview_displayName.setText(user.getString(AppData.Sellers.COLUMN_NAME_DISPLAY_NAME));\n \tview_address.setText(user.getString(AppData.Sellers.COLUMN_NAME_ADDRESS));\n }\n\n // Dismiss the progress dialog\n progressDialog.dismiss();\n\n return true;\n } catch (JSONException e) {\n e.printStackTrace();\n return false;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n };\n\n // Show a progress dialog to the user while populating fields with existing data\n progressDialog = ProgressDialog.show(this, getString(R.string.editprofile_loading_title), getString(R.string.editprofile_loading_message), true);\n AccountManager.getUserDetails(email, role, getUserDetailsCallback);\n \n // On submit\n findViewById(R.id.editprofile_submit).setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n \t\n// \tfinal String currentPw = view_currentPw.getEditableText().toString();\n// \t \tString newPw = view_newPw.getEditableText().toString();\n// \t \tString confirmNewPw = view_confirmNewPw.getEditableText().toString();\n \t \tString displayName = view_displayName.getEditableText().toString();\n \t \tString address = view_address.getEditableText().toString();\n \t \t\n// \t \tview_currentPw.setError(null);\n// \tview_newPw.setError(null);\n// \tview_confirmNewPw.setError(null);\n \tview_displayName.setError(null);\n \tview_address.setError(null);\n \t\n \t// Input validation\n \tboolean invalid = false;\n\n \tif (TextUtils.isEmpty(displayName)) {\n invalid = true;\n view_displayName.setError(getString(R.string.editprofile_compulsory));\n } /*else if (TextUtils.isEmpty(currentPw)) {\n invalid = true;\n view_currentPw.setError(getString(R.string.editprofile_compulsory));\n } else if ((!TextUtils.isEmpty(newPw) || !TextUtils.isEmpty(confirmNewPw))\n \t\t&& !TextUtils.equals(newPw, confirmNewPw)) {\n invalid = true;\n view_newPw.setError(getString(R.string.editprofile_passwords_different));\n }*/ else if (role.equals(AppData.ROLE_SELLER) && TextUtils.isEmpty(address)){\n \tinvalid = true;\n \tview_address.setError(getString(R.string.editprofile_address_empty));\n }\n \n\n if (invalid == false) {\n\n // Set the parameters to update the user details\n final ParameterMap params = new ParameterMap();\n params.put(\"update\", \"true\"); // REST API looks for this\n\n if (role.equals(AppData.ROLE_KG)) {\n params.put(AppData.KarungGunis.COLUMN_NAME_DISPLAY_NAME, displayName);\n } else {\n params.put(AppData.Sellers.COLUMN_NAME_DISPLAY_NAME, displayName);\n params.put(AppData.Sellers.COLUMN_NAME_ADDRESS, address);\n// params.put(AppData.Sellers.COLUMN_NAME_ADDRESS_LAT, \"1\");\n// params.put(AppData.Sellers.COLUMN_NAME_ADDRESS_LONG, \"1\");\n }\n \t\n \tHandler.Callback setUserDetailsCallback = new Handler.Callback() {\n Bundle result;\n JSONObject user;\n\n @Override\n public boolean handleMessage(Message message) {\n result = message.getData();\n\n // Return if an error occurs\n if (result.getInt(\"success\") != 1 || result.getInt(\"status\") != 200) {\n Log.w(\"ACCOUNT_MANAGER\", getString(R.string.editprofile_connerror));\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_connerror), Toast.LENGTH_LONG).show();\n return false;\n }\n\n try {\n user = RestClient.parseJsonObject(new ByteArrayInputStream(result.getString(\"response\").getBytes(\"UTF-8\")));\n\n // If no user was found\n if (user == null) {\n Log.w(\"ACCOUNT_MANAGER\", \"ERROR: No user found.\");\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_usernotfound), Toast.LENGTH_LONG).show();\n return false;\n }\n\n// // If the password hash doesn't match, ask the user to enter the password again\n// if (!AccountManager.hashPassword(currentPw).equals(user.getString(AppData.Users.COLUMN_NAME_PASSWORD))) {\n// Log.w(\"ACCOUNT_MANAGER\", \"ERROR: Password mismatch.\");\n//\n// progressDialog.dismiss();\n// Toast.makeText(getApplicationContext(), R.string.login_incorrect, Toast.LENGTH_LONG).show();\n// return false;\n// }\n\n// // Update the user details\n// Uri uri;\n// if (role.equals(AppData.ROLE_KG)) {\n// uri = Uri.parse(AppData.KarungGunis.CONTENT_ID_URI_BASE + email);\n// } else {\n// uri = Uri.parse(AppData.Sellers.CONTENT_ID_URI_BASE + email);\n// }\n\n// Bundle result = RestClient.update(uri, params, null);\n \n // Display success\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_success), Toast.LENGTH_LONG).show();\n \n // Dismiss the progress dialog\n progressDialog.dismiss();\n return true;\n \n } catch (JSONException e) {\n e.printStackTrace();\n return false;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n };\n \n\t // Show a progress dialog to the user while updating profile asynchronously\n\t progressDialog = ProgressDialog.show(self, getString(R.string.editprofile_updating_title), getString(R.string.editprofile_updating_message), true);\n AccountManager.setUserDetails(email, role, params, setUserDetailsCallback);\n }\n }\n });\n\t}", "void editUser(String uid, User newUser);", "@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\n }\n }", "public editUserFrame(int IDUser ,int IDU0) {\n initComponents();\n userService = new UserService();\n user = userService.getUserByID(IDUser);\n u = userService.getUserByID(IDU0);\n\n IDEtextField.setText(String.valueOf(user.getIDUser()));\n fullNameTextField.setText(user.getFullName()); \n String b = user.getGender().replaceAll(\"\\\\s\",\"\"); \n if (b.equals(\"Nam\")) { \n genderComboBox.setSelectedIndex(0); \n }\n if (b.equals(\"Nữ\")) { \n genderComboBox.setSelectedItem(\"Nữ\"); \n }\n if (b.equals(\"Khác\")) {\n \n genderComboBox.setSelectedItem(\"Khác\");\n }\n if (user.getRole().equals(\"Admin\")) {\n AdminRadiobutton.setSelected(true);\n role = \"Admin\";\n }\n if(user.getRole().equals(\"Employee\")){\n EmployeeRadioButton.setSelected(true);\n role = \"Employee\";\n }\n \n DOBTextField.setText(user.getDob());\n addressTextField.setText(user.getAddress());\n phoneTextField.setText(user.getPhone());\n userNameTextField.setText(user.getUserName());\n passwordTextField.setText(user.getPassword());\n\n this.setLocationRelativeTo(null);\n }", "protected void mProfileImageSelection() {\n\n final CharSequence[] options = {\"Camera\", \"Gallery\", \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper\n (ApplicationActivity.this, R.style.AlertDialogCustom));\n\n builder.setIcon(R.mipmap.profile_icon);\n builder.setTitle(\"Profile Picture\");\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n\n //Camera Option\n if (options[item].equals(\"Camera\")) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, CAMERA_REQUEST);\n }\n\n //Gallery Option\n else if (options[item].equals(\"Gallery\")) {\n Intent intent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent, GALLERY_REQUEST);\n }\n\n //Cancel Option\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n\n builder.show();\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "private void handleListener() {\n imgAva.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent photoPicker = new Intent(Intent.ACTION_PICK);\n photoPicker.setType(\"image/*\");\n startActivityForResult(photoPicker, REQUEST_CODE_PHOTO);\n }\n });\n\n txtFullname.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n imgChangeProfile.setVisibility(View.VISIBLE);\n imgChangeProfile.setImageResource(R.drawable.ic_menu_send);\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n }\n });\n\n imgChangeProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String[] name = txtFullname.getText().toString().trim().split(\" \");\n if(name.length == 1)\n {\n if(name[0].length()!=0)\n {\n Toast.makeText(context, \"Your name must have space between firtname and last name\", Toast.LENGTH_LONG).show();\n txtFullname.setError(\"Can not change\");\n imgChangeProfile.setImageResource(R.drawable.icon_error_x);\n }\n else if(name[0].length()==0)\n {\n Toast.makeText(context, \"Your name is empty\", Toast.LENGTH_LONG).show();\n txtFullname.setError(\"Empty\");\n imgChangeProfile.setImageResource(R.drawable.icon_error_x);\n }\n\n }\n else if(name.length >1){\n profile.setFistName(name[0]);\n StringBuilder lastName = new StringBuilder();\n\n for(int i=1; i<name.length; i++)\n {\n lastName.append(name[i]);\n }\n Toast.makeText(context, lastName, Toast.LENGTH_LONG).show();\n profile.setLastName(lastName.toString());\n profile.setImage(new Gson().fromJson(viewModel.getProfile().getValue(), Profile.class).getImage());\n imgChangeProfile.setImageResource(R.drawable.icon_check);\n\n ClientService service = new ClientService(context);\n service.postInfoAccount(profile, context);\n }\n }\n });\n }", "@Override\n public void onSuccess(Uri uri) {\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }", "public static void cloneProfile(Profile profile)\n throws IOException\n {\n String newName = \n (String) JOptionPane.showInputDialog(MainFrame.getInstance(),\n \"Enter new profile name\");\n if (newName == null)\n return;\n newName = newName.trim();\n if (newName.length() == 0)\n return;\n\n // Does a profile with this name already exist?\n if (ProfileManager.getInstance().getProfile(newName) != null)\n {\n JOptionPane.showMessageDialog(MainFrame.getInstance(),\n \"A profile with that name already exists.\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return;\n }\n \n Profile newProfile = new Profile(newName, profile.getAddress(),\n profile.getPort(), profile.getUserName(), profile.getPassword(),\n profile.getParameters());\n try\n {\n ProfileManager.getInstance().updateProfile(newProfile);\n TreePanel.getInstance().addProfile(newProfile);\n }\n catch (SQLException e)\n {\n // This should never happen.\n }\n }" ]
[ "0.8193944", "0.7623561", "0.76105404", "0.7190346", "0.710989", "0.7093007", "0.70100445", "0.69976825", "0.6965953", "0.6844805", "0.6782858", "0.672113", "0.6693531", "0.668043", "0.66441685", "0.65833765", "0.6564198", "0.6560953", "0.6555704", "0.6553214", "0.6494339", "0.6486337", "0.6484352", "0.6480502", "0.64750886", "0.644524", "0.63891596", "0.63855064", "0.63644755", "0.6360479", "0.6341722", "0.6319269", "0.6306542", "0.629499", "0.6247147", "0.6235239", "0.6216489", "0.6181844", "0.6177636", "0.61687386", "0.61670345", "0.6163836", "0.61613756", "0.6157778", "0.61519265", "0.6150168", "0.61463916", "0.61408526", "0.6125392", "0.61085975", "0.61081827", "0.61020446", "0.6099166", "0.6093367", "0.60886663", "0.6070888", "0.6066365", "0.60474014", "0.60289246", "0.5987922", "0.598505", "0.5984649", "0.59803665", "0.59740037", "0.59705037", "0.5957069", "0.5954931", "0.5951052", "0.5948559", "0.5943878", "0.5940901", "0.591919", "0.59090805", "0.5908513", "0.5899654", "0.58993983", "0.5894797", "0.5886469", "0.58850855", "0.58845055", "0.58825654", "0.58791375", "0.58777314", "0.5872027", "0.5856927", "0.58474505", "0.5830981", "0.5816571", "0.58155817", "0.58053493", "0.57716733", "0.57706493", "0.5743116", "0.57277006", "0.57162374", "0.5714058", "0.5714058", "0.5710459", "0.57102656", "0.5704512" ]
0.7974344
1
getUsers This is a helper function to loadDataFromDB. It retrieves all the users from the database.
public void getUsers() { CollectionReference ref = FirebaseFirestore.getInstance().collection("users"); listOfUsers = new ArrayList<>(); ref.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { if(task.isSuccessful()) { for(DocumentSnapshot doc: task.getResult()) { listOfUsers.add(doc.toObject(User.class).getUserID()); } listOfUsers.remove(user.getUserID()); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Users getUsers() throws UserException {\n Users users = new Users();\n log.debug(\"getUsers\");\n User user = null;\n ResultSet result;\n Connection conn = null;\n PreparedStatement stm = null;\n try {\n conn = provider.getConnection();\n\n stm = conn.prepareStatement(GET_ALL_USERS);\n result = stm.executeQuery();\n\n while (result.next()) {\n user = buildUserFromResult(result);\n log.debug(\"User found {}\", user);\n users.add((DataUser) user);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n throw new UserException(e.getMessage());\n\n } finally {\n try {\n stm.close();\n conn.close();\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n return users;\n }", "public List<YuserVO> getAllUsers() {\n\t\tList<YuserVO> list = null;\n\t\t\ttry {\n\t\t\t\tlist = userDao.getAllUsers();\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\tSystem.out.println(\"get users failed ..................................\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn list;\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}", "public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}", "@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}", "public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }", "public Collection<User> getAll() throws DataPersistenceException\n {\n PersistenceManagerFactory pmfInstance = PMFHolder.get();\n PersistenceManager pm = pmfInstance.getPersistenceManager();\n try\n {\n List<User> users = new ArrayList<User>();\n\n Extent<User> extent = pm.getExtent(User.class, true);\n for (User user : extent)\n users.add(user);\n extent.closeAll();\n\n return users;\n }\n catch (Throwable e)\n {\n throw new DataPersistenceException(e.getLocalizedMessage(), e);\n }\n finally\n {\n pm.close();\n }\n }", "public Set<User> getAll() throws DaoException {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n Set<User> users = new HashSet<User>();\n try {\n connection = dataSourceUtils.getConnection(dataSource);\n preparedStatement = connection.prepareStatement(GET_ALL);\n ResultSet resultSet = preparedStatement.executeQuery();\n\n while (resultSet.next()) {\n User user = new User();\n parseResultSet(resultSet, user);\n users.add(user);\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n DataSourceUtils.releaseConnection(connection, dataSource);\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n LOGGER.error(e);\n }\n }\n return users;\n }", "public ResultSet fetchSelectAllUsers() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_USERS_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "public static List<UserDB> getAllUsers() {\n\n\t\tUserDB newUser = new UserDB();\n\n\t\treturn newUser.getAllUsers();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}", "@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }", "public List<User> getAllUsers() {\n\t\tList<User> users = new ArrayList<User>();\n\t\tString selectQuery = \"SELECT * FROM \" + UserDataSource.TABLE_USERS;\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tUser user = UserDataSource.cursorToUser(c);\n\n\t\t\t\t// adding to list\n\t\t\t\tusers.add(user);\n\t\t\t} while (c.moveToNext());\n\t\t}\n\n\t\treturn users;\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}", "public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}", "public List getAllUsers();", "Collection<User> getUsers() throws DataAccessException;", "public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}", "public static List<User> getUsersList(){\n\t\tWSResponse response = null;\n\t\tList<User> resultList = new ArrayList<User>();\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)\n\t\t\t\t\t\t\t\t\t\t.setContentType(Urls.CONTENT_TYPE_JSON)\n\t\t\t\t\t\t\t\t\t\t.get();\n\t\tresponse = result.get(10000);\n\t\tGson gson = new Gson();\n\t\tUser[] users = gson.fromJson(response.getBody(), User[].class);\n\t\tfor(int i=0; i<users.length; i++){\n\t\t\tresultList.add(users[i]);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t\treturn resultList;\n\t}", "@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}", "@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}", "@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }", "public Users findAll() {\n\tthis.createConnection();\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(this.getAllQuery());\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n e.getStackTrace();\n return new Users();\n }\n }", "@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}", "public List<User> loadUsers() throws PersistentDataStoreException {\n\n List<User> users = new ArrayList<>();\n\n // Retrieve all users from the datastore.\n Query query = new Query(\"chat-users\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n UUID uuid = UUID.fromString((String) entity.getProperty(\"uuid\"));\n String userName = (String) entity.getProperty(\"username\");\n String password = (String) entity.getProperty(\"password\");\n Instant creationTime = Instant.parse((String) entity.getProperty(\"creation_time\"));\n // Note that any users created prior to this point will not be\n // blocked, because\n // this fails open.\n boolean blocked = Boolean.parseBoolean((String) entity.getProperty(\"blocked\"));\n\n User user = new User(uuid, userName, password, creationTime, blocked);\n users.add(user);\n } catch (Exception e) {\n // In a production environment, errors should be very rare.\n // Errors which may\n // occur include network errors, Datastore service errors,\n // authorization errors,\n // database entity definition mismatches, or service mismatches.\n throw new PersistentDataStoreException(e);\n }\n }\n\n return users;\n }", "public List<User> getAllUsers();", "public List<User> fetchAll()\n {\n String query = \"SELECT * FROM user\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class); // a collection type that holds the results of the query\n List<User> userList; // list of users that will be returned\n try\n {\n userList = template.query(query, userRowMapper); // call the database and assign the results to the userList\n } catch (EmptyResultDataAccessException e)\n {\n userList = new ArrayList<>(); // return an empty arrayList\n }\n return userList;\n }", "public List<User> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}", "List<User> getUsers();", "List<User> getUsers();", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }", "public UserRow[] getAllUsers() throws AdminPersistenceException {\n return (UserRow[]) getRows(SELECT_ALL_USERS).toArray(new UserRow[0]);\n }", "public List<User> retrieveAllUsers() {\n\t\treturn (List<User>) userRepository.findAll();\n\t}", "public static ArrayList<User> selectUsers() {\n \n ArrayList<User> users = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM users \";\n \n try {\n ps = connection.prepareStatement(query);\n rs = ps.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n User user = null;\n \n for (int i = 0; i < colCount; i++) {\n if (rs.next()) {\n user = new User();\n user.setUserID(rs.getInt(\"userID\"));\n user.setFirstName(rs.getString(\"firstName\"));\n user.setLastName(rs.getString(\"lastName\"));\n user.setEmail(rs.getString(\"email\"));\n user.setAddr1(rs.getString(\"addr1\"));\n user.setAddr2(rs.getString(\"addr2\"));\n user.setCity(rs.getString(\"city\"));\n user.setStateRegion(rs.getString(\"state\"));\n user.setZipcode(rs.getInt(\"zip\"));\n user.setCountry(rs.getString(\"country\"));\n user.setRoleName(rs.getString(\"roleName\"));\n System.out.println(user.getFirstName());\n users.add(user);\n }\n }\n return users;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "@RequestMapping(value = \"get_all_users\", headers = \"Accept=*/*\", method = {\n\t\t\tRequestMethod.GET }, produces = \"application/json\")\n\t@ResponseBody\n\[email protected](User.class)\n\tpublic User[] getAllUsers() {\n\t\tArrayList<User> users = new ArrayList<>();\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\t\t\tFindIterable<Document> iterDoc = collection.find();\n\n\t\t\t// Create all users collection\n\t\t\tint i = 1;\n\t\t\tIterator it = iterDoc.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tDocument docUser = (Document) it.next();\n\t\t\t\tUser user = new User((String) docUser.get(\"username\"), (String) docUser.get(\"firstName\"),\n\t\t\t\t\t\t(String) docUser.get(\"lastName\"));\n\t\t\t\tusers.add(user);\n\t\t\t}\n\n\t\t\t// Close DB connection\n\t\t\tmongoClient.close();\n\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\t// Insert list to array\n\t\tUser[] usersArray = new User[users.size()];\n\t\tusers.toArray(usersArray);\n\t\treturn usersArray;\n\t}", "@Override\r\n public Collection getAllUsers() throws SQLException {\r\n Session session = null;\r\n List users = new ArrayList<Users>();\r\n try {\r\n session = HibernateSessionFactory.getSessionFactory().openSession();\r\n users = session.createCriteria(Users.class).list();\r\n } catch (Exception ex) {\r\n log.error(\"Error in getAllUsers\", ex);\r\n } finally {\r\n if (session != null && session.isOpen())\r\n session.close();\r\n }\r\n return (Collection) users;\r\n }", "@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "public List<User> findAll() \n\t{\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORE.USERS\";\n\t\t\n\t\t// Instantiate a new list of Users.\n\t\tList<User> userList = new ArrayList<User>();\n\t\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\tuserList.add(new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\")));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn userList;\n\t}", "public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}", "public List<User> getAllUsers() {\n\n\t\tList<User> result = new ArrayList<User>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsers);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tString query = \"SELECT IdGlobal, TCELLIP, PUBLICKEY, TCELLPORT from USER\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint UserGID =rs.getInt(1);\n\t\t\t\tString TCellIP = rs.getString(2);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(3);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString pubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\tint port = rs.getInt(4);\n\t\t\t\tUser user = new User(UserGID,TCellIP, port, pubKey);\n\t\t\t\tresult.add(user);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\n\t}", "List<User> getAllUsers();", "List<User> getAllUsers();", "public static ObservableList<User> getUsers() throws SQLException {\n db.init();\n String q1 = \"{call [sp_retrieveUsers]}\";\n ObservableList<User> userList = FXCollections.observableArrayList();\n ResultSet rs = null;\n try {\n rs = db.callableStatementRs(q1);\n } catch (SQLException ex) {\n System.out.println(\"An error occured: \" + ex);\n }\n\n if (rs != null) {\n try {\n while (rs.next()) {\n User user = new User();\n user.setUserId(Integer.toString(rs.getInt(\"user_id\")));\n user.setFirstName(rs.getString(\"first_name\"));\n user.setLastName(rs.getString(\"last_name\"));\n user.setEmail(rs.getString(\"email\"));\n user.setUsername(rs.getString(\"username\"));\n user.setCrewId(Integer.toString(rs.getInt(\"crewId\")));\n\n userList.add(user);\n }\n } catch (SQLException ex) {\n System.out.println(\"An exception occured: \" + ex);\n log.error(ex.toString());\n }\n }\n return userList;\n }", "Iterable<User> getAllUsers();", "public List<User> getAllUsers() {\n\t\treturn userDao.getAllUsers();\n\t}", "public List<User> getAllUsers() {\n\t\tEntityManager entityManager = HandleConnectionToDB.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<User> users = entityManager.createQuery(\"from User\").getResultList();\n\t\tif (users.size() > 0) {\n\t\t\tusers.get(0).getFriendList().size();\n\t\t\tusers.get(0).getUserLobby().size();\n\t\t\tusers.get(0).getFriendList().size();\n\t\t}\n\t\tentityManager.getTransaction().commit();\n\n\t\tHandleConnectionToDB.closeEntityManager();\n\t\treturn users;\n\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<UserDto> getUsers() {\n\n\t\tList<UserEntity> userEntities = userRepository.findAll();\n\t\tList<UserDto> userDTOs = new ArrayList<>();\n\n\t\tfor (UserEntity u : userEntities)\n\t\t\tuserDTOs.add(etd.getUser(u));\n\t\treturn userDTOs;\n\n\t}", "@Override\n\tpublic Iterable<com.example.demo.model.User> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}", "public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }", "public ArrayList<User> getAllUsersBD() {\n ArrayList<User> users = new ArrayList<>();\n Cursor cursor = this.db.query(TABLE_USER, new String[]{ID_USER, USERNAME, AUTH_KEY, PASSWORD_HASH, EMAIL, STATUS, DATA_REGISTO, DATA_ATUALIZADO},\n null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n User auxUser = new User(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2),\n cursor.getString(3), cursor.getString(4),\n cursor.getInt(5), cursor.getInt(6),\n cursor.getInt(7));\n users.add(auxUser);\n } while (cursor.moveToNext());\n }\n cursor.close();\n\n return users;\n }", "public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "List<User> loadAll();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "public List<User> getAllUsers() {\n\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findAll\", User.class);\n\n\t\tList<User> result = query.getResultList();\n\t\tlog(\"got all users, result size: \" + result.size());\n\t\treturn result;\n\t}", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "public static String[] getAllUsers(Context context) {\r\n\r\n\t\tUri contentUri = Uri.withAppendedPath(EquestProvider.CONTENT_URI,\r\n\t\t\t\tEquestDbHelper.USER_TABLE);\r\n\t\tCursor cursor = context.getContentResolver().query(contentUri,\r\n\t\t\t\tnew String[] { EquestDbHelper.USERID }, null, null, null);\r\n\t\tint x = cursor.getCount();\r\n\t\tif (x == 0)\r\n\t\t\treturn new String[] { \"None Found\" };\r\n\t\tString Users[] = new String[x];\r\n\t\tint i = 0;\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\tUsers[i] = cursor.getString(cursor\r\n\t\t\t\t\t\t.getColumnIndex(EquestDbHelper.USERID));\r\n\t\t\t\ti++;\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\r\n\t\treturn Users;\r\n\t}", "@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}", "@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}", "@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<User> fetchAllUSers();", "public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }", "@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}", "@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}", "List<User> getAll() throws SQLException;", "public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}", "@Override\n\tpublic List<User> selectAllUser() {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectAllUser\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}", "@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "public ArrayList<String> findallusers() {\n\t\tArrayList<String> answer = new ArrayList<String>();\n\t\ttry {\n\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM users \");\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tanswer.add(rs.getString(1));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn answer;\n\t}", "public List<User> getAllUsers() {\n return users;\n }", "public List<User> getAllUsers() throws ReadException {\n LOGGER.log(Level.INFO, \"Metodo getAllUsers de la clase AbstractUserFacade\");\n try {\n return getEntityManager().createNamedQuery(\"findAllUsers\").getResultList();\n } catch (Exception e) {\n throw new ReadException(\"Error when trying to get all Users\");\n }\n }", "@Override\n\tpublic ArrayList<Utente> getUsers() {\n\t\tDB db = getDB();\n\t\tArrayList<Utente> usersList = new ArrayList<>();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente)\n\t\t\t\tusersList.add((Utente) user.getValue());\n\t\treturn usersList;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<User> getAllUsers() throws ToDoListDAOException{\r\n\t\tSession session = factory.openSession();\r\n\t\t\r\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tallUsers = session.createQuery(\"from User\").list();\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\tsession.getTransaction().rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn allUsers;\r\n\t}", "public List<User> getAllUsers(){\n return userRepository.findAll();\n }", "public RealmResults<User> getUsers() {\n\n return realm.where(User.class).findAll();\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public List<User> getUsers();", "public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}", "List<BlogUser> getUsers() throws DAOException;", "@Override\n\tpublic List<UserEntity> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}", "@Override\n public List<User> findAll() throws DaoException {\n log.info(\"Get all users\");\n return userDao.findAll();\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic List<User> getAll() {\n\t\tList<User> users = dao.getAll();\n\t\treturn users;\n\t}", "public List<DcUserDO> load() throws DataAccessException {\n\n return getSqlMapClientTemplate().queryForList(\"MS-DC-USER-LOAD\", null);\n\n }", "public Collection<User> getAllUser() {\n\t\treturn this.userDao.getUsers();\r\n\t}", "@Nonnull\n List<User> getUsers();" ]
[ "0.78048265", "0.7637834", "0.76309186", "0.760478", "0.75703806", "0.75604534", "0.75484306", "0.75329155", "0.753121", "0.7523638", "0.7499268", "0.7484884", "0.74636585", "0.7459056", "0.74449754", "0.7410056", "0.7405502", "0.7395238", "0.73873967", "0.7383468", "0.7370059", "0.73620176", "0.7362002", "0.73593485", "0.73513454", "0.7345871", "0.7339554", "0.7337314", "0.7320857", "0.7318256", "0.7312122", "0.7298877", "0.7279855", "0.7279847", "0.7272314", "0.7272314", "0.7268437", "0.7266155", "0.7260429", "0.72550035", "0.7251903", "0.72497535", "0.724858", "0.7240693", "0.72250915", "0.7224027", "0.721977", "0.7205048", "0.7192303", "0.7190196", "0.7190196", "0.7181276", "0.7178812", "0.71689385", "0.7167274", "0.71621794", "0.7139228", "0.7129609", "0.71193606", "0.7100075", "0.7091976", "0.70802534", "0.70797986", "0.707949", "0.70714194", "0.7067565", "0.705961", "0.70546836", "0.7054652", "0.70522517", "0.70491225", "0.70468086", "0.7035671", "0.7034781", "0.703224", "0.7018038", "0.701583", "0.7007528", "0.6998272", "0.6997966", "0.69948864", "0.69933367", "0.6993181", "0.6993036", "0.6992712", "0.69908756", "0.6988999", "0.6983998", "0.69817597", "0.698051", "0.6974965", "0.6967411", "0.6965868", "0.6964484", "0.6958453", "0.6954657", "0.6943837", "0.6943691", "0.6943179", "0.6933255", "0.69318277" ]
0.0
-1
checkUsername This function checks if the username entered already exists
public boolean checkUsername(String username) { for(int i=0; i<listOfUsers.size(); i++) { if(listOfUsers.get(i).compareTo(username)==0) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "boolean isUsernameExist(String username);", "public Boolean isUsernameExist(String username);", "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "public boolean userNameExist(String username);", "public boolean checkUsername(String user) {\n\n }", "public static boolean checkRegisteredUsername(String username){\n \tboolean found = false;\n \ttry {\n\t\t\tfound = DBHandler.isUsernameTaken(username, c); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn found;\n }", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public static Boolean checkUsername(String username){\n\t\t//String username = txtUsername.getText();\n\t\t//System.out.println(username);\n\t\treturn (username.equals(\"Admin\"));\n\t}", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "private boolean checkUsername(String newUsername, Label label)\n {\n label.setText(\"\");\n\n if(newUsername.length() == 0){\n label.setText(\"Please choose a username \");\n return false;\n }\n for(Account account : getListOfAccounts()){\n if(newUsername.equals(account.getUsername())){\n label.setText(\"This field is already taken by another account. Please choose another username\");\n return false;\n }\n }\n return true;\n }", "public boolean validateUsernameExist(String username) {\n return userRepository.findUsername(username);\n }", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "public abstract boolean checkUser(String username);", "private static boolean checkUsernameAvailable(String username) {\n if (username.length() <= 6) {\n return false; // Username too short.\n } else {\n if (!patients.isEmpty()) {\n for (Patient patient : patients\n ) {\n if (patient.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n for (Medic medic : medics\n ) {\n if (medic.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n }\n\n }\n return true;\n }", "private boolean validateUsername() {\n // Get doctor's username\n EditText doctorUsername = (EditText) rootView.findViewById(R.id.doctorField);\n String doctorUsernameString = doctorUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `doctor` on user.id=doctor.userid where username='%s'\", doctorUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Get patient's username\n EditText patientUsername = (EditText) rootView.findViewById(R.id.patientField);\n String patientUsernameString = patientUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `patient` on user.id=patient.userid where username='%s'\", patientUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "boolean isUserExists(Username username);", "public boolean checkUsername(String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"username\", username);\r\n\r\n // Returns whether at least one user with the given username exists\r\n return users.countDocuments(query) > 0;\r\n }", "boolean hasUserName();", "public boolean isUsernameTaken(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname;\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if(uname.equals(username)) {\n return true;\n }\n } while (cursor.moveToNext());\n }\n\n return false;\n }", "@Override\n public boolean checkUsername (User user) {\n String username = user.getUsername();\n User userEx = findByUserName(username);\n return userEx != null;\n }", "private boolean isUserNameValid(String username) {\n if (username == null) {\n return false;\n } else {\n return !username.trim().isEmpty();\n }\n }", "void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }", "public boolean existsUser(String username);", "boolean duplicatedUsername(String username);", "public boolean checkUsername(String name) {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(\"SELECT count(*) FROM users where username = '\" + name + \"'\");\r\n\t\t\treturn rs.first();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean isUniqueUsername(String username) throws SQLException;", "private boolean checkChangeUsernameValidity(String newUsername)\n {\n return (!newUsername.equals(\"\") && !newUsername.equals(controllerComponents.getAccount().getUsername()));\n }", "public boolean findValidUsername(String username) {\n if (allUserNames.isEmpty()) {\n return true;\n }\n for (String s: allUserNames) {\n if(s.equals(username)) {\n return false;\n }\n }\n return true;\n }", "private Boolean isValidUsername(String username){\n return (username != null) && (username.length() >= 5 && username.length() <= 16);\n }", "public boolean checkUsername(String username){\n\t\tFile userData = new File(\"Settings//\" + username + \".yml\");\n\n\t\t// If the players file exists.\n\t\tif(!userData.exists()){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "boolean exists(String username);", "boolean existsByUsername(String username);", "public boolean isUsernameValid(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tUser user=(User)session.get(User.class, username);//select * from user where username=?\n\t\tif(user!=null)\n\t\t\treturn false; //duplicate username, invalid\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean isUserNameValid(String username) {\n return TextUtils.isEmpty(username);\n }", "public boolean usernameExists(String username){\r\n\t\tCursor mCursor =\r\n \t this.mDb.query(true, DATABASE_TABLE, new String[] {USERNAME,PASSWORD,FIRSTNAME,FAMILYNAME,\r\n \t \t\tMAIL,RELIABILITY,POSITION,CITY,BIRTHDATE, ROW_ID, IMGPATH}, \r\n \t \t\tUSERNAME + \"= '\" + username+ \"'\", null, null, null, null, null);\r\n \t if (mCursor != null ) {\r\n \t mCursor.moveToFirst();\r\n \t }\r\n \tboolean res = mCursor.isAfterLast();\r\n \tmCursor.close();\r\n \treturn res;\r\n\t}", "public void checkUsername(ActionEvent actionEvent) {\n String temp= ClientAPI.getForgetPassword(username.getText());\n if(temp==null){\n userExist.setVisible(true);\n } else{\n userExist.setVisible(false);\n question.setText(temp.substring(0, temp.indexOf(\"|\")));\n help=temp.substring(temp.indexOf(\"|\")+1, temp.lastIndexOf(\"|\"));\n password.setText(temp.substring(temp.lastIndexOf(\"|\")+1));\n question.setVisible(true);\n }\n }", "@Override\n\tpublic boolean checkUsername(String userName) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tStatement userCheck = connectionService.getConnection().createStatement();\n\t\t\t//userCheck.executeQuery(\"SELECT name FROM players WHERE name='\" + userName + \"';\");\n\t\t\t\n\t\t\tResultSet rs = userCheck.executeQuery(\"SELECT username FROM players WHERE username='\" + userName + \"';\");\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\t\n\t\t\t\t//if (!rs.getString(\"\")\n\t\t\t\t\t\n\t\t\t\t\t//connectionService.finalize();\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//connectionService.finalize();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Exception: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t}", "public String validateUser(String un) {\n\t\tUser checkForUser = userDao.findByUsername(un);\n\t\tif (checkForUser != null) {\t\t\t\t\t//user exists\n\t\t\treturn \"That username already exists\";\n\t\t}\n\t\telse {\n\t\t\t//validate username\n\t\t\tif(!User.isValidUsername(un)) {\n\t\t\t\treturn \"Username must be between 5 and 11 characters and contain 1 alpha\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public boolean nameValidation(String username){\n return !(username.isEmpty() || !username.matches(\"[a-zA-Z0-9_-]+\"));\n }", "public static String createUsername() {\r\n\t\tboolean complete = false;\r\n\t\tString username = \"\";\r\n\t\t\r\n\t\twhile(complete == false) {\r\n\t\t\tSystem.out.println(\"Please type a username (no spaces):\");\r\n\t\t\tusername = scan.nextLine();\r\n\t\t\t//us.checkExit(username);\r\n\t\t\t\r\n\t\t\tif(us.checkUniqueUsername(username) == false) {\r\n\t\t\t\tSystem.out.println(\"Username is taken, try again, partner.\");\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if(username.contains(\" \")) {\r\n\t\t\t\tSystem.out.println(\"Invalid username - contains space(s)\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tcomplete = true;\r\n\t\t}//While1\r\n\t\t\r\n\t\treturn username;\r\n\t}", "public void checkUsernameAvailability(final Context context, final UsernameValidityListener listener) {\n if (getLoginRestClient() != null) {\n // Trigger a fake registration (without password) to know whether the user name is available or not.\n RegistrationParams params = new RegistrationParams();\n params.username = mUsername;\n\n // Note: We do not pass sessionId here, this is not necessary.\n\n register(context, params, new InternalRegistrationListener() {\n @Override\n public void onRegistrationSuccess() {\n // The registration could not succeed without password.\n // Keep calling listener (the error case) as a fallback,\n listener.onUsernameAvailabilityChecked(false);\n }\n\n @Override\n public void onRegistrationFailed(String message) {\n listener.onUsernameAvailabilityChecked(!TextUtils.equals(MatrixError.USER_IN_USE, message));\n }\n\n @Override\n public void onResourceLimitExceeded(MatrixError e) {\n // Should not happen, consider user is available, registration will fail later on\n listener.onUsernameAvailabilityChecked(true);\n }\n });\n }\n }", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "public void checkUserName(String userName, String playerType) throws Exception{\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\tSystem.out.println(\"Checking Username\");\r\n\t\tFile file = new File(filePath);\r\n\t\tif(file.exists()) {\r\n\t\t\tScanner in = new Scanner(file);\r\n\t\t\t//if a user with the same name is found, then choose different name\r\n\t\t\twhile(in.hasNextLine()) {\r\n\t\t\t\tif(userName.equals(in.nextLine())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t\tSystem.out.println(\"Username found\");\r\n\t\t\t\t\tsetuName(userName);\r\n\t\t\t\t\tif(Main.playerNum == 2)\r\n\t\t\t\t\t\tMain.resultLabel2.setText(userName);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMain.resultLabel1.setText(userName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tsetNameSame(check, userName, playerType) ;\r\n\t}", "public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }", "public static boolean userExists(String username) throws IOException, SQLException {\n ArrayList<String> user = retrieveUser(username);\n if (!user.isEmpty()) {\n if (user.get(0).equals(username)) {\n System.out.println(\"Username exists in database.\");\n return true;\n }\n }\n System.out.println(\"The user: \" + username + \" does not exist\");\n return false;\n }", "private void userNameErrorMessage(boolean exists, String userName){\n if(exists){\n System.out.println(\"\\nUserName: \" + userName + \" Already Exists In Database!\\n\");\n }\n }", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "boolean isUserExist(String username, String password);", "public boolean existsByUsername(String username);", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "public Map<Boolean, Set<String>> checkUsername(String username) throws UserNameException;", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "boolean isUser(String username);", "private static Boolean testUsername(String username){\n\t\t//Setting Up Regex -> All Numbers and Letters maximum 14 signs\n\t\tString pattern =\"[A-z1-9]{2,14}\";\n\t\tPattern p = Pattern.compile(pattern);\n\t\tMatcher m = p.matcher(username);\n\t\t\t\n\t\tif(m.matches() && !username.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "Boolean checkUserExists(String userName) throws AppException;", "public static String checkUsername(String in) {\n\t\tif (in.isEmpty())\r\n\t\t\treturn \"Username is empty\";\r\n\t\telse {\r\n\t\t\tPattern passPat = Pattern.compile(\"\\\\w*\");\r\n\t\t\tMatcher matchpass = passPat.matcher(in);\r\n\t\t\tif (!matchpass.matches()) {\r\n\t\t\t\treturn \"The username must only contain character and numeric\";\r\n\t\t\t} else\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static boolean CheckUsernameAvailable(String username) {\n JSONObject obj = new JSONObject();\n try {\n obj.put(\"type\", \"checkUsernameAvailable\");\n obj.put(\"username\", username);\n outWriter.println(obj);\n return Boolean.parseBoolean(inReader.readLine().toString());\n } catch (Exception exc) {\n //TODO: Raise exceptions through the ExceptionHandler class.\n System.out.println(\"Connection check username available error: \" + exc.toString());\n }\n return false;\n }", "public boolean validateUserName(String name)\n\t{\n\t\tif (username.getText().length() < MIN_USERNAME_LENGTH)\n\t\t{\n\t\t\tsetWarning(\"username too short\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!name.matches(\"^[a-zA-Z0-9]*$\"))\n\t\t{\n\t\t\tsetWarning(\"invalid username\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean askForUsername()\r\n\t{\r\n\t\tboolean nameEntered = true;\r\n\r\n\t\tTextInputDialog dialog = new TextInputDialog();\r\n\t\tdialog.setTitle(\"Nom d'utilisateur\");\r\n\t\tdialog.setHeaderText(null);\r\n\t\tdialog.setContentText(\"Entrer un nom d'utilisateur:\");\r\n\t\tOptional<String> result = dialog.showAndWait();\r\n\t\tif (result.isPresent())\r\n\t\t{\r\n\t\t\ttextFieldNomUtilisateur.setText(result.get());\r\n\t\t} else\r\n\t\t{\r\n\t\t\tnameEntered = false;\r\n\t\t}\r\n\r\n\t\treturn nameEntered;\r\n\t}", "public boolean isUsernameAvailable(String username) {\r\n\t\treturn utilisateurControlleur.isUsernameAvailable(username);\r\n\t}", "public boolean isUsernameTaken(String username) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n boolean taken = dbb.isUsernameTaken(username);\n dbb.commit();\n dbb.closeConnection();\n return taken;\n }", "public Boolean checkusername( String username){\n SQLiteDatabase sdb = this.getReadableDatabase();\n Cursor cursor = sdb.rawQuery(\"Select * from user where username=?\",new String[]{username});\n if(cursor.getCount()>0) {\n return false;\n }\n else {\n return true;\n }\n }", "private boolean isUserNameValid(String username) {\r\n if (username == null) {\r\n return false;\r\n }\r\n if (username.contains(\"@\")) {\r\n return Patterns.EMAIL_ADDRESS.matcher(username).matches();\r\n } else {\r\n return !username.trim().isEmpty();\r\n }\r\n }", "public void checkForTempUsername() {\r\n\t\t// get my profile, and check for a default username\r\n\t\tUserProfile userProfile = authenticationController.getCurrentUserProfile();\r\n\t\tif (userProfile != null && DisplayUtils.isTemporaryUsername(userProfile.getUserName())) {\r\n\t\t\tgotoChangeUsernamePlace();\r\n\t\t} else {\r\n\t\t\tgoToLastPlace();\r\n\t\t}\r\n\t}", "private void validationUsername( String username ) throws Exception {\n\n if ( username.length() < 4 ) {\n throw new Exception( \"Longueur du nom d'utilisateur invalide.\" );\n }\n if ( username == null ) {\n throw new Exception( \"Merci de saisir un nom d'utilisateur valide.\" );\n }\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private boolean isUserNameValid(String username) {\n if (username == null) {\n return false;\n }\n if (username.contains(\"@\")) {\n return Patterns.EMAIL_ADDRESS.matcher(username).matches();\n } else {\n return !username.trim().isEmpty();\n }\n }", "public int checkUsername(String username) {\n try {\n con = (Connection) DriverManager.getConnection(url, this.usernamel, this.passwordl);\n String query = \"SELECT Username FROM user\";\n pst = (com.mysql.jdbc.PreparedStatement) con.prepareStatement(query);\n rs = pst.executeQuery();\n while (rs.next()) {\n if (username.equals(rs.getString(1))) {\n return 0;\n\n }\n }\n return 1;\n\n } catch (Exception e) {\n //System.out.print(e);\n return 2;\n } finally {\n try {\n if (pst != null) {\n pst.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception e) {\n }\n\n }\n }", "public static boolean validateUsername(String username) {\n CharSequence inputStr = username;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z0-9_-]*$\");\n Matcher matcher = pattern.matcher(inputStr);\n return matcher.matches();\n }", "public boolean usernameMatches(Username username) {\n return this.credential.usernameEquals(username);\n }", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "public static boolean userNameDuplicate(String arg_username) {\n\n\t\tboolean userNameFound = false;\n\n\t\tfor (User u0 : userInfoArray) {\n\t\t\tString currentUserName = ((User) u0).getUserName();\n\t\t\tif (arg_username.toUpperCase().equals(currentUserName.toUpperCase())) {\n\t\t\t\tuserNameFound = true;\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\tuserNameFound = false;\n\t\t\t}\n\n\t\t}\n\t\treturn userNameFound;\n\t}", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}", "@Override\n public boolean isUserNameExists(String userName) {\n User user = getUserInfo(userName);\n return user != null && user.getUserName() != null && !user.getUserName().equals(\"\");\n }", "public boolean isRegisteredUserName(String userName);", "private boolean usernameAvailable(String username) throws ParseException {\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"username\", username);\n List<TipperUser> result = query.find();\n if (result.isEmpty()) {\n return true;\n } else return false;\n }", "@Override\n\tpublic int validateUsername(User u) {\n\t\treturn 0;\n\t}", "private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "public boolean checkAccount(String username) {\n\n\t\tString sql = \"SELECT count(*) FROM account WHERE username = '\" + username + \"'\";\n\t\ttry {\n\n\t\t\trs = stm.executeQuery(sql);\n\n\t\t\tif (rs.next() && rs.getInt(1) == 0) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t}", "static boolean checkUserName(String userName) {\n\t\ttry {\n\t\t\tfor (char c : userName.toCharArray()) {\n\t\t\t\tif ((c <= '9' && c >= '0') || (c >= 'A' && c <= 'Z')\n\t\t\t\t\t\t|| (c >= 'a' && c <= 'z')) {\n\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\t// TODO: handle exception\n\n\t\t}\n\n\t\treturn true;\n\t}", "public void validateUserName(String name) {\n\t\ttry {\n\t\t\tAssert.assertTrue(userName.getText().equalsIgnoreCase(\"Hi \"+name),\"Username is correctly displayed\");\n\t\t\tLog.addMessage(\"Username correctly displayed\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of User Login is failed\");\n\t\t\tLog.addMessage(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate User Login\");\n\t\t}\n\t}", "public boolean checkUserExists(String username) {\n boolean exists = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=?\");\n ps.setString(1, username);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is false if the set is empty\n exists = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return exists;\n }", "public boolean isUser(String userName) throws Exception;", "private void logic_for_username() {\n userID = SCUtils.getUniqueID(getApplicationContext());\n databaseRef.child(\"users\").child(userID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override public void onDataChange(DataSnapshot dataSnapshot) {\n progressBar.setVisibility(View.GONE);\n if (!dataSnapshot.exists()) {\n show_alert_username();\n } else {\n username = dataSnapshot.getValue(String.class);\n Snackbar.make(findViewById(android.R.id.content), \"Logged in as \" + username, Snackbar.LENGTH_SHORT).show();\n }\n }\n\n @Override public void onCancelled(DatabaseError databaseError) {\n Log.w(\"!!!\", \"username:onCancelled\", databaseError.toException());\n }\n });\n }", "@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "public String checkUsername(String username) {\r\n User user = mUserDAO.getUsersFromUsername(username);\r\n\r\n if(user == null) {\r\n return null;\r\n }\r\n\r\n return user.getPassword();\r\n }", "public static boolean isUsernameValid(String username) {\n if (username.length() > 50) { \n return false;\n } else { \n char c;\n int count = 1; \n for (int i = 0; i < username.length(); i++) {\n c = username.charAt(i);\n if (!Character.isLetterOrDigit(c)) { \n return false;\n }\n // If the character is a space\n else if (c == ' '){ \n return false;\n }\n else if (Character.isDigit(c)) {\n count++;\n if (count > 6) { \n return false;\n } \n }\n }\n }\n return true;\n }", "public void testvalidateUserName0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"usrnm\"));\n\t}", "@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic boolean isUsernameAvailable(String username);" ]
[ "0.8114855", "0.7985345", "0.7926757", "0.78815365", "0.7862056", "0.78435093", "0.78075033", "0.77420944", "0.7718291", "0.7718291", "0.7718291", "0.7718291", "0.7718291", "0.7718291", "0.7704987", "0.76946044", "0.76189315", "0.7589772", "0.75490534", "0.75299907", "0.7478985", "0.74520963", "0.73466516", "0.7256272", "0.7254771", "0.7231104", "0.7187375", "0.7179704", "0.7174", "0.71739346", "0.7118383", "0.7115643", "0.7093373", "0.70846254", "0.70741934", "0.70612186", "0.7016127", "0.69936943", "0.69849354", "0.698268", "0.6962635", "0.69280887", "0.69193095", "0.69177914", "0.69057775", "0.69035685", "0.68937874", "0.68847007", "0.68828315", "0.6882658", "0.6874062", "0.6872485", "0.6862644", "0.6861478", "0.6859481", "0.68523675", "0.68521893", "0.68309057", "0.6828415", "0.68193954", "0.6818009", "0.6803966", "0.6802085", "0.67916137", "0.6785361", "0.6782272", "0.67728084", "0.67548645", "0.673777", "0.6737094", "0.672976", "0.6727066", "0.6725708", "0.67026985", "0.6690382", "0.6688228", "0.6682575", "0.66795814", "0.6660103", "0.6646772", "0.6643378", "0.6642307", "0.66360265", "0.6630471", "0.6624923", "0.6622081", "0.6607211", "0.6576406", "0.6574248", "0.6562519", "0.6554274", "0.6550839", "0.6549034", "0.6543825", "0.65258926", "0.6524125", "0.6507295", "0.64751595", "0.6469095", "0.6468662" ]
0.6851654
57
This is a helper function that takes the ImageView and image as a string and sets the image of the ImageView to the image
public void decodeImage(String completeImageData, ImageView imageView) { if (completeImageData == null) { return; } // Incase you're storing into aws or other places where we have extension stored in the starting. String imageDataBytes = completeImageData.substring(completeImageData.indexOf(",")+1); InputStream stream = new ByteArrayInputStream(Base64.decode(imageDataBytes.getBytes(), Base64.DEFAULT)); Bitmap bitmap = BitmapFactory.decodeStream(stream); imageView.setImageBitmap(bitmap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setImage(String image);", "public void setImage(Context ctx, String image)\n {\n }", "private void setImage(String image) {\n Bitmap bitmap;\n try {\n byte[] encodeByte = Base64.decode(image, Base64.DEFAULT);\n bitmap = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length);\n } catch (Exception e) {\n e.getMessage();\n Log.d(\"No valid image\", \"setImage: Failed\");\n return;\n }\n\n ImageView imgView = (ImageView) findViewById(R.id.cameraView);\n if (imgView != null && image != null) {\n imgView.setImageBitmap(bitmap);\n }\n }", "public Builder setImage(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n image_ = value;\n onChanged();\n return this;\n }", "public void setImage(){\n\n Bundle extras = getIntent().getExtras();\n String image = extras.getString(\"pic\");\n String imageFlower = extras.getString(\"picflower\");\n\n\n\n if(image != null) {\n int pic = getResources().getIdentifier(image + \".png\",\"drawable\",getPackageName());\n\n achvImage.setImageResource(pic);\n achvImage.setVisibility(View.VISIBLE);\n\n }else {\n int flowerPic = getResources().getIdentifier(imageFlower + \".jpg\", \"drawable\", getPackageName());\n achvImage.setImageResource(flowerPic);\n achvImage.setVisibility(View.VISIBLE);\n }\n\n achvImage.setImageResource(R.drawable.medaldetails);\n\n\n String text = extras.getString(\"text\");\n achvDetails.setText(text);\n\n String title = extras.getString(\"title\");\n achvTitle.setText(title);\n\n int points1 = extras.getInt(\"points\");\n points.setText(\"Points: \" + points1);\n\n\n String desText1 = extras.getString(\"achDesA\");\n des1.setText(desText1);\n\n\n\n\n }", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "public final void setImage(java.lang.String image)\n\t{\n\t\tsetImage(getContext(), image);\n\t}", "void setImage(Bitmap bitmap);", "void setImage(IViewModel image);", "private void setImage(Bitmap image) {\n }", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public void setImageView(ImageView imageView) {\r\n _imageView = imageView;\r\n }", "public void setImage(Drawable image){\n\t\tmImage = image;\n\t}", "private static void setPicasso(@NonNull Context context, RemoteViews views, int viewId, @NonNull String imageUrl) {\n\n try {\n //java.lang.IllegalArgumentException: Path must not be empty\n if (imageUrl.length() > 0) {\n Bitmap logoBitmap = Picasso.with(context).load(Utils.builtURI(imageUrl)).get();\n views.setImageViewBitmap(viewId, logoBitmap);\n } else {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n }\n\n } catch (IOException | IllegalArgumentException e) {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n e.printStackTrace();\n }\n\n }", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }", "Builder addImage(String value);", "public void setImage(String image){\n this.image = image;\n }", "public taskimage(ImageView t134){\n t34=t134;\n\n\n }", "public ImageView setImageView(String imagePath) {\n Image image = new Image(getClass().getResourceAsStream(imagePath));\n ImageView imageView = new ImageView(image);\n imageView.setFitWidth(30);\n imageView.setFitHeight(30);\n return imageView;\n }", "public ImageView getImage(String image) {\r\n\r\n Image shippPic = new Image(image);\r\n ImageView shipImage = new ImageView();\r\n shipImage.setImage(shippPic);\r\n shipImage.setFitWidth(blockSize);\r\n shipImage.setFitHeight(blockSize);\r\n return shipImage;\r\n }", "void setImageFromURL(String imageURL);", "void mo36482a(ImageView imageView, Uri uri);", "void setImageResource(String imageResource) throws IOException;", "public void setImage(String _image)\n {\n this.image = _image;\n }", "public void setImg(String img) {\n this.img = img;\n }", "public void setImage(String image) {\n this.image = image;\n }", "public void setImage(String image) {\n this.image = image;\n }", "private void m10994a(String str, int i) {\n View reusedImageView = getReusedImageView();\n reusedImageView.setTag(str);\n reusedImageView.setId(i);\n reusedImageView.setOnClickListener(this);\n Object obj = str.startsWith(\"http://\") ? str + \"?imageView2/2/w/\" + ((this.f9968i * 4) / 5) : \"file://\" + str;\n if (!TextUtils.isEmpty(obj)) {\n Picasso.with(this.f9965f).load(obj).fit().error(C1373R.drawable.bg_1b1b1b).placeholder(C1373R.drawable.bg_1b1b1b).centerCrop().into(reusedImageView);\n }\n this.f9972m.addView(reusedImageView, i);\n }", "void lSetImage(Image img);", "void setImageFromFile(File imageFile);", "void mo36480a(int i, int i2, ImageView imageView, Uri uri);", "public void setImage(Image image) {\n this.image = image;\n }", "public void setImage(String tmp) {\n this.image = tmp;\n }", "private void changePicture(String s)\n {\n ImageView userPic = (ImageView)findViewById(R.id.imageViewOther);\n\n Glide.with(this)\n .asBitmap()\n .load(s)\n .into(userPic);\n }", "void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}", "private void displayImage(String url, ImageView image){\n Ion.with(image)\n .placeholder(R.drawable.fgclogo)\n .error(R.drawable.fgclogo)\n .load(url);\n }", "@Generated\n @Selector(\"setImage:\")\n public native void setImage(@Nullable UIImage value);", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "private void setCategoryImage(ImageView imageView, String url, TextView tV_category, String categoryName, int color) {\n // set image\n /* if (url!=null && !url.isEmpty())\n Picasso.with(mActivity)\n .load(url)\n .placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);*/\n\n if (url != null && !url.isEmpty())\n Glide.with(mActivity)\n .load(url)\n //.placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);\n\n // set category name\n if (categoryName != null) {\n // make first character of character is uppercase\n categoryName = categoryName.substring(0, 1).toUpperCase() + categoryName.substring(1).toLowerCase();\n tV_category.setText(categoryName);\n tV_category.setTextColor(color);\n }\n }", "@Override \r\n\t\t public boolean setViewValue(View view, Object data, \r\n\t\t String textRepresentation) {\n\t\t if(view instanceof ImageView && data instanceof Bitmap){ \r\n\t\t ImageView i = (ImageView)view; \r\n\t\t i.setImageBitmap((Bitmap) data); \r\n\t\t return true; \r\n\t\t } \r\n\t\t return false; \r\n\t\t }", "public void setImage(final Image image) {\r\n getView().setImage(image);\r\n getView().setFitWidth(this.getDimension().getWidth());\r\n getView().setPreserveRatio(true);\r\n getView().setViewport(new Rectangle2D(0, 0, this.getDimension().getWidth(), this.getDimension().getHeight()));\r\n }", "public void setImage(String image) {\n\t\t this.image = image;\n\t}", "public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }", "public void setImage(String Image) {\n this.Image = Image;\n }", "void mo36483b(int i, ImageView imageView, Uri uri);", "public S<T> image(String name){\n\t\tname = name.trim();\n\t\tBoolean b = false;\n\t\t\n\t\tint theid = activity.getResources().getIdentifier(\n\t\t\t\tname, \"drawable\", activity.getApplicationContext().getPackageName());\n\t\t\n\t\ttry {\n\t\t\tif(t instanceof ImageView)\n\t\t\t{\n\t\t\t\tjava.net.URL url = new URL(name);\n\n\t }\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\tb = true;\n\t\t}\n\t\t\n\t\tif(b){\n\t\t\t\n\n\t\t\t\n\t\t\tif(t instanceof ImageView){\n\t\t\t\t((ImageView)t).setImageResource(theid);\n\t\t\t}\n\t\t\tif(t instanceof ImageButton){\n\t\t\t\t((ImageButton)t).setImageResource(theid);\n\t\t\t}\n\t\t\tif(t instanceof LinkedList){\n\t\t\t\tLinkedList<View> auxl = (LinkedList<View>)t;\n\t\t\t\tfor (View v : auxl) {\n\t\t\t\t\tt= (T) v;\n\t\t\t\t\timage(name);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tt= (T) auxl;\n\t\t\t}\n\t\t}else{\n\t \n\t // Imageview to show\n\t int loader = R.drawable.ic_launcher;\n\t // ImageLoader class instance\n\t ImageLoader imgLoader = new ImageLoader(activity.getApplicationContext(),loader);\n\t // whenever you want to load an image from url\n\t // call DisplayImage function\n\t // url - image url to load\n\t // loader - loader image, will be displayed before getting image\n\t // image - ImageView \n\t imgLoader.DisplayImage(name, loader, (ImageView)t);\n\t\t}\n\t\treturn this;\n\t}", "public void setImageView(double x, double y) {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image);\n \tboss.setTranslateX(x);\n \tboss.setTranslateY(y);\n }", "private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }", "private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }", "void mo36481a(int i, ImageView imageView, Uri uri);", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n\t\t/* Associate the Bitmap to the ImageView */\n mImageView.setImageBitmap(bitmap);\n mTextView.setText(mCurrentPhotoPath);\n\n // SendImage(mCurrentPhotoPath);\n\n // AsyncCallWS task = new AsyncCallWS();\n // Call execute\n // task.execute();\n }", "private void setName(String imageUrl, String imageName, String roleName){\r\n Log.d(TAG, \"setName: setting name to widgets.\");\r\n TextView n = findViewById(R.id.textView);\r\n n.setText(imageName);\r\n TextView r = findViewById(R.id.textView1);\r\n r.setText(roleName);\r\n\r\n ImageView imageView = findViewById(R.id.profile_image);\r\n Glide.with(this)\r\n .asBitmap()\r\n .load(imageUrl)\r\n .into(imageView);\r\n }", "void setImagePath(String path);", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "@BindingAdapter({\"bind:ImagePath\"})\n public static void setFlag(ImageView view, String ImagePath) {\n\n Picasso.get()\n .load(ImagePath)\n .placeholder(R.drawable.placeholder)\n// .resize(150,100)\n .error(R.drawable.placeholder)\n .into(view);\n }", "public void m2266a(String str) {\n this.f1876a.setImageResource(C0595e.m802a(str, drawable.class));\n }", "public final void setImage(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String image)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Image.toString(), image);\n\t}", "public void setImageResourceTo(@DrawableRes int resId, int viewId) {\n ImageView imageView = getViewById(viewId);\n if (imageView != null) {\n imageView.setImageResource(resId);\n }\n }", "@Override\n public void getDrawable(Drawable drawable) {\n imageView.setImageDrawable(drawable);\n }", "@Override\n public boolean setViewValue(View view, Object data,\n String textRepresentation) {\n if (view instanceof ImageView && data instanceof Bitmap) {\n ImageView i = (ImageView) view;\n i.setImageBitmap((Bitmap) data);\n return true;\n }\n return false;\n }", "private void setStudentImage() {\n ImagePicker.create(this)\n .single()\n .origin(images)\n .imageTitle(\"Tap to select student profile\") // image selection title\n .start(REQUEST_CODE_PICKER); // start image picker activity with request code\n }", "public Builder setImagePath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n imagePath_ = value;\n onChanged();\n return this;\n }", "@BindingAdapter(\"bind:imageUrl\")\n public static void setImageUrl(ImageView imageView, String url) {\n Context context = imageView.getContext();\n Glide.with( context ).load( url ).into( imageView );\n }", "void setImage(TokenEntry entry, @NonNull String newImage);", "private void setImage() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n Bitmap originalBm = BitmapFactory.decodeFile(tempFile.getAbsolutePath(), options);\n // Log.d(TAG, \"setImage : \" + tempFile.getAbsolutePath());\n\n myImage.setImageBitmap(originalBm);\n\n /**\n * tempFile 사용 후 null 처리를 해줘야 합니다.\n * (resultCode != RESULT_OK) 일 때 tempFile 을 삭제하기 때문에\n * 기존에 데이터가 남아 있게 되면 원치 않은 삭제가 이뤄집니다.\n */\n System.out.println(\"setImage : \" + tempFile.getAbsolutePath());\n fileSource = tempFile.getAbsolutePath();\n myImageSource = fileSource;\n check++;\n tempFile = null;\n\n }", "public void setImage(String image) {\n\t\tif(image!=null)\n\t\t\tthis.image = image;\n\t}", "private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }", "public void setImage(String imageName)\n {\n if (imageName == null)\n {\n setImage((Image) null);\n }\n else\n {\n setImage(new Image(imageName));\n }\n }", "public Builder setInto(ImageView imageView) {\n this.imageViewBuilder = imageView;\n return this;\n }", "Builder addImage(ImageObject value);", "Builder addImage(URL value);", "private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "private void setPic() {\n int targetW = imageView.getWidth();\n int targetH = imageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageView.setImageBitmap(bitmap);\n imageView.invalidate();\n }", "@Override\n public boolean setViewValue(View view, Object data, String textRepresentation) {\n if (view instanceof ImageView && data instanceof Bitmap) {\n\n ImageView iv = (ImageView) view;\n iv.setImageBitmap((Bitmap) data);\n return true;\n } else\n return false;\n }", "void setImage(PImage img) {\n _img = img;\n }", "public void setImg_1(String img_1) {\n this.img_1 = img_1;\n }", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "public void setImage(Bitmap image) {\n this.image = image;\n }", "private void setNote(ImageView image) {\n\n // In order to get dimensions of the screen- will be used for determining bounds of transformation\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n // Log.d(LOG_TAG, \"Screen dimensions: \" + width + \", \" + height);\n\n // Getting random point for transformation\n Random rand = new Random();\n float x = rand.nextInt(width - image.getWidth()); // new x coordinate\n float y = rand.nextInt((int) (height)) + height / 2; // new y coordinate\n\n // Setting new coordinates\n image.setX(x);\n image.setY(y);\n // Log.d(LOG_TAG, \"New coordinates \" + x + \", \" + y);\n }", "public void testGetSetImageString() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE (\"PACMAN/littlepill.png\" because it exists)\n\t\ttestNormal.setImage(\"PACMAN/bigpill.png\");\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/bigpill.png\").getImage());\n\t}", "public void loadImage(final String path, final ImageView imageView){\r\n imageView.setTag(path);\r\n if (mUIHandler==null){\r\n mUIHandler=new Handler(){\r\n @Override\r\n public void handleMessage(Message msg) {\r\n //Get the image and set its imageView.\r\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }\r\n };\r\n }\r\n //Get the bitmap through the path in the cache.\r\n Bitmap bm=getBitmapFromLruCache(path);\r\n if (bm!=null){\r\n refreshBitmap(bm, path, imageView);\r\n }else{\r\n addTask(() -> {\r\n //Get the size of the image which wants to be displayed.\r\n ImageSize imageSize= getImageViewSize(imageView);\r\n //Compress the image.\r\n Bitmap bm1 =decodeSampledBitmapFromPath(imageSize.width,imageSize.height,path);\r\n //Put the image into the cache.\r\n addBitmapToLruCache(path, bm1);\r\n //Refresh the display of the image.\r\n refreshBitmap(bm1, path, imageView);\r\n mSemaphoreThreadPool.release();\r\n });\r\n }\r\n\r\n }", "public static void setImg(nsIDOMElement img, String fileImageName) {\r\n img.setAttribute(HTML.ATTR_SRC, \"file://\" //$NON-NLS-1$\r\n + getAbsoluteResourcePath(fileImageName).replace('\\\\', '/'));\r\n }", "public void setImage( String s )\r\n {\r\n java.net.URL url = getClass().getResource( s );\r\n if ( url == null )\r\n {\r\n url = getClass().getResource( \"/\" + s );\r\n if ( url == null )\r\n {\r\n try\r\n { // for applications\r\n content = ImageIO.read( new File( s ) );\r\n }\r\n catch ( IOException ioe )\r\n {\r\n ioe.printStackTrace();\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n flush();\r\n\r\n }", "private ImageView setStartMenuImage() {\r\n Image image = null;\r\n try {\r\n image = new Image(new FileInputStream(\"images/icon1.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n ImageView imageView = new ImageView(image);\r\n imageView.setFitHeight(HEIGHT / 4);\r\n imageView.setPreserveRatio(true);\r\n return imageView;\r\n }", "public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean setViewValue(View view, Object data,\n String textRepresentation) {\n if (view instanceof ImageView && data instanceof Bitmap) {\n ImageView i = (ImageView) view;\n i.setImageBitmap((Bitmap) data);\n return true;\n }\n return false;\n }", "public void setImage(String file){ \n try {\n image = ImageIO.read(new File(file));\n } catch (IOException ex) {\n Logger.getLogger(GridSquarePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void m2261I() {\n try {\n if (this.f2513n != null) {\n this.f2513n.setImageDrawable(C5150d.m3784a(mo61159b().getResources(), \"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA39pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozODRkZTAxYi00OWRkLWM4NDYtYThkNC0wZWRiMDMwYTZlODAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QkE0Q0U2MUY2QzA0MTFFNUE3MkJGQjQ1MTkzOEYxQUUiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QkE0Q0U2MUU2QzA0MTFFNUE3MkJGQjQ1MTkzOEYxQUUiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjlkZjAyMGU0LTNlYmUtZTY0ZC04YjRiLWM5ZWY4MTU4ZjFhYyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmU1MzEzNDdlLTZjMDEtMTFlNS1hZGZlLThmMTBjZWYxMGRiZSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PngNsEEAAANeSURBVHjatFfNS1tBEH+pUZOQ0B4i3sTSxHMRFNQoFBEP7dHgvyDiKWgguQra9F+oxqNiwOTQ+oFI1ZM3jSf1YK5FL41ooaKZzu+x+4gv2bx9Rgd+JNn5zO7s7IzH0CQiCvLHZ8YnxkfGe8ZbwS4zSowTxi/GT4/Hc2u8BLHjCOM745b06VboRJpx7GN8ZfyDxUqlQgcHB5RMJmloaIg6Ozupra3NBL5jDTzIQFYQdDOw5db5B8YxLDw+PtLKygr19PQQWDqIRqOUzWZNXUHH2rvBgr2M39C6uLig/v5+bcd2QLdUKskgYLNX57yvIL2zs0OhUOjZziU6Ojro8PBQBnGl3Alm+BknkMI54mybdS4BW3t7ezKIInzVCwDJYm4Zon4p5xLYzfPzcxlEpl7S3SNpmjlznZwQiXn/5CjEnTUzt5GBsbExamlpUfLBg0wjG8vLy3IXlqTzEAoH7m4kElEqTk1Nmfd7bW2tbhBYAw8ykFXZgQ9RJ1CsQghgEr/29/eVStPT09XFhdbX18nr9Vr81tZWyuVyFh+yMzMzSnvwJWjyDS+MYic2NzeV17O7u9vg2m79jsfjBv9bg7PbxOrqqjExMWHxIdvV1aW0V+VrFDtwhFCGh4cbnl0mk6kp+BsbGybsBNlGtkZGRqToEQK4xjfUc6csXlhYcHyFFhcXHe3Al6BrQz427e3tWldpfn5e6Rw83cIkHyvXAUAZb4SdsKZbPe0BaB+Bz+cjTiDlDmxtbZkybo9AKwn9fj9tb2875gBkINvIFnzJJMQ1PMV9GBgYUF6bQCBgFAoFY3x8/Ml6KpUy0un0kzXIQBY6KqrydapViPL5fM0/Rfcj+fhuJw5CqxBpleJYLEY3NzeW8dnZ2RoZrEmCLHQcSvGdWYrFe7CEFTwUqqjR85XLZUokEkoZ8CADWe3HqKoTcnyOdW5KI5m+vj56eHiQz3G0bkNyeXn5ag3J2dmZ/PffVC1Z8bVast3d3eqWLKDVlAaDwaadh8Nhvaa0XluOHg7n9lzn0MWRarfltp0oysEErRqGDTeDCbK9ajApuh7TxGiWERlrjWZzc3M0ODhYM5phDTzbaHb/rNHMFkhUNK13LobTv6K2RJ3se1yO519s4/k7wf5jG89/6I7n/wUYAGo3YtcprD4sAAAAAElFTkSuQmCC\"));\n this.f2513n.setScaleType(ScaleType.FIT_CENTER);\n }\n } catch (Exception e) {\n C5017f.m3256a(mo61159b(), C5015d.EXCEPTION, \"MraidMode.showDefaultCloseButton\", e.getMessage(), \"\");\n }\n }", "void downloadImage(String imageURL, ImageView imageView);", "void setImage(Layer layer, Image image);", "void mo6660a(Context context, String str, ImageView imageView, C1492a aVar);", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "public void setImage(Image image) {\n this.image = image;\n width = image.getWidth();\n height = image.getHeight();\n }", "@BindingAdapter(\"thumbnailImageUrl\")\n public static void setImages(ImageView imageView, String thumbnailImageUrl) {\n Context context = imageView.getContext();\n\n Glide.with(context).load(thumbnailImageUrl).error(R.drawable.default_user).into(imageView);\n }", "public void setImage(ButtonBase button, String fileName) {\n String imagePath = FILE_PROTOCOL + PATH_IMAGES + fileName;\n Image buttonImage = new Image(imagePath);\n\t\n\t// SET THE IMAGE IN THE BUTTON\n button.setGraphic(new ImageView(buttonImage));\t\n }" ]
[ "0.7463822", "0.717787", "0.70136327", "0.6960751", "0.6918009", "0.6901384", "0.68953097", "0.6849014", "0.6849014", "0.67376953", "0.67343706", "0.67067826", "0.6703881", "0.6674495", "0.664319", "0.6629865", "0.66218984", "0.6621069", "0.6611708", "0.6596327", "0.65847033", "0.6577647", "0.6533664", "0.6514685", "0.65111053", "0.6508692", "0.6492899", "0.6477252", "0.64647794", "0.6426762", "0.63702047", "0.63702047", "0.62659657", "0.62614465", "0.62584907", "0.6255839", "0.6252613", "0.6251616", "0.6246024", "0.6243507", "0.6218208", "0.62142926", "0.62137234", "0.6211431", "0.6210017", "0.6205967", "0.6205114", "0.61954236", "0.61699414", "0.61608905", "0.61506134", "0.61413985", "0.613558", "0.6131479", "0.6130434", "0.6123566", "0.6118704", "0.61131924", "0.6090493", "0.608661", "0.6081363", "0.6077026", "0.6073587", "0.607251", "0.6071971", "0.60713875", "0.60593176", "0.6044968", "0.60434014", "0.6038125", "0.6035375", "0.6031202", "0.60204", "0.6018047", "0.60168236", "0.6009477", "0.6007519", "0.60023737", "0.59983766", "0.5982724", "0.5977634", "0.5974707", "0.5965688", "0.59346527", "0.59300977", "0.5920975", "0.5912601", "0.5911808", "0.59004366", "0.58988225", "0.58829874", "0.58726966", "0.58691823", "0.58647513", "0.5854701", "0.58479774", "0.5843222", "0.5840303", "0.58325136", "0.58301187", "0.5829846" ]
0.0
-1
This function is called when an intent is created that has to interact with another API directly.
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case 3: { if (resultCode == Activity.RESULT_OK && data != null) { Uri image = data.getData(); try { Bitmap temp = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), image); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); temp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream); byte[] byteArray = byteArrayOutputStream.toByteArray(); int num = 50; while (byteArray.length > 10000 && num > 0) { // compress image to not more than 10 kb byteArrayOutputStream.flush(); byteArrayOutputStream.reset(); temp.compress(Bitmap.CompressFormat.JPEG, num, byteArrayOutputStream); num = num / 2; byteArray = byteArrayOutputStream.toByteArray(); } this.profilePic = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT); profilePicChanged = true; Toast.makeText(dialog.getContext(), "Image Uploaded", Toast.LENGTH_SHORT).show(); decodeImage(profilePic, editImage); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onNewIntent(Intent intent) {\n }", "@Override\n protected void onNewIntent(Intent intent){\n handleIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n handleIntent(intent);\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n\n }", "@Override\n\tpublic void onNewIntent(Intent intent) {\n\t\tsetIntent(intent);\n\t}", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n handleIntent(intent);\n }", "@Override\n public void onNewIntent(Activity activity, Intent data) {\n }", "@Override\r\n public void onNewIntent(Intent intent){\r\n super.onNewIntent(intent);\r\n\r\n //changes the intent returned by getIntent()\r\n setIntent(intent);\r\n }", "public void onNewIntent(Intent intent) {\n }", "protected abstract Intent createOne();", "@Override\n protected void onHandleIntent(Intent workIntent) {\n }", "@Override\n\tprotected void onHandleIntent(Intent arg0) {\n\t\t\n\t}", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\n\t}", "@Override\r\n\tprotected void onNewIntent(Intent intent) {\n\t\tXSDK.getInstance().onNewIntent(intent);\r\n\t\tsuper.onNewIntent(intent);\r\n\t}", "@Override\n\tprotected void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tsetIntent(intent);\n\t}", "@Override\n public void onRebind(Intent intent) {\n // TODO: Return the communication channel to the service.\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG)Log.d(TAG,\"onRebind\");\n if(startIntent != null){\n intent=startIntent;\n }\n engine.newClient(intent,this,true);\n }", "void mo21580A(Intent intent);", "@Override \n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent); \n \n initData();\n }", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n Log.e(TAG, \"onNew Intent \" + this.getClass().getName());\n }", "public void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n initParams(intent);\n }", "@Override\r\nprotected void onNewIntent(Intent intent) {\n\tsuper.onNewIntent(intent);\r\nSystem.out.println(\"onNewIntent\");\r\n}", "public void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n handleIntent(intent);\n }", "public interface OnNewIntent {\n void onNewIntent(ZHIntent zHIntent);\n}", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n //get the retrieved data\n Uri twitURI = intent.getData();\n //make sure the url is correct\n if (twitURI != null && twitURI.toString().startsWith(TWIT_URL)) {\n //is verifcation - get the returned data\n String oaVerifier = twitURI.getQueryParameter(\"oauth_verifier\");\n new RetrieveAuthData().execute(oaVerifier);\n }\n }", "@Override\r\n public void onNewIntent(Intent intent){\r\n \t\r\n \tthis.activateExamBoard(intent);\r\n }", "@Override\n public IBinder onBind(Intent intent) {\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG)Log.d(TAG,\"onBind packet client: \"+getApplicationContext().getPackageName()+\" 6\");\n Signature[] sigs = new Signature[0];\n\n try {\n sigs = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES).signatures;\n } catch (PackageManager.NameNotFoundException e) {\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG)Log.e(TAG,\"Error in get sign \"+e.getMessage());\n }\n for (Signature sig : sigs)\n {\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG)Log.i(TAG, \"Signature hashcode : \"+ sig.hashCode());\n }\n String[] paramets;\n if((paramets=checkPermission(this))!=null && paramets.length>0){\n PermissionRequestUtils.requestPermissions(this,paramets);\n }else{\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG){\n Log.d(TAG,\"The SDK has all the permissions\"); }\n }\n if(startIntent != null){\n intent=startIntent;\n }\n return engine.newClient(intent,this,false);\n }", "private Intent createIntent() {\n Intent intent = new Intent(this, GameOverActivity.class);\n intent.putExtra(POINTS, presenter.getPoints() + points);\n intent.putExtra(PASS_USER, user);\n intent.putExtra(CORRECT, correct);\n intent.putExtra(INCORRECT, incorrect);\n intent.putExtra(TIME, time);\n intent.putExtra(EVIL, evil);\n intent.putExtra(FRIENDLY, friendly);\n intent.putExtra(\"from\", \"bonus\");\n return intent;\n }", "@Override\n\t\t\t\tpublic void onNewIntent(TiRootActivity activity, Intent intent)\n\t\t\t\t{\n\t\t\t\t\tTiActivity.this.onNewIntent(intent);\n\t\t\t\t}", "Intent createNewIntent(Class cls);", "@Override\n\tprotected void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tToast.makeText(MainActivity.this, \"player\", Toast.LENGTH_SHORT).show();\n\t}", "void startNewActivity(Intent intent);", "@Override\n protected void onNewIntent(Intent intent) {\n Log.d(TAG, getString(R.string.debug_key) + \"TagWriter intent filter success\");\n this.setIntent(intent);\n }", "@Override\n protected CallStatusCode placeCallInternal(Intent intent) {\n if (DBG) log(\"placeCallInternal()... intent = \" + intent);\n int sub = intent.getIntExtra(SUBSCRIPTION_KEY, mApp.getVoiceSubscription());\n\n PhoneUtils.setActiveSubscription(sub);\n return super.placeCallInternal(intent);\n }", "public void onNewIntent(Intent intent) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onNewIntent\");\n m6632c(intent);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n intent = getIntent();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\thandleIntent(getIntent());\r\n\t}", "@Override\n public IBinder onBind(Intent intent) {\n return stub;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return stub;\n }", "protected abstract Intent getIntent();", "private void openActivity() {\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n Log.d(TAG, \"onHandleIntent()\");\n YambaClient yambaClient = YambaApplication.getYambaApp(this).getYambaClient();\n if (yambaClient == null) {\n Log.w(TAG, \"Ignoring request to refresh when the client is missing\");\n } else {\n this.maxCreatedAt = TimelineUtil.getStatusMaxCreatedAt(contentResolver);\n try {\n yambaClient.fetchFriendsTimeline(this);\n } catch (YambaClientException e) {\n Log.wtf(TAG, \"Failed to fetch timeline\", e);\n }\n }\n }", "void onCreate(Intent intent);", "public interface IntentStarter {\n void startActivityForResult(ResultRequestor requestor, Intent intent);\n}", "public Intent putIntentToNext(){\n Intent myTobaccoIntent = new Intent(getApplicationContext(), LoginActivity.class);\n myTobaccoIntent.putExtra(AppSettingUtils.EXTRAS_DEVICE_ADDRESS, deviceAddress);\n myTobaccoIntent.putExtra(AppSettingUtils.EXTRAS_SERVER_IP, ipAddress);\n return myTobaccoIntent;\n }", "private void handleIntent(Intent intent, boolean isOnNewIntent) {\n handleIntent(intent.getAction(), intent.getExtras(), intent.getData(), isOnNewIntent);\n }", "public void onNewIntent(Intent intent) {\n this.eventDelegate.onNewIntent(intent);\n }", "@Override\r\n\tprotected void onNewIntent(Intent intent) {\n\t\tUtils.printLog(TAG, \"onNewIntent\");\r\n\t\tif (!getPlayList(intent)) {\r\n\t\t\texitPlayforNoPlayList();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (mVideoContrl != null && mVideoContrl.isFinishInit()) {\r\n\t\t\tmVideoContrl.setFinishInit(false);\r\n\t\t\tisOnNewIntent = true;\r\n\t\t\tmVideoContrl.releaseMediaPlayer();\r\n\t\t}\r\n\t\tsuper.onNewIntent(intent);\r\n\t\tUtils.printLog(TAG, \"onNewIntent end\");\r\n\t}", "public final void mo25517a(Intent intent) {\n }", "@Override\n\tprotected void onNewIntent(Intent intent)\n\t{\n\t\tif (checkIntentForSearch(intent))\n\t\t\tfillData();\n\t}", "@Nullable\n @Override\n public IBinder onBind(Intent intent){\n return null;\n }", "@Override\n public IBinder onBind(Intent arg0) {\n intent=arg0;\n return null;\n }", "public void prepare_intent(int requestCode, long invoking_id){\n Intent intent = new Intent(BilansView.this, BilansAdd.class);\n\n if (invoking_id > 0) {\n HashMap<String, String> map = GetItem(invoking_id);\n intent.putExtra(\"item_id\", invoking_id);\n String timestamp[] = map.get(\"data\").split(\" \");\n intent.putExtra(\"data\", timestamp[0]);\n intent.putExtra(\"time\", timestamp[1]);\n intent.putExtra(\"tytul\", map.get(\"tytul\"));\n } else {\n intent.putExtra(\"data\", Utils.datenow());\n intent.putExtra(\"time\", Utils.timenow());\n intent.putExtra(\"amount\", \"\");\n }\n startActivityForResult(intent, requestCode);\n }", "void transactTo_setDefaultLauncher(int code, String transactName, ComponentName who, String packageName, String className, int userId) {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \"to device policy manager service.\");\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeString(packageName);\n _data.writeString(className);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }", "protected void onNewIntent(android.content.Intent intent) {\n java.lang.String referrer = intent.getStringExtra(\"referrer\");\n android.util.Log.d(\"TRACKING\", \"Reffff: \" + referrer);\n android.content.Intent i = new android.content.Intent();\n i.setAction(\"RRR_AAA_FFF\");\n i.putExtra(\"r\", referrer);\n this.context.sendBroadcast(i);\n super.onNewIntent(intent);\n }", "@Override\n\n public IBinder onBind(Intent intent) {\n\n return null;\n\n }", "@Override\r\n public IBinder onBind(Intent intent) {\n return null;\r\n }", "@Override\r\n public IBinder onBind(Intent intent) {\n return null;\r\n }", "@Override\r\n public IBinder onBind(Intent intent) {\n return null;\r\n }", "@Override\n public IBinder onBind(Intent intent)\n {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent)\n {\n return null;\n }", "@Nullable\n @Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\r\n public IBinder onBind(Intent intent) {\r\n return null;\r\n\r\n }", "@Override\n\tprotected void obtainIntentValue() {\n\n\t}", "public void onNewIntent(Intent intent) {\n AppMethodBeat.m2504i(16653);\n super.onNewIntent(intent);\n setIntent(intent);\n if (this.ggF != null) {\n this.ggF.dismiss();\n this.ggF = null;\n }\n if (!anB()) {\n finish();\n }\n AppMethodBeat.m2505o(16653);\n }", "@Override\n public IBinder onBind(Intent intent) {\n return bookManagerImp;\n }", "@Override\n\tpublic void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tfinal Uri uri = intent.getData();\n\t\tpreferencias = this.getSharedPreferences(\"TwitterPrefs\", MODE_PRIVATE);\n\t\n\t\tif (uri != null && uri.toString().indexOf(TwitterData.CALLBACK_URL) != -1) {\n\t\t\tLog.i(\"MGL\", \"Callback received : \" + uri);\n\t\t\n\t\t\tnew RetrieveAccessTokenTask(this, getConsumer(), getProvider(),\n\t\t\t\t\tpreferencias).execute(uri);\n\t\t}\n\t}", "public interface BroadCastManagerCallerInterface {\n /**\n * **\n * This method is called when an intent Has Been ReceivedT hrough The BroadCast\n * @param intent This is the intent that was received\n */\n void intentHasBeenReceivedThroughTheBroadCast(Intent intent);\n}", "@Override\n public IBinder onBind(Intent intent) {\n\n return null;\n }", "@Override\r\n public IBinder onBind(Intent intent) {\n return binder;\r\n }", "private void m56319ab(Intent intent) {\n AppMethodBeat.m2504i(41901);\n boolean booleanExtra = intent.getBooleanExtra(\"key_create_succ\", false);\n String stringExtra = intent.getStringExtra(\"key_card_no\");\n String stringExtra2 = intent.getStringExtra(\"key_card_type\");\n C4990ab.m7417i(this.TAG, \"create succ: %s\", Boolean.valueOf(booleanExtra));\n if (booleanExtra) {\n m56322b(stringExtra, true, stringExtra2);\n }\n AppMethodBeat.m2505o(41901);\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return null;\n }" ]
[ "0.6997682", "0.69260794", "0.68390965", "0.680397", "0.6749193", "0.6749193", "0.6725258", "0.664812", "0.6610334", "0.6595911", "0.6574354", "0.64935833", "0.6490802", "0.6455762", "0.6455436", "0.6452085", "0.6448361", "0.64409053", "0.64271444", "0.6360842", "0.63574046", "0.6315474", "0.631509", "0.6260411", "0.62182575", "0.6180649", "0.61155933", "0.61013734", "0.6083823", "0.59876263", "0.595706", "0.59376097", "0.5918765", "0.59061515", "0.5896553", "0.5868981", "0.58660895", "0.58636516", "0.5819484", "0.57990104", "0.57672864", "0.57672864", "0.57669103", "0.56979835", "0.56979567", "0.5677891", "0.5669674", "0.56297046", "0.56282383", "0.55944365", "0.55610067", "0.5557593", "0.55533254", "0.5552658", "0.5549881", "0.55365187", "0.55305827", "0.55295444", "0.5525527", "0.55182815", "0.55182815", "0.55182815", "0.5512099", "0.5512099", "0.5511005", "0.5507891", "0.54908746", "0.54901886", "0.548847", "0.54833615", "0.54788417", "0.547355", "0.5472126", "0.5468523", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639", "0.5465639" ]
0.0
-1
requested Experiment index LineChart constructor. (For invocation by subclass constructors, typically implicit.) Creates a line chart of Players' payoffs against each round of game played. LineChart method also defines a title for the chart as well as the frame. Modified sections identified
public LineChart(String frameTitle) { super(frameTitle); // Display frame title final JFrame frame = new JFrame(frameTitle); frame.setDefaultCloseOperation(frame.getDefaultCloseOperation()); JFreeChart lineChart = ChartFactory.createLineChart("Experiment : "+ (expNum+1), "Tournament", "Cummulative Pay-Off", /** Modified from original code **/ createDataset(), PlotOrientation.VERTICAL, true, true, false); // plot graph lineChart.setBackgroundPaint(Color.white); // set background color ChartPanel chartPanel = new ChartPanel(lineChart); chartPanel.setPreferredSize(new java.awt.Dimension(1200, 700)); setContentPane(chartPanel); chartPanel.setLayout(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LineChart() {\n init();\n }", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\r\n }", "public Parent createLineGraph(ObservableList<HappinessReport> data) {\n xAxis = new CategoryAxis();\n xAxis.setLabel(\"Country\");\n //Yaxis Creation\n yAxis = new NumberAxis();\n yAxis.setLabel(\"Life Expectancy (Years)\");\n //Chart Creation\n linechart = new LineChart<>(xAxis, yAxis);\n linechart.setTitle(\"Linechart\");\n //Country and Score Data load into chart\n for (int intx = 0; intx < data.size(); intx++) {\n XYChart.Series LineChartSeries = new XYChart.Series<>();\n LineChartSeries.getData().add(new XYChart.Data(String.valueOf(data.get(intx).getCountry()), data.get(intx).getExpectancy()));\n linechart.getData().add(LineChartSeries);\n }\n linechart.setTitle(\"Horizontal Bar Chart Example\");\n linechart.setVerticalGridLinesVisible(false);\n linechart.setLegendVisible(false);\n return linechart;\n }", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "@Override\n\t\t\t\tprotected LineChartPanel getLineChartPanel() {\n\t\t\t\t\treturn lineChartPanel;\n\t\t\t\t}", "private void initCourse(final ArrayList<CourseLearning> courseLearnings){\n// Log.i(\"courseinfo\", courseLearnings.get(0).toString());\n// Log.i(\"courseinfo\", courseLearnings.get(1).toString());\n// Log.i(\"courseinfo\", courseLearnings.get(2).toString());\n\n LineChartDatas chartData = new LineChartDatas(new Date());\n String[] posX = chartData.getPosX();\n// Log.i(\"date\", posX[0]+posX[1]+posX[2]+posX[3]+posX[4]+posX[5]+posX[6]);\n int[] posY = {0,0,0,0,0,0,0};\n Calendar calendar = Calendar.getInstance();\n Date date = new Date();\n calendar.setTime(date);\n ArrayList<String> week=new ArrayList<>();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n for(int i =0;i<7;i++){\n calendar.add(Calendar.DATE,-1);\n date=calendar.getTime();\n String format = simpleDateFormat.format(date);\n Log.i(\"date:\",format);\n week.add(format);\n for(Iterator<CourseLearning> iterator=courseLearnings.iterator();iterator.hasNext();){\n CourseLearning courseLearning = iterator.next();\n if(simpleDateFormat.format(courseLearning.getTime()).equals(format)){\n posY[(6-i)%7] += courseLearning.getDruation()/60000;\n }\n }\n }\n for(int i =0;i<7;i++){\n Log.i(\"posY=\",posY[i]+\"\");\n }\n mPointValues=new ArrayList<>();\n mAxisValues = new ArrayList<>();\n\n for (int i = 0; i < 7 ; i++) {\n mPointValues.add(new PointValue(i, posY[i]));\n mAxisValues.add(new AxisValue(i).setLabel(posX[i])); //为每个对应的i设置相应的label(显示在X轴)\n }\n\n Line line = new Line(mPointValues).setColor(BLUE).setCubic(false);\n List<Line> lines = new ArrayList<Line>();\n lines.add(line);\n LineChartData data = new LineChartData();\n data.setLines(lines);\n\n//坐标轴\n Axis axisX = new Axis(); //X轴\n axisX.setHasTiltedLabels(true);\n axisX.setTextColor(BLUE);\n axisX.setName(\"当天课程学习\");\n axisX.setMaxLabelChars(10);\n axisX.setValues(mAxisValues);\n data.setAxisXBottom(axisX);\n\n Axis axisY = new Axis(); //Y轴\n axisY.setMaxLabelChars(7); //默认是3,只能看最后三个数字\n data.setAxisYLeft(axisY);\n\n//设置行为属性,支持缩放、滑动以及平移\n mLineChartView.setInteractive(true);\n mLineChartView.setZoomType(ZoomType.HORIZONTAL);\n mLineChartView.setContainerScrollEnabled(true, ContainerScrollType.HORIZONTAL);\n mLineChartView.setLineChartData(data);\n mLineChartView.setVisibility(View.VISIBLE);\n\n }", "public LineGraph(final String title) {\n super(title);\n final CategoryDataset dataset = createSampleDataset();\n final JFreeChart chart = createChart(dataset);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new Dimension(500, 270));\n setContentPane(chartPanel);\n }", "private void makeChart() {\n\n Log.d(\"Chart\",\"Start Chart\");\n\n ArrayList<Entry> speedList = new ArrayList<>();\n ArrayList<Entry> avgSpeedList = new ArrayList<>();\n ArrayList<Entry> avgAltList = new ArrayList<>();\n\n int numberOfValues = trackingList.size();\n\n //Fills the data in the Arrays Entry (xValue,yValue)\n for(int i = 0; i < numberOfValues;i++){\n float avgSpeed = (float)averageSpeed;\n float avgAlt = (float)averageAlt;\n float curSpeed = (float)trackingList.get(i).getSpeed();\n\n Log.d(\"Chart\",\"CurSpeed: \" +curSpeed);\n\n avgSpeedList.add(new Entry(i*3,avgSpeed));\n speedList.add(new Entry(i*3,curSpeed));\n avgAltList.add(new Entry(i*3,avgAlt));\n }\n\n ArrayList<String> xAXES = new ArrayList<>();\n\n\n String[] xaxes = new String[xAXES.size()];\n for(int i=0; i<xAXES.size();i++){\n xaxes[i] = xAXES.get(i);\n }\n\n // More than one Array (Line in the Graph)\n ArrayList<ILineDataSet> lineDataSets = new ArrayList<>();\n\n //Speed Graph setup\n LineDataSet lineDataSet1 = new LineDataSet(speedList,\"Speed\");\n lineDataSet1.setDrawCircles(false);\n lineDataSet1.setColor(Color.BLUE);\n lineDataSet1.setLineWidth(2);\n\n //AvgSpeed setup\n LineDataSet lineDataSet2 = new LineDataSet(avgSpeedList,\"AvgSpeedLine\");\n lineDataSet2.setDrawCircles(false);\n lineDataSet2.setColor(Color.RED);\n lineDataSet2.setLineWidth(3);\n\n //AvgAlt setup\n LineDataSet lineDataSet3 = new LineDataSet(avgAltList,\"AvgAltLine\");\n lineDataSet3.setDrawCircles(false);\n lineDataSet3.setColor(Color.MAGENTA);\n lineDataSet3.setLineWidth(3);\n\n //Add them to the List\n lineDataSets.add(lineDataSet1);\n lineDataSets.add(lineDataSet2);\n lineDataSets.add(lineDataSet3);\n\n //setup for the xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n //Puts the data in the Graph\n lineChart.setData(new LineData(lineDataSets));\n lineChart.setVisibleXRangeMaximum(65f);\n\n //Chart description\n lineChart.getDescription().setText(\"All Speed\");\n\n //Shows timer information when clicked\n lineChart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), \"Its measured every 3 seconds\",Toast.LENGTH_LONG).show();\n }\n });\n }", "public void drawChart() {\n ArrayList<Entry> confuse = new ArrayList<>();\n ArrayList<Entry> attention = new ArrayList<>();\n ArrayList<Entry> engagement = new ArrayList<>();\n ArrayList<Entry> joy = new ArrayList<>();\n ArrayList<Entry> valence = new ArrayList<>();\n // point = \"Brow Furrow: \\n\";\n String dum = null, dum2 = null;\n for (int i = 0; i < size; i++) {\n //point += (\"\" + Emotion.getBrowFurrow(i).getL() + \" seconds reading of \" + Emotion.getBrowFurrow(i).getR() + \"\\n\");\n dum2 = Emotion.getBrowFurrow(i).getL().toString();\n dum = Emotion.getBrowFurrow(i).getR().toString();\n confuse.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getAttention(i).getL().toString();\n dum = Emotion.getAttention(i).getR().toString();\n attention.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getEngagement(i).getL().toString();\n dum = Emotion.getEngagement(i).getR().toString();\n engagement.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getJoy(i).getL().toString();\n dum = Emotion.getJoy(i).getR().toString();\n joy.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getValence(i).getL().toString();\n dum = Emotion.getValence(i).getR().toString();\n valence.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n }\n\n LineDataSet data1 = new LineDataSet(confuse,\"Confuse\");\n LineDataSet data2 = new LineDataSet(attention,\"Attention\");\n LineDataSet data3 = new LineDataSet(engagement,\"Engagement\");\n LineDataSet data4 = new LineDataSet(joy,\"Engagement\");\n LineDataSet data5 = new LineDataSet(valence,\"Valence\");\n data1.setColor(Color.BLUE);\n data1.setDrawCircles(false);\n data2.setColor(Color.YELLOW);\n data2.setDrawCircles(false);\n data3.setColor(Color.GRAY);\n data3.setDrawCircles(false);\n data4.setColor(Color.MAGENTA);\n data4.setDrawCircles(false);\n data5.setColor(Color.GREEN);\n data5.setDrawCircles(false);\n\n\n dataSets.add(data1);\n dataSets.add(data2);\n dataSets.add(data3);\n dataSets.add(data4);\n dataSets.add(data5);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public void createNewLineChart() {\n\n ArrayList<Entry> yValues = new ArrayList<>();\n yValues.clear();\n\n //Todays Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n// String currentMonth = getMonthForInt(localDate.getMonthValue());\n if (monthSelectedAsInt > localDate.getMonthValue()){\n yValues.add(new Entry(0, 0));\n } else if (monthSelectedAsInt == localDate.getMonthValue()){\n for (int i = 1; i <= localDate.getDayOfMonth() ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n } else {\n for (int i = 1; i <= numberOfDays ; i++) {\n yValues.add(new Entry(i, occupancyRate[i]));\n }\n }\n\n //chart.setOnChartValueSelectedListener(this);\n\n // enable scaling and dragging\n chart.setDragEnabled(true);\n chart.setScaleEnabled(true);\n\n // if disabled, scaling can be done on x- and y-axis separately\n chart.setPinchZoom(false);\n\n LineDataSet set1;\n\n set1 = new LineDataSet(yValues, \"Occupany Rate \");\n set1.setDrawCircles(false);\n set1.setDrawValues(false);\n set1.setColor(Color.RED);\n\n ArrayList <ILineDataSet> dataSets = new ArrayList<>();\n dataSets.add(set1);\n LineData dataLine = new LineData(set1);\n chart.getDescription().setEnabled(false);\n chart.getXAxis().setTextSize(10f);\n chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n\n chart.getAxisLeft().setAxisMinimum(0);\n chart.getAxisLeft().setAxisMaximum(100);\n chart.getAxisRight().setAxisMinimum(0);\n chart.getAxisRight().setAxisMaximum(100);\n chart.getXAxis().setAxisMinimum(1);\n chart.getXAxis().setAxisMaximum(numberOfDays);\n\n chart.setData(dataLine);\n chart.invalidate();\n }", "private void initializeChart(final List<DateCounter> data)\n {\n final XYSeries series = new XYSeries(TITLE_XY_SERIES);\n\n //Adding data to the chart\n addDataToXYSeries(data, series);\n\n //Finalizing the chart\n final XYSeriesCollection coll = new XYSeriesCollection(series);\n final JFreeChart chart = ChartFactory.createXYLineChart(TITLE_CHART, X_AXIS_TITLE,\n Y_AXIS_TITLE, coll, PlotOrientation.VERTICAL, true, true, false);\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new java.awt.Dimension(SIZE_CHART_PANEL, SIZE_CHART_PANEL));\n this.add(chartPanel, BorderLayout.CENTER);\n }", "private void setDataLineChart() {\n\t\t\n\t\tchartLine.setTitle(\"Evolution du Solde\");\n\t\tchartLine.getData().clear();\n\t\t\n\t\tXYChart.Series series = new XYChart.Series();\n\t\tseries.getData().clear();\n\t\tseries.setName(\"Evolution du solde\");\n\t\t\n\t\tdouble solde = bal.getAmount();\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH);\n\t\tint currentDay = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\t\n\t\t// Create a calendar object and set year and month\n\t\tCalendar mycal = new GregorianCalendar(currentYear, currentMonth,\n\t\t\t\tcurrentDay);\n\t\t\n\t\t// Get the number of days in that month\n\t\tint daysInMonth = mycal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\n\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\tsolde -= transaction.getAmount();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < currentDay; ++i) {\n\t\t\tif (!bal.getTransactions().isEmpty()) {\n\t\t\t\tfor (IOTransactionLogic transaction : bal.getTransactions()\n\t\t\t\t\t\t.get(currentYear)[currentMonth]) {\n\t\t\t\t\tjava.sql.Date dat = transaction.getDate();\n\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\tcal.setTime(dat);\n\t\t\t\t\tif (cal.get(Calendar.DAY_OF_MONTH) - 1 == i) {\n\t\t\t\t\t\tsolde += transaction.getAmount();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tseries.getData()\n\t\t\t\t\t.add(new XYChart.Data(String.valueOf(i + 1), solde));\n\t\t}\n\t\t\n\t\tchartLine.getData().addAll(series);\n\t\tchartLine.setLegendVisible(false);\n\t}", "public static void main(String[] args) {\n\t\texpNum = Integer.parseInt(args[0]);\n\n\t\tLineChart chart = new LineChart(\n\t\t\t\t\"Line Graph of Agent Pay-Off vrs Tournament\");\n\t\t/** Title Modified from original code **/\n\t\tchart.pack(); // resize the window to fit the graph\n\t\tRefineryUtilities.centerFrameOnScreen(chart); // display chart on screen\t\t\t\t\t\t\t\t\t\t\t\n\t\tchart.setVisible(true); // show the chart\n\t}", "public Chart(double[][] result, double[][] observed){\n //Create a new Frame object\n final Frame f1 = new Frame(\"Model Fit\");\n\t//Set the Frame object size\t\n\tf1.setSize(600,400);\n //Add a window listener to the Frame to close it\n\tf1.addWindowListener(new WindowAdapter() {\n @Override\n\t\tpublic void windowClosing(WindowEvent we) {\n\t\t\tf1.dispose();\n\t\t}\n\t});\n \n //add in the code to create the chart\n //create a data object to hold the XY data\n DefaultXYDataset data = new DefaultXYDataset();\n //cycle through the origins\n for (int i = 0; i < observed.length; i++) {\n //create a two dimensional array to hold the observed and result\n double dataArray[][] = new double[2][observed[i].length];\n //put the observed data in element 0\n dataArray[0]=observed[i];\n //put the result data in element 1\n dataArray[1]=result[i];\n //add the data series with a unique name\n data.addSeries(\"Origin \"+i, dataArray);\n }\n\t//Create the chart with the correct title and axis names and data etc.\n\tJFreeChart chart = ChartFactory.createScatterPlot(\"Observed vs. Results\", \n\t\t\"Observed\", // x axis label\n\t\t\"Results\", // y axis label\n\t\tdata, // data\n\t\tPlotOrientation.VERTICAL, // orientation\n\t\ttrue, // legend\n\t\ttrue, // tooltips\n\t\tfalse // URLs\n\t);\n\t//get the plot area and format it to the desired colours\n\tXYPlot plot = (XYPlot) chart.getPlot();\n\tplot.setBackgroundPaint(Color.white);\n\tplot.setDomainGridlinePaint(Color.darkGray);\n\tplot.setDomainGridlinesVisible(true);\n\tplot.setRangeGridlinePaint(Color.black);\n\t\n\t// We're going to add some regression stuff here shortly.\n double[] coeffs = Regression.getOLSRegression(createTwoDArray(result, observed));\n\tLineFunction2D linefunction2d = new LineFunction2D(coeffs[0], coeffs[1]);\n\tXYDataset series2 = DatasetUtilities.sampleFunction2D(linefunction2d, 10, 50, 5, \"Linear Regression Line\");\n\tplot.setDataset(2, series2); \n\tXYLineAndShapeRenderer lineDrawer = new XYLineAndShapeRenderer(true, false);\n\tlineDrawer.setSeriesPaint(0, Color.BLACK);\n\tplot.setRenderer(2, lineDrawer);\n\t\n //create a chart panel to render to the screnn\n\tChartPanel chartPanel = new ChartPanel(chart);\n //add the chart panel to the frame\n\tf1.add(chartPanel);\n //set the frame to be visible\n\tf1.setVisible(true);\n }", "public void updateLineChart()\r\n {\r\n hoursLoggedSeries = new XYChart.Series<>();\r\n hoursLoggedSeries.setName(Integer.toString(LocalDate.now().getYear()));\r\n lineChart.getData().clear();\r\n \r\n try{\r\n populateSeriesFromDB();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n lineChart.getData().addAll(hoursLoggedSeries);\r\n }", "YChart(Player player) {\n\t\tthis.player = player;\n\t\tintList = new ArrayList<>();\n\t}", "public void initializeChart(String subtitle) {\n JFreeChart jfreechart = ChartFactory.createXYLineChart(\n subtitle, \"X\", \"Y\", this.dataset.getXYDataset(),\n PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer();\n xylineandshaperenderer.setBaseLinesVisible(true);\n\n // System.out.println(\"date set series count: \" + xydataset.getSeriesCount());\n // set visible or not shapes of series\n// System.out.printf(\"sets in the dataset: \"); // TODO delete this \"print\" if necessary\n for (int i = 0; i < this.dataset.seriesCount(); i++) {\n// System.out.printf(this.dataset.getSeries(i).getKey() + \" \");\n xylineandshaperenderer.setSeriesLinesVisible(i, false);\n xylineandshaperenderer.setSeriesShapesVisible(i, this.dataset.shapeVisible(i));\n }\n xylineandshaperenderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());\n xyplot.setRenderer(xylineandshaperenderer);\n NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n this.jPanel = new ChartPanel(jfreechart);\n }", "public LinesDimension1() {\n \n }", "public Plot(String S, int _numEstimations) {\n\t\tsuper(S);\n\n\t\tnumEstimations = _numEstimations;\n\t\t\n\t\tpanel = new JPanel();\n\t\tBoxLayout layout = new BoxLayout(panel,BoxLayout.Y_AXIS);\n\t\tpanel.setLayout(layout);\n\t\n\t\tmakeNrmsePanel();\n\t\t\n\t\tchart = ChartFactory.createXYLineChart(\"\",\"\",\"\",new XYSeriesCollection(),PlotOrientation.VERTICAL,false,false,false);\n\t\t\n\t\tchart.getXYPlot().setBackgroundPaint(Color.WHITE);\n\n\t\tchartPanel = new ChartPanel(chart);\n\t\tpanel.add(chartPanel);\n\t\t\n\t\tToolkit toolkit = Toolkit.getDefaultToolkit ();\n\t\tDimension dim = toolkit.getScreenSize();\n\t\tdim.setSize(dim.getWidth()*0.75, dim.getHeight()*0.75);\n\t\tchartPanel.setPreferredSize(dim);\n\t\t\n\t\t\n\t\tif (S.startsWith(\"D\")) setLocation(360,45);\n\t\telse setLocation(480,75);\n\t\t\t\n\t\tsetContentPane(panel);\n\t\tpack();\n\t\tsetVisible(true);\n\n\t\tmakeLegend();\n\n\t}", "private Chart(){}", "public Plot( String applicationTitle, String chartTitle, List<double []> XYPoints_list ) {\n super(applicationTitle);\n JFreeChart xylineChart = ChartFactory.createXYLineChart(\n chartTitle ,\n \"Training Set Size\" ,\n \"Error\" ,\n createDataset(XYPoints_list) ,\n PlotOrientation.VERTICAL ,\n true , true , false);\n\n ChartPanel chartPanel = new ChartPanel( xylineChart );\n chartPanel.setPreferredSize( new java.awt.Dimension( 560 , 367 ) );\n final XYPlot plot = xylineChart.getXYPlot( );\n\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer( );\n renderer.setSeriesPaint( 0 , Color.RED );\n /*renderer.setSeriesPaint( 1 , Color.GREEN );\n renderer.setSeriesPaint( 2 , Color.YELLOW );*/\n renderer.setSeriesStroke( 0 , new BasicStroke( 4.0f ) );\n /*renderer.setSeriesStroke( 1 , new BasicStroke( 3.0f ) );\n renderer.setSeriesStroke( 2 , new BasicStroke( 2.0f ) );*/\n plot.setRenderer( renderer );\n setContentPane( chartPanel );\n }", "public void setLineData(ArrayList<Integer> allDay) {\r\n\r\n ArrayList<String> xVals = new ArrayList<String>();\r\n for (int i = 1; i <= 24; i++) {\r\n xVals.add((i) + \"\");\r\n }\r\n\r\n ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n\r\n for (int i = 1; i <= 24; i++) {\r\n vals1.add(new Entry(allDay.get(i-1), i));\r\n }\r\n Log.v(\"vals1\",vals1.toString());\r\n \t\r\n \t\r\n// \tint count = 45;\r\n// \tint range = 100; \r\n// \tArrayList<String> xVals = new ArrayList<String>();\r\n// for (int i = 0; i < count; i++) {\r\n// xVals.add((1990 +i) + \"\");\r\n// }\r\n//\r\n// ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n//\r\n// for (int i = 0; i < count; i++) {\r\n// float mult = (range + 1);\r\n// float val = (float) (Math.random() * mult) + 20;// + (float)\r\n// // ((mult *\r\n// // 0.1) / 10);\r\n// vals1.add(new Entry(val, i));\r\n// }\r\n// \r\n \t\r\n // create a dataset and give it a type\r\n LineDataSet set1 = new LineDataSet(vals1, \"DataSet 1\");\r\n set1.setDrawCubic(true);\r\n set1.setCubicIntensity(0.2f);\r\n set1.setDrawFilled(true);\r\n set1.setDrawCircles(false); \r\n set1.setLineWidth(2f);\r\n set1.setCircleSize(5f);\r\n set1.setHighLightColor(Color.rgb(244, 117, 117));\r\n set1.setColor(Color.rgb(104, 241, 175));\r\n\r\n ArrayList<LineDataSet> dataSets = new ArrayList<LineDataSet>();\r\n dataSets.add(set1);\r\n\r\n // create a data object with the datasets\r\n LineData data = new LineData(xVals, dataSets);\r\n\r\n // set data\r\n nChart.setData(data);\r\n }", "public DrawLineGraph()\n\t{\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"Line Graph\");\n\t\tframe.setSize(600,400);\n\t\tframe.setLayout(new BorderLayout());\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\n\t\tseries = new XYSeries(\"Cross Entropy Cost Function\");\n\t\tXYSeriesCollection dataset = new XYSeriesCollection(series);\n\t\tchart = ChartFactory.createXYLineChart(\"Cross Entropy Cost Function\", \"Epoch\", \"Error\", dataset);\n\t\tframe.add(new ChartPanel(chart), BorderLayout.CENTER);\n\t\t\n\n\t}", "private void initChart() {\r\n /*mCurrentSeries = new XYSeries(\"Sample Data\");\r\n mDataset.addSeries(mCurrentSeries);\r\n mCurrentRenderer = new XYSeriesRenderer();\r\n mRenderer.addSeriesRenderer(mCurrentRenderer);*/\r\n \t\r\n \tList<Integer> MyListValue = new ArrayList<Integer>();\r\n\t\t/*for (int i = 0; i < SpeakingTimeList.size(); i++){\r\n\t\t\tMyListValue.add(SpeakingTimeList.get(i));\r\n\t\t}*/\r\n\t\tfor (int i = 0; i < participantAndSpeakingTimeList.size(); i++){\r\n\t\t\tMyListValue.add(participantAndSpeakingTimeList.get(i).getValue());\r\n\t\t}\r\n\t\t\r\n\t\t/*MyList.add(25);\r\n\t\tMyList.add(10);\r\n\t\tMyList.add(15);\r\n\t\tMyList.add(20);*/\r\n\t\t\t\t\r\n\t\tint[] y = new int[MyListValue.size()];\r\n\t\tfor (int i = 0; i < MyListValue.size(); i++) \r\n\t\t\ty[i] = MyListValue.get(i);\r\n\t\t\r\n\t\t//int y[] = {25,10,15,20};\r\n\t \r\n CategorySeries series = new CategorySeries(\"Speaking time in secondes\");\r\n for(int i=0; i < y.length; i++){\r\n series.add(\"Bar\"+(i+1),y[i]);\r\n }\r\n \r\n dataSet = new XYMultipleSeriesDataset(); // collection of series under one object.,there could any\r\n dataSet.addSeries(series.toXYSeries()); // number of series\r\n \r\n //customization of the chart\r\n \r\n XYSeriesRenderer renderer = new XYSeriesRenderer(); // one renderer for one series\r\n renderer.setColor(Color.parseColor(\"#0099FF\"));\r\n renderer.setDisplayChartValues(true);\r\n renderer.setChartValuesSpacing((float) 5.5d);\r\n renderer.setLineWidth((float) 10.5d);\r\n \r\n \r\n mRenderer = new XYMultipleSeriesRenderer(); // collection multiple values for one renderer or series\r\n mRenderer.addSeriesRenderer(renderer);\r\n mRenderer.setChartTitle(\"Speaking time per participant\");\r\n// mRenderer.setXTitle(\"xValues\");\r\n mRenderer.setYTitle(\"Time in secondes\");\r\n mRenderer.setZoomButtonsVisible(true); mRenderer.setShowLegend(true);\r\n mRenderer.setShowGridX(true); // this will show the grid in graph\r\n mRenderer.setShowGridY(true); \r\n// mRenderer.setAntialiasing(true);\r\n mRenderer.setBarSpacing(.5); // adding spacing between the line or stacks\r\n mRenderer.setApplyBackgroundColor(true);\r\n mRenderer.setBackgroundColor(Color.BLACK);\r\n mRenderer.setXAxisMin(0);\r\n mRenderer.setYAxisMin(0);\r\n //mRenderer.setXAxisMax(5);\r\n /*mRenderer.setXAxisMax(ParticipantsList.size()+1);*/\r\n mRenderer.setXAxisMax(participantAndSpeakingTimeList.size()+1);\r\n //mRenderer.setYAxisMax(100);\r\n mRenderer.setYAxisMax(Math.round(getMaxValue()/10)*10+10);\r\n// \r\n \r\n mRenderer.setXLabels(0);\r\n \r\n mRenderer.setXLabelsAngle(90);\r\n mRenderer.setXLabelsAlign(Align.LEFT);\r\n \r\n /*for (int i = 0; i < ParticipantsList.size(); i++){\r\n\t\t\tmRenderer.addXTextLabel(i+1, ParticipantsList.get(i));\r\n\t\t}*/\r\n for (int i = 0; i < participantAndSpeakingTimeList.size(); i++){\r\n\t\t\tmRenderer.addXTextLabel(i+1, participantAndSpeakingTimeList.get(i).getName());\r\n\t\t}\r\n \r\n /*mRenderer.addXTextLabel(1,\"Income\");\r\n mRenderer.addXTextLabel(2,\"Saving\");\r\n mRenderer.addXTextLabel(3,\"Expenditure\");\r\n mRenderer.addXTextLabel(4,\"NetIncome\");*/\r\n \r\n mRenderer.setPanEnabled(true, true); // will fix the chart position\r\n //Intent intent = ChartFactory.getBarChartIntent(context, dataSet, mRenderer,Type.DEFAULT);\r\n \r\n //return intent;\r\n\r\n\t\r\n\t}", "@Override\r\n\tprotected void generateChart() throws Exception {\n\t\t\r\n\t}", "public LineChart<String, Number> renderSkillRating() {\n CategoryAxis xAxis = new CategoryAxis();\n xAxis.setLabel(\"Time ->\");\n NumberAxis yAxis = new NumberAxis();\n yAxis.setLabel(\"Skill Rating\");\n\n // initializing chart and a data series\n LineChart chart = new LineChart<>(xAxis, yAxis);\n chart.setTitle(\"Skill Rating over time\");\n XYChart.Series<String, Number> series = new XYChart.Series<>();\n\n // Initializing variables to be used in the for each loop\n String dateTime;\n Integer skillRating;\n Integer i = 1;\n\n for (GameRound round : gameRounds) {\n dateTime = i.toString();\n skillRating = round.getSkillRating();\n series.getData().add(new XYChart.Data<>(dateTime, skillRating));\n i++;\n }\n chart.getData().add(series);\n\n return chart;\n }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "protected void setUpCharting(windowType iWinType) throws ModelException {\n int i, j;\n\n //Create each dataset with two series - an underlying white layer, and\n //another layer upon which to display the event (we only display\n //them one at a time)\n m_oDataset = new XYZSimpleDataset(2, m_iNumXCells, m_iNumYCells);\n \n //Set the first layer of the dataset to all true - this is the white\n //underlayer, and default top layer to all false\n for (i = 0; i < m_iNumXCells; i++) {\n for (j = 0; j < m_iNumYCells; j++) {\n m_oDataset.mp_bData[0][i][j] = true;\n m_oDataset.mp_bData[1][i][j] = false;\n }\n }\n //Set up the renderer to display selected cells in the underlayer in white\n m_oRenderer.setColor(255, 255, 255, 0);\n \n //Set the color based on the window type\n if (windowType.harvest == iWinType) m_oRenderer.setColor(HARVEST_COLOR, 1);\n else if (windowType.ep_mort == iWinType) m_oRenderer.setColor(MORTALITY_EPISODE_COLOR, 1);\n else if (windowType.plant == iWinType) m_oRenderer.setColor(PLANT_COLOR, 1);\n \n m_oRenderer.setXCellLength(m_fLengthXCells);\n m_oRenderer.setYCellLength(m_fLengthYCells);\n \n ChartPanel jChart = DataGrapher.makeOverlaidMap(null,\n m_oTreeDataset, \"East->\", \"\", m_iPlotLengthX,\n m_iPlotLengthY, null, m_oTreeRenderer,\n new java.awt.Dimension(Math.min(600, m_iPlotLengthX * 3),\n Math.min(600, m_iPlotLengthY * 3)));\n m_jChartPanel.add(jChart);\n m_oPlot = (XYPlot) jChart.getChart().getPlot();\n }", "public BarChart() {\n\n\t\t//set the initial size of the store for curve data\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tcvV.add(new CurveData());\n\t\t}\n\n\t\tbarChartPanel.add(GP, BorderLayout.CENTER);\n\n\t\tBorder etchedBorder = BorderFactory.createEtchedBorder();\n\t\tborder = BorderFactory.createTitledBorder(etchedBorder, \"Title\");\n\t\tborder.setTitleColor(Color.blue);\n\t\tbarChartPanel.setBorder(border);\n\n\t\tMarkerFormat = new MarkerFormat(barColumns);\n\n\t\tGP.setSmartGL(false);\n\t\tGP.setNumberFormatX(MarkerFormat);\n\n\t\tGP.addHorLimitsListener(\n\t\t\t\t\t\t\t\tnew ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint nClmns = barColumns.size();\n\t\t\t\tint nMaxLines = 0;\n\t\t\t\tjava.util.Iterator<BarColumn> itr = barColumns.iterator();\n\t\t\t\twhile (itr.hasNext()) {\n\t\t\t\t\tBarColumn bc = itr.next();\n\t\t\t\t\tif (nMaxLines < bc.size()) {\n\t\t\t\t\t\tnMaxLines = bc.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (nClmns > 0 && nMaxLines > 0) {\n\t\t\t\t\t//int iMin = GP.getScreenX(GP.getCurrentMinX());\n\t\t\t\t\t//int iMax = GP.getScreenX(GP.getCurrentMaxX());\n\t\t\t\t\tint iMin = GP.getScreenX(GP.getInnerMinX());\n\t\t\t\t\tint iMax = GP.getScreenX(GP.getInnerMaxX());\n\n\t\t\t\t\twidth = (int) ((iMax - iMin) / (1.9 * nMaxLines * nClmns));\n\t\t\t\t\tif (width < 1) {\n\t\t\t\t\t\twidth = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 1, n = Math.min(nClmns * nMaxLines + 1, cvV.size()); i < n; i++) {\n\t\t\t\t\t\tCurveData cd = cvV.get(i);\n\t\t\t\t\t\tcd.setLineWidth(width);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tRunnable runRefresh =\n\t\t\t\tnew Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tGP.refreshGraphJPanel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread mThread = new Thread(runRefresh);\n\t\t\t\tmThread.start();\n\t\t\t}\n\t\t});\n\n\t\t//operations with clicked point object\n\t\tJLabel infoLabel = new JLabel(\" Clicked Point Info: \", JLabel.CENTER);\n\n\t\tFunctionGraphsJPanel.ClickedPoint cpObj = GP.getClickedPointObject();\n\t\tcpObj.xValueLabel = new JLabel(\"X-Marker=\", JLabel.RIGHT);\n\t\tcpObj.xValueFormat = MarkerFormat;\n\t\tcpObj.xValueText = new JTextField(10);\n\t\tcpObj.xValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.xValueText.setForeground(Color.blue);\n\n\t\tcpObj.yValueLabel = new JLabel(\" Value=\", JLabel.RIGHT);\n\t\tcpObj.yValueFormat = fortranFrmt;\n\t\tcpObj.yValueText = new JTextField(12);\n\t\tcpObj.yValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.yValueText.setForeground(Color.blue);\n\n\t\tJPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 0));\n\t\tinfoPanel.add(infoLabel);\n\t\tinfoPanel.add(cpObj.xValueLabel);\n\t\tinfoPanel.add(cpObj.xValueText);\n\t\tinfoPanel.add(cpObj.yValueLabel);\n\t\tinfoPanel.add(cpObj.yValueText);\n\n\t\tbarChartPanel.add(infoPanel, BorderLayout.SOUTH);\n\t}", "public MoeHistoryChart(SimulationTab tab) {\n\t\tthis.tab = tab;\n\t\t\n\t\tchartPanel = new SNChartPanel();\n\t\tchartPanel.setPreferredSize(new Dimension(600,400));\n\t\tsetLeftComponent(chartPanel);\n\t\t\n\t\tJPanel controlPanel = new JPanel();\n\t\tcontrolPanel.setLayout(new GridBagLayout());\n\t\tcontrolPanel.setBorder(BorderFactory.createTitledBorder(\"Chart Options\"));\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.insets = new Insets(2,2,2,2);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0;\n\t\tc.gridwidth = 2;\n\t\tc.gridy = 0;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tmoeCombo = new JComboBox();\n\t\tfor(MoeType t : MoeType.values()) {\n\t\t\tmoeCombo.addItem(t);\n\t\t}\n\t\tmoeCombo.addItemListener(new ItemListener() {\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange()==ItemEvent.SELECTED) {\n\t\t\t\t\tupdateView();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(moeCombo, c);\n\t\tc.gridx--;\n\t\tc.gridy++;\n\t\tc.gridwidth = 1;\n\t\tc.weighty = 0;\n\t\tc.weightx = 0;\n\t\tc.gridx = 0;\n\t\tc.anchor = GridBagConstraints.LINE_END;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\tJLabel totalMetricLabel = new JLabel(\"Total: \");\n\t\tcontrolPanel.add(totalMetricLabel, c);\n\t\tc.gridy++;\n\t\tJLabel metricLabel = new JLabel(\"Filtered: \");\n\t\tcontrolPanel.add(metricLabel, c);\n\t\tc.gridx++;\n\t\tc.gridy--;\n\t\tc.weightx = 1;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\ttotalValueLabel = new JLabel(\"\");\n\t\tcontrolPanel.add(totalValueLabel, c);\n\t\tc.gridy++;\n\t\tvalueLabel = new JLabel(\"\");\n\t\tcontrolPanel.add(valueLabel, c);\n\t\tc.gridx--;\n\t\tc.gridy++;\n\t\tc.gridwidth = 2;\n\t\tc.weightx = 1;\n\t\tc.weighty = 1;\n\t\tlocationsModel = new CheckBoxTableModel<Location>();\n\t\tlocationsModel.addTableModelListener(new TableModelListener() {\n\t\t\tpublic void tableChanged(TableModelEvent e) {\n\t\t\t\tupdateChart();\n\t\t\t}\n\t\t});\n\t\tJTable locationsTable = new JTable(locationsModel);\n\t\tlocationsTable.getTableHeader().setReorderingAllowed(false);\n\t\tlocationsTable.getColumnModel().getColumn(0).setHeaderValue(\"\");\n\t\tlocationsTable.getColumnModel().getColumn(0).setMaxWidth(25);\n\t\tlocationsTable.getColumnModel().getColumn(1).setHeaderValue(\"Filter Locations\");\n\t\tlocationsTable.getColumnModel().getColumn(0).setHeaderRenderer(new VisibilityTableCellHeaderRenderer());\n\t\tlocationsTable.setShowGrid(false);\n\t\tJScrollPane locationsScroll = new JScrollPane(locationsTable);\n\t\tlocationsScroll.setPreferredSize(new Dimension(150,200));\n\t\tcontrolPanel.add(locationsScroll, c);\n\t\tc.gridy++;\n\t\tc.weighty = 0;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));\n\t\tJButton selectAllButton = new JButton(\"Select All\");\n\t\tselectAllButton.setToolTipText(\"Select All Locations\");\n\t\tselectAllButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlocationsModel.selectAll();\n\t\t\t}\n\t\t});\n\t\tbuttonPanel.add(selectAllButton);\n\t\tJButton deselectAllButton = new JButton(\"Deselect All\");\n\t\tdeselectAllButton.setToolTipText(\"Deselect All Locations\");\n\t\tdeselectAllButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlocationsModel.deselectAll();\n\t\t\t}\n\t\t});\n\t\tbuttonPanel.add(deselectAllButton);\n\t\tcontrolPanel.add(buttonPanel, c);\n\t\tc.gridy++;\n\t\tJPanel prop = new JPanel();\n\t\tprop.setPreferredSize(new Dimension(1,15));\n\t\tcontrolPanel.add(prop, c);\n\n\t\tc.gridy++;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tlinearizeDataCheck = new JCheckBox(\"Linearize Data\", true);\n\t\tlinearizeDataCheck.addItemListener(new ItemListener() {\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tupdateChart();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(linearizeDataCheck, c);\n\t\t\n\t\tcontrolPanel.setMinimumSize(new Dimension(150,50));\n\t\tsetRightComponent(controlPanel);\n\n\t\tsetName(\"Measures History\");\n\t\tsetOneTouchExpandable(true);\n\t\tsetDividerSize(10);\n\t\tsetBorder(BorderFactory.createEmptyBorder());\n\t\tsetResizeWeight(1);\n\t\tsetDividerLocation(700);\n\t}", "public Chart initializeChart();", "@Override\n BackgroundLineChart generateLineChart() {\n\n final BackgroundLineChart lineChart;\n final NumberAxis xAxis = new NumberAxis();\n xAxis.setLabel(\"Time\");\n\n List<XYChart.Series<Number, Number>> seriesList = FXCollections.observableArrayList();\n\n for (DataPoint.Type type : DataPoint.Types.values()) {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(type.getName());\n seriesList.add(series);\n this.getSeriesMap().put(type, series);\n }\n\n lineChart = new BackgroundLineChart(this.captureSession, xAxis, new NumberAxis(), FXCollections.observableArrayList(seriesList));\n\n //@Source - https://stackoverflow.com/a/44957354 - Enables Toggle of Data Series by clicking on their icon in the legend\n for (Node n : lineChart.getChildrenUnmodifiable()) {\n if (n instanceof Legend) {\n Legend l = (Legend) n;\n for (Legend.LegendItem li : l.getItems()) {\n for (XYChart.Series<Number, Number> s : lineChart.getData()) {\n if (s.getName().equals(li.getText())) {\n li.getSymbol().setCursor(Cursor.HAND); // Hint user that legend symbol is clickable\n li.setText(li.getText() + \" On\");\n li.getSymbol().setOnMouseClicked(me -> {\n if (me.getButton() == MouseButton.PRIMARY) {\n s.getNode().setVisible(!s.getNode().isVisible()); // Toggle visibility of line\n\n String[] displayName = li.getText().split(\" \");\n li.setText(String.format(\"%s %s\", String.join(\" \", Arrays.copyOfRange(displayName, 0, displayName.length - 1)), (s.getNode().isVisible() ? \"On\" : \"Off\")));\n for (XYChart.Data<Number, Number> d : s.getData()) {\n if (d.getNode() != null) {\n d.getNode().setVisible(s.getNode().isVisible()); // Toggle visibility of every node in the series\n }\n }\n lineChart.redraw();\n }\n });\n break;\n }\n }\n }\n }\n }\n //---\n\n return lineChart;\n }", "public DatasetTab(int index) {\n tab = new VerticalLayout();\n replicatesSheet = new TabSheet();\n for (int replicateIndex = 0;\n replicateIndex < presenter.getNumberOfReplicates();\n replicateIndex++) {\n ReplicateTab replicateTab = new ReplicateTab(index, replicateIndex);\n replicatesSheet.addTab(replicateTab, \"Replicate \" + createAlphabeticalIndex(replicateIndex));\n }\n setCompositionRoot(tab);\n }", "protected MockLineChartViewBase() {\n super();\n }", "private LineData generateLineData() {\n\n LineData d = new LineData();\n LineDataSet set = new LineDataSet(ReportingRates, \" ARVs (Reporting Rates)\");\n set.setColors(Color.parseColor(\"#90ed7d\"));\n set.setLineWidth(2.5f);\n set.setCircleColor(Color.parseColor(\"#90ed7d\"));\n set.setCircleRadius(2f);\n set.setFillColor(Color.parseColor(\"#90ed7d\"));\n set.setMode(LineDataSet.Mode.CUBIC_BEZIER);\n set.setDrawValues(true);\n\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n d.addDataSet(set);\n\n return d;\n }", "private JPanel createChartPanel(XYSeriesCollection li) {\n\n String chartTitle = \" Movement Chart\";\n String xAxisLabel = \"Matrix Size\";\n String yAxisLabel = \"time in ms\";\n\n XYSeriesCollection dataset = li;\n // System.out.println(\"tesst count \" + dataset.getSeriesCount());\n\n //XYDataset dataset = createDataset(li);\n JFreeChart chart = ChartFactory.createXYLineChart(chartTitle, xAxisLabel, yAxisLabel, dataset);\n XYPlot plot = chart.getXYPlot();\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\n plot.setRenderer(renderer);\n\n return new ChartPanel(chart);\n }", "protected XSSFChart() {\n\t\tsuper();\n\t\tcreateChart();\n\t}", "public CreateLineCanvas(CanvasApp canvasApp) {\n\t\tthis.cmdAppliedCanvas=canvasApp;\n\t}", "public PGMN_Precipitation(final String title) {\n super(title);\n try{\n // Open the file that is the first \n // command line parameter\n FileInputStream fstream = new FileInputStream(\"Y:\\\\PGMN\\\\Precipitation\\\\1.txt\");\n // Get the object of DataInputStream\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n //Read File Line By Line\n int i = 0;\n while ((strLine = br.readLine()) != null) {\n //System.out.println(strLine.length());\n if((strLine.length() < 45)||(strLine.length() > 46)){\n continue;\n }\n if(!strLine.contains(\"csv\")){\n continue;\n }\n \n String wellId = strLine.substring(39, strLine.length()-4);\n System.out.println(wellId);\n //Double depth = (Double)hm.get(wellId);\n String lang = \"EN\";\n final XYDataset dataset = createDataset(wellId, lang);\n final JFreeChart chart = createChart(dataset, wellId, lang);\n XYPlot xyplot = (XYPlot)chart.getPlot();\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer)xyplot.getRenderer();\n renderer.setSeriesPaint(0, Color.blue);\n try {\n ChartUtilities.saveChartAsPNG(new File(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + lang + \"\\\\\" + wellId + \".png\"), chart, 400, 300);\n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n \n lang = \"FR\";\n final XYDataset dataset_fr = createDataset(wellId, lang);\n final JFreeChart chart_fr = createChart(dataset_fr, wellId, lang);\n XYPlot xyplot_fr = (XYPlot)chart_fr.getPlot();\n XYLineAndShapeRenderer renderer_fr = (XYLineAndShapeRenderer)xyplot_fr.getRenderer();\n renderer_fr.setSeriesPaint(0, Color.blue);\n try {\n ChartUtilities.saveChartAsPNG(new File(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + lang + \"\\\\\" + wellId + \".png\"), chart_fr, 400, 300);\n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n i++;\n }\n //Close the input stream\n in.close();\n }catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_statistics_month, container, false);\n\n// create dbsteps instance\n dbSteps = new DBSteps(getActivity());\n\n// creating linechart\n lineChart = rootView.findViewById(R.id.line_chart);\n// creating barchart object to manipulate instance in the layout\n ArrayList<Entry> lineEntries = new ArrayList<Entry>();\n int iterator = 0;\n for (int steps : dbSteps.getDataWholeMonth()) {\n lineEntries.add(new Entry(iterator, steps));\n iterator++;\n }\n\n lineChart.getXAxis().setDrawGridLines(false);\n lineChart.getAxisLeft().setEnabled(false);\n lineChart.getAxisRight().setEnabled(false);\n lineChart.getDescription().setEnabled(false);\n\n\n LineDataSet lineDataSet = new LineDataSet(lineEntries, \"Month Steps\");\n lineDataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineDataSet.setHighlightEnabled(true);\n lineDataSet.setLineWidth(2);\n// lineDataSet.setColor(getActivity().getColor(\"defaultBlue\"));\n// lineDataSet.setCircleColor(getActivity().getColor(\"defaultOrange\"));\n// lineDataSet.setCircleRadius(6);\n// lineDataSet.setCircleHoleRadius(3);\n lineDataSet.setDrawHighlightIndicators(true);\n lineDataSet.setHighLightColor(Color.RED);\n lineDataSet.setDrawValues(false);\n lineDataSet.setValueTextSize(12);\n// lineDataSet.setValueTextColor(getActivity().getColor(\"primaryDark\"));\n\n LineData lineData = new LineData(lineDataSet);\n\n// lineChart.getDescription().setText(\"Price in last 12 days\");\n// lineChart.getDescription().setTextSize(12);\n// lineChart.setDrawMarkers(true);\n// lineChart.setMarker(markerView(context));\n// lineChart.getAxisLeft().addLimitLine(lowerLimitLine(2,\"Lower Limit\",2,12,getColor(\"defaultOrange\"),getColor(\"defaultOrange\")));\n// lineChart.getAxisLeft().addLimitLine(upperLimitLine(5,\"Upper Limit\",2,12,getColor(\"defaultGreen\"),getColor(\"defaultGreen\")));\n// lineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTH_SIDED);\n lineChart.animateY(1000);\n// lineChart.getXAxis().setGranularityEnabled(true);\n// lineChart.getXAxis().setGranularity(1.0f);\n// lineChart.getXAxis().setLabelCount(lineDataSet.getEntryCount());\n lineChart.setData(lineData);\n\n// create pie chart\n PieChart pieChart = (PieChart) rootView.findViewById(R.id.week_piechart);\n ArrayList<PieEntry> pieEntries = new ArrayList<>();\n pieEntries.add(new PieEntry(4f, 0));\n pieEntries.add(new PieEntry(12f, 0));\n pieEntries.add(new PieEntry(2f, 0));\n pieEntries.add(new PieEntry(8f, 0));\n\n PieDataSet pieDataSet = new PieDataSet(pieEntries, \"Activites\");\n pieDataSet.setColors(getResources().getColor(R.color.blue_pie), getResources().getColor(R.color.yellow_pie), getResources().getColor(R.color.red_pie), getResources().getColor(R.color.green_pie));\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.setCenterText(\"Activities\");\n return rootView;\n }", "public LineData()\n\t{\n\t}", "private void drawChart() throws ParseException {\n Calendar cal = new GregorianCalendar();\n cal.setTime(new Date());\n cal.set(Calendar.DAY_OF_MONTH, -7);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n Date startTime = cal.getTime();\n Date dayEnd = new Date();\n\n historyChart.setBackgroundColor(Color.WHITE);\n historyChart.setDrawBorders(true);\n\n\n ArrayList<String> xAxis = new ArrayList<>();\n ArrayList<Float> calories = new ArrayList<>();\n ArrayList<Float> calcium = new ArrayList<>();\n ArrayList<Float> sodium = new ArrayList<>();\n ArrayList<Float> carbs = new ArrayList<>();\n ArrayList<Float> cholestrol = new ArrayList<>();\n ArrayList<Float> iron = new ArrayList<>();\n ArrayList<Float> protien = new ArrayList<>();\n ArrayList<Float> sugar = new ArrayList<>();\n ArrayList<Float> totalfat = new ArrayList<>();\n\n NutritionHistory instance = NutritionHistory.getInstance();\n NutritionHistory.getInstance().getNutritionInformation(startTime, dayEnd, nutritionInformation -> {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();\n mDatabase.child(\"account\").child(mCurrentUser.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n double caloriesNeeded = 2000L;\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n switch (data.getKey()) {\n case \"calories\":\n caloriesNeeded = Double.parseDouble(String.valueOf(data.getValue()));\n }\n }\n\n NutrientConverter converter = new NutrientConverter(caloriesNeeded);\n\n NutritionInformation.NutritionInformationBuilder builder = new NutritionInformation.NutritionInformationBuilder();\n NutritionInformation current = builder.build();\n\n Long[] days = nutritionInformation.keySet().stream().toArray(Long[]::new);\n Arrays.sort(days);\n\n for(Long day: days) {\n xAxis.add(sdf2.format(new Date(day)).toString());\n calories.add(converter.convert(\"Calories\", (float) nutritionInformation.get(day).getCalories()));\n calcium.add(converter.convert(\"Calcium\", (float) nutritionInformation.get(day).getCalcium()));\n sodium.add(converter.convert(\"Sodium\", (float)nutritionInformation.get(day).getSodium()));\n carbs.add(converter.convert(\"Carbohydrates\", (float) nutritionInformation.get(day).getCarbohydrates()));\n cholestrol.add(converter.convert(\"Cholesterol\", (float)nutritionInformation.get(day).getCholesterol()));\n iron.add(converter.convert(\"Iron\", (float)nutritionInformation.get(day).getIron()));\n protien.add(converter.convert(\"Protein\", (float)nutritionInformation.get(day).getProtein()));\n sugar.add(converter.convert(\"Sugar\", (float)nutritionInformation.get(day).getSugar()));\n totalfat.add(converter.convert(\"Total Fat\", (float)nutritionInformation.get(day).getTotalFat()));\n }\n Log.i(\"HERE\", xAxis.toString());\n LineDataSet dataCalories = addValues(\"Calories\", calories);\n dataCalories.setColor(Color.RED);\n dataCalories.setLineWidth(2f);\n\n LineDataSet dataCalcium = addValues(\"Calcium\",calcium);\n dataCalcium.setColor(Color.rgb(181, 126\t, 220));\n dataCalcium.setLineWidth(2f);\n\n LineDataSet dataSodium = addValues(\"Sodium\", sodium);\n dataSodium.setColor(Color.BLUE);\n dataSodium.setLineWidth(2f);\n\n LineDataSet dataCarbs = addValues(\"Carbohydrates\",carbs);\n dataCarbs.setColor(Color.GREEN);\n dataCarbs.setLineWidth(2f);\n\n LineDataSet dataCholesterol = addValues(\"Cholesterol\", cholestrol);\n dataCholesterol.setColor(Color.YELLOW);\n dataCholesterol.setLineWidth(2f);\n\n LineDataSet dataIron = addValues(\"Iron\",iron);\n dataIron.setColor(Color.BLACK);\n dataIron.setLineWidth(2f);\n\n LineDataSet dataProtein = addValues(\"Protein\", protien);\n dataProtein.setColor(Color.CYAN);\n dataProtein.setLineWidth(2f);\n\n LineDataSet dataSugar = addValues(\"Sugar\",sugar);\n dataSugar.setColor(Color.MAGENTA);\n dataSugar.setLineWidth(2f);\n\n LineDataSet dataTotalFat = addValues(\"Total Fat\", totalfat);\n dataTotalFat.setColor(Color.rgb(248\t,131, 121));\n dataTotalFat.setLineWidth(2f);\n\n LineData lineData = new LineData(dataCalories, dataCalcium ,dataSodium, dataCarbs, dataIron, dataSugar, dataProtein, dataTotalFat, dataCholesterol);\n historyChart.setData(lineData);\n historyChart.getXAxis().setDrawAxisLine(true);\n historyChart.setVisibleXRange(0, xAxis.size() - 1);\n historyChart.getXAxis().setValueFormatter(new MyXAxisValueFormatter(xAxis));\n historyChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n historyChart.enableScroll();\n historyChart.getDescription().setEnabled(false);\n historyChart.getXAxis().setLabelCount(7, true);\n historyChart.setExtraBottomOffset(20f);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n });\n\n designChart(xAxis);\n historyChart.invalidate();\n }", "private void start () {\n NumberAxis xAxis = new NumberAxis();\n NumberAxis yAxis = new NumberAxis();\n\n xAxis.setForceZeroInRange(false);\n yAxis.setForceZeroInRange(false);\n xAxis.setAnimated(false);\n yAxis.setAnimated(false);\n\n xAxis.setLabel(\"Number of \" + cmc + \" Drops\");\n xAxis.setMinorTickVisible(false);\n\n chart = new LineChart<>(xAxis, yAxis);\n chart.setTitle(\"Changes in \" + cmc + \" Drops\");\n chart.setLegendSide(Side.LEFT);\n chart.setAnimated(false);\n\n this.getChildren().add(chart);\n this.setAlignment(Pos.CENTER_LEFT);\n }", "public SeirpinskiLine() {\n this.depth = DEFAULT_DEPTH;\n this.scale = DEFAULT_SCALE;\n this.mode = DEFAULT_MODE;\n\n setUpGUI();\n repaint();\n }", "public void addLines(){\n\t\tif (controlPoints.size() == 1) return;\n\t\t\n\t\tif (lineLists.size() < controlPoints.size()-1){\n\t\t lineLists.add(new LinkedList<Line>());\n\t\t}\n\t\t\n\t\t\n\t\tint numControlLines = controlPoints.size() - 1;\n\t\t\n\t\tfor (int i = 0; i < numControlLines; i++){\n\t\t\tLine line = new Line();\n\t\t\tif (i == 0){\n\t\t\t\tline.setStroke(Color.LIGHTGRAY);\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showPrimaryLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t\tline.toBack();\n\t\t\t} else {\n\t\t\t\tdouble hue = 360 * (((i-1)%controlPoints.size())/(double)controlPoints.size());\n\t\t\t\tdouble sat = .4;\n\t\t\t\tdouble bri = .8;\n\t\t\t\tline.setStroke(Color.hsb(hue, sat, bri));\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showSubLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t}\n\t\t\tLinkedList<Line> list = lineLists.get(i);\n\t\t\tlist.add(line);\n\t\t}\n\t}", "private LineData generateDataLine(int cnt, String name, ArrayList<Double> mainEmotion) {\n\n ArrayList<Entry> values1 = new ArrayList<>();\n\n //int[] val = {(int) happinessr, (int) sadnessr, (int) surpriser, (int) fearr, (int) neutralr, (int) contemptr, (int) angerr, (int) disgustr};\n\n for (int i = 0; i < mainEmotion.size(); i++) {\n values1.add(new Entry(i, mainEmotion.get(i).intValue()));\n }\n\n LineDataSet d1 = new LineDataSet(values1, name);\n d1.setLineWidth(2.5f);\n d1.setCircleRadius(4.5f);\n //Toast.makeText(getContext().getApplicationContext(), name, Toast.LENGTH_LONG).show();\n\n switch (name) {\n case \"Happiness\":\n d1.setColor(Color.rgb(189, 237, 255));\n d1.setCircleColors(Color.rgb(189, 237, 255));\n break;\n case \"Sadness\":\n d1.setColor(Color.rgb(74, 88, 176));\n d1.setCircleColors(Color.rgb(74, 88, 176));\n break;\n case \"Contempt\":\n d1.setColor(Color.rgb(242, 5, 92));\n d1.setCircleColors(Color.rgb(242, 5, 92));\n break;\n case \"Disgust\":\n d1.setColor(Color.rgb(79, 139, 62));\n d1.setCircleColors(Color.rgb(79, 139, 62));\n break;\n case \"Fear\":\n d1.setColor(Color.rgb(89, 72, 122));\n d1.setCircleColors(Color.rgb(89, 72, 122));\n break;\n case \"Surprise\":\n d1.setColor(Color.rgb(205, 185, 39));\n d1.setCircleColors(Color.rgb(205, 185, 39));\n break;\n case \"Anger\":\n d1.setColor(Color.rgb(189, 73, 84));\n d1.setCircleColors(Color.rgb(189, 73, 84));\n break;\n case \"Neutral\":\n d1.setColor(Color.rgb(220, 235, 221));\n d1.setCircleColors(Color.rgb(220, 235, 221));\n break;\n default:\n break;\n\n }\n\n d1.setHighLightColor(Color.rgb(255, 0, 0));\n d1.setDrawValues(false);\n\n ArrayList<Entry> values2 = new ArrayList<>();\n\n for (int i = 0; i < mainEmotion.size(); i++) {\n values2.add(new Entry(i, values1.get(i).getY() - 30));\n }\n\n ArrayList<ILineDataSet> sets = new ArrayList<>();\n sets.add(d1);\n //sets.add(d2);\n\n return new LineData(sets);\n }", "public void initPPG()\n {\n LineData ppgData;\n Legend legend;\n XAxis x;\n YAxis y1, y2;\n\n //Retrieve ppgChart from the XML layout\n ppgChart = (LineChart) findViewById(R.id.ppgChart);\n\n //Label the chart\n ppgChart.setDescription(\"\");\n ppgChart.setNoDataTextDescription(\"No data at the moment\");\n\n //Enable/disable custom features\n ppgChart.setHighlightPerTapEnabled(true);\n ppgChart.setTouchEnabled(true);\n ppgChart.setDragEnabled(true);\n ppgChart.setDrawGridBackground(true);\n ppgChart.setPinchZoom(true);\n\n //Assign a data set to ppgChart\n ppgData = new LineData();\n ppgChart.setData(ppgData);\n\n //Remove legend\n ppgChart.getLegend().setEnabled(false);\n\n //Get and initialize the Axes\n x = ppgChart.getXAxis();\n x.setPosition(XAxis.XAxisPosition.BOTTOM);\n y1 = ppgChart.getAxisLeft();\n y2 = ppgChart.getAxisRight();\n\n x.setDrawGridLines(true);\n y1.setDrawGridLines(true);\n y1.setStartAtZero(false);\n y2.setEnabled(false);\n }", "public PlotPanel(Color[] lineColors) {\n this(lineColors, false);\n }", "private LineData generateDataLine(int cnt) {\n\n ArrayList<Entry> e1 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e1.add(new Entry(i, (int) (Math.random() * 65) + 40));\n }\n\n LineDataSet d1 = new LineDataSet(e1, \"New DataSet \" + cnt + \", (1)\");\n d1.setLineWidth(2.5f);\n d1.setCircleRadius(4.5f);\n d1.setHighLightColor(Color.rgb(244, 117, 117));\n d1.setDrawValues(false);\n\n ArrayList<Entry> e2 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e2.add(new Entry(i, e1.get(i).getY() - 30));\n }\n\n LineDataSet d2 = new LineDataSet(e2, \"New DataSet \" + cnt + \", (2)\");\n d2.setLineWidth(2.5f);\n d2.setCircleRadius(4.5f);\n d2.setHighLightColor(Color.rgb(244, 117, 117));\n d2.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setDrawValues(false);\n\n ArrayList<ILineDataSet> sets = new ArrayList<ILineDataSet>();\n sets.add(d1);\n sets.add(d2);\n\n LineData cd = new LineData(sets);\n return cd;\n }", "public RubberLinesPanel()\n\t{\n\t\tLineListener listener = new LineListener();\n\t\tpoints = new HashMap<Point, Point>();\n\t\taddMouseListener(listener);\n\t\taddMouseMotionListener(listener);\n\t\tsetBackground(Color.black);\n\t\tsetPreferredSize(new Dimension(400, 200));\n\t}", "public ChartFrame(Chart chart) {\r\n\t\tthis.chart = chart;\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tJLabel label = new JLabel();\r\n\t\t\t\tlabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\t\t\t\tseatGrid[r][c] = label;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tremoveBtn = new JButton(\"Remove\");\r\n\t\tremoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonRemoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddBtn = new JButton(\"Add\");\r\n\t\taddBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonAddClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswapBtn = new JButton(\"Swap\");\r\n\t\tswapBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonSwapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tloadBtn = new JButton(\"Load\");\r\n\t\tloadBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonLoadClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmoveBtn = new JButton(\"Move\");\r\n\t\tmoveBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tonMoveClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\r\n\t\tpanel.setLayout(new GridLayout(7, 5));\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c = 0; c < seatGrid[r].length; c++) {\r\n\t\t\t\tpanel.add(seatGrid[r][c]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < seatGrid[0].length; i++) {\r\n\t\t\tpanel.add(Box.createHorizontalGlue());\r\n\t\t}\r\n\r\n\t\tpanel.add(removeBtn);\r\n\t\tpanel.add(addBtn);\r\n\t\tpanel.add(loadBtn);\r\n\t\tpanel.add(swapBtn);\r\n\t\tpanel.add(moveBtn);\r\n\r\n\t\tadd(panel);\r\n\t\tsetSize(500, 400);\r\n\t\tsetVisible(true);\r\n\t\tsetTitle(\"Seating Chart\");\r\n\t\tupdate();\r\n\r\n\t}", "public testChart() {\n initComponents();\n }", "private LineDataSet createSet(){\n LineDataSet set = new LineDataSet(null, \"SPL Db\");\n set.setDrawCubic(true);\n set.setCubicIntensity(0.2f);\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n set.setColor(ColorTemplate.getHoloBlue());\n set.setLineWidth(2f);\n set.setCircleSize(4f);\n set.setFillAlpha(65);\n set.setFillColor(ColorTemplate.getHoloBlue());\n set.setHighLightColor(Color.rgb(244,117,177));\n set.setValueTextColor(Color.WHITE);\n set.setValueTextSize(10f);\n\n return set;\n }", "@Override\n protected void createLines() {\n\n Line[] lines = new GraphicalLine[(2 * columns * rows) + columns + rows];\n int lineIndex = 0;\n\n int boxCounter = 0;\n int x = settings.dotStartX() + settings.dotWidth();\n int y = settings.dotStartY() + settings.lineOffset();\n boolean isTop = true;\n boolean isFirstRow = true;\n\n /* horizontal lines */\n /* for every row + 1 */\n for (int i = 0; i < rows + 1; i++) {\n\n /* for every column */\n for (int j = 0; j < columns; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineWidth(), settings.lineHeight());\n line.addBox(boxes[boxCounter]);\n if (isTop) {\n boxes[boxCounter].setTopLine(line);\n } else {\n boxes[boxCounter].setBottomLine(line);\n /* if there is a next row */\n if (i + 1 < rows + 1) {\n line.addBox(boxes[boxCounter + columns]);\n boxes[boxCounter + columns].setTopLine(line);\n }\n }\n boxCounter++;\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n boxCounter = isTop ? boxCounter - columns : boxCounter;\n if (isFirstRow) {\n isTop = false;\n isFirstRow = false;\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.dotWidth();\n }\n\n boxCounter = 0;\n x = settings.dotStartX() + settings.lineOffset();\n y = settings.dotStartY() + settings.dotWidth();\n\n /* vertical lines */\n /* for every row */\n for (int i = 0; i < rows; i++) {\n\n /* for every column + 1 */\n for (int j = 0; j < columns + 1; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineHeight(), settings.lineWidth());\n /* if there is a previous vertical line */\n if (j > 0) {\n boxes[boxCounter - 1].setRightLine(line);\n line.addBox(boxes[boxCounter - 1]);\n }\n /* if there is a next column */\n if (j + 1 < columns + 1) {\n boxes[boxCounter].setLeftLine(line);\n line.addBox(boxes[boxCounter]);\n boxCounter++;\n }\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.lineOffset();\n }\n\n this.lines = lines;\n }", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "@Override\n public void init() throws Exception {\n Mapper mapper = new Mapper() {\n public double f(double x, double y) {\n try {\n return i3d.evaluate(x, y);\n } catch (InterpolationException e) {\n e.printStackTrace();\n return 0;\n }\n }\n };\n \n // Define range and precision for the function to plot\n Range rangeX = new Range((float)i3d.lowerA(), (float)i3d.upperA());\n int stepsX = 100;\n Range rangeY = new Range((float)i3d.lowerB(), (float)i3d.upperB());\n int stepsY = 100;\n \n AbstractDrawable drawable;\n // Create the object to represent the surface\n final Shape surface = Builder.buildOrthonormal(new OrthonormalGrid(rangeX, stepsX, rangeY, stepsY), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(),\n surface.getBounds().getZmin(), surface.getBounds().getZmax(), COLOR_BASE));\n surface.setWireframeDisplayed(true);\n surface.setWireframeWidth(1);\n surface.setWireframeColor(COLOR_WIRE);\n surface.setFaceDisplayed(true);\n drawable = surface;\n \n // Create a chart\n chart = AWTChartComponentFactory.chart(Quality.Advanced);\n chart.getAxeLayout().setXTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setYTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setZTickRenderer(new FixedDecimalTickRenderer(1));\n chart.getAxeLayout().setFaceDisplayed(false);\n chart.getAxeLayout().setMainColor(COLOR_MAIN);\n chart.getView().setBackgroundColor(COLOR_BG);\n chart.getScene().getGraph().add(drawable);\n \n chart.getAxeLayout().setXAxeLabel(\"Length\");\n chart.getAxeLayout().setYAxeLabel(\"Time\");\n chart.getAxeLayout().setZAxeLabel(\"Temperature\");\n }", "private void setContentEstadisticas(View root){\n spinnerMeasure = root.findViewById(R.id.spinnerMeasure);\n ArrayAdapter<CharSequence> measureAdapter = ArrayAdapter.createFromResource(getContext(),\n R.array.measure_array, android.R.layout.simple_spinner_item);\n measureAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerMeasure.setAdapter(measureAdapter);\n spinnerMeasure.setOnItemSelectedListener(this);\n\n // Setting options for spinnerPeriod\n spinnerPeriod = root.findViewById(R.id.spinnerPeriod);\n ArrayAdapter<CharSequence> periodAdapter = ArrayAdapter.createFromResource(getContext(),\n R.array.period_array, android.R.layout.simple_spinner_item);\n periodAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerPeriod.setAdapter(periodAdapter);\n spinnerPeriod.setOnItemSelectedListener(this);\n\n // Setting options for graph, default = km/week\n lineChart = root.findViewById(R.id.lineChart);\n date = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n\n String day = Integer.toString(calendar.get(Calendar.DAY_OF_MONTH));\n String month = Integer.toString(calendar.get(Calendar.MONTH) + 1) ;\n day = day.length() == 1 ? \"0\" + day : day;\n month = month.length() == 1 ? \"0\" + month : month;\n\n TextView periodGraph = root.findViewById(R.id.periodGraph);\n periodGraph.setText( day + \"/\" + month + \"/\" + calendar.get(Calendar.YEAR));\n\n // Styling description\n Description description = lineChart.getDescription();\n description.setEnabled(false);\n // Styling legend\n Legend legend = lineChart.getLegend();\n legend.setEnabled(false);\n // Styling xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f);\n xAxis.setDrawAxisLine(true);\n xAxis.setAxisLineColor(getResources().getColor(R.color.colorPrimaryExtraDark));\n xAxis.setAxisLineWidth(1f);\n xAxis.setGridColor(getResources().getColor(R.color.colorPrimaryLigth2));\n xAxis.setTextColor(getResources().getColor(R.color.colorPrimary));\n // Other styling\n lineChart.setNoDataText(getResources().getString(R.string.noChartData));\n\n // Refreshing chart\n lineChart.invalidate();\n\n\n // Setting buttons for graph\n Button btnSelectDate = root.findViewById(R.id.buttonSelectDate);\n btnSelectDate.setOnClickListener(this);\n }", "public StatisticsPanel(Logic logic, int indexOfSelectedDeck) {\n super(FXML);\n\n // System.out.println(\"deck selected = \" + indexOfSelectedDeck);\n\n ObservableList<Deck> originalDecks = logic.getFilteredDeckList();\n // decide which deck to get, or get all of them if indexOfSelectedDeck==-1\n List<Deck> decks = IntStream.range(0, originalDecks.size())\n .filter(idx -> indexOfSelectedDeck == -1 || idx == indexOfSelectedDeck)\n .mapToObj(originalDecks::get).collect(Collectors.toList());\n\n if (indexOfSelectedDeck == -1) {\n chartTitle = \"Recent performance over all decks.\";\n } else {\n chartTitle = \"Recent performance over deck \" + decks.get(0).getDeckName();\n }\n\n StatisticsManager statisticsManager = logic.getStatisticsManager();\n\n plotDataPoints(getDeckPlottingPoints(decks));\n\n String lastLoginString = statisticsManager.getLastLoginString();\n\n lastLoginLabel.setText(String.format(\"Last Login: %s\", lastLoginString));\n }", "public void createOnce(){\n\n //Entry\n entries = new ArrayList<Entry>();\n\n //ArrayList of LineData\n lineDatas = new ArrayList<LineData>();\n\n //LineDataSet :\n dataSets = new ArrayList<LineDataSet>();\n\n\n for (int x=0; x<graphsData.size(); x++){\n\n dataSets.add(new LineDataSet(new ArrayList<Entry>(),\"Data in \" + graphsData.get(x).getMonth()));\n\n for(int i=0; i<graphsData.get(x).getMonthList().size(); i++){\n dataSets.get(x).addEntry(new Entry(i, graphsData.get(x).getMonthList().get(i).getAverage()));\n dataSets.get(x).getEntryForIndex(i).setIcon(ContextCompat.getDrawable(context,R.drawable.screen));\n }\n\n dataSets.get(x).setColor(Color.rgb(0,187,207));\n\n lineDatas.add(new LineData(dataSets.get(x)));\n\n chart.notifyDataSetChanged();\n chart.invalidate();\n\n }\n\n }", "public ChartTest() {\n initComponents();\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "private void updateChart() {\n //Declare needed variables\n final DateFormat dateFormat = new SimpleDateFormat(\"dd-MM\", Locale.getDefault());\n final LineChart chart = findViewById(R.id.chartWeight);\n List<Entry> weightEntries = new ArrayList<>();\n mUser.weight.sortListByDate();\n ArrayList<WeightValue> weightHistory = mUser.weight.getWeightHistory();\n\n //Set entries to entry list from weight history list\n for (int i = 0; i < weightHistory.size(); i++) {\n //Get the current weight weight value and intialize the current variables\n WeightValue weightValue = weightHistory.get(i);\n Date date = weightValue.getDate();\n float weight = (float) weightValue.getWeight();\n\n //Add the entries to the entries list\n weightEntries.add(new Entry(date.getTime(), weight));\n }\n\n //Setup XAxis\n XAxis xAxis = chart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setDrawGridLines(false);\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setLabelCount(weightHistory.size(), false);\n xAxis.setValueFormatter(new IndexAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return dateFormat.format(value);\n }\n });\n\n //Setups YAxis\n YAxis rightYAxis = chart.getAxisRight();\n rightYAxis.setEnabled(false);\n\n //Create linedata from the entries list\n final LineDataSet weightDataSet = new LineDataSet(weightEntries, \"Paino\");\n\n //Customize chart\n Description desc = new Description();\n desc.setEnabled(false);\n chart.setDescription(desc);\n chart.setMaxHighlightDistance(20);\n\n weightDataSet.setValueTextSize(10);\n weightDataSet.setColor(Color.BLUE);\n weightDataSet.setFillAlpha(10);\n weightDataSet.setLineWidth(3f);\n weightDataSet.setCircleRadius(4);\n\n\n\n //Shows the values as integers rather than floats\n weightDataSet.setValueFormatter(new ValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return String.format(Locale.getDefault(), \"%.1f\", value);\n }\n });\n\n chart.setOnChartValueSelectedListener(new OnChartValueSelectedListener() {\n @Override\n public void onValueSelected(final Entry e, Highlight h) {\n AlertDialog.Builder builder = new AlertDialog.Builder(WeightActivity.this);\n builder.setTitle(\"Poista arvo\")\n .setMessage(\"Oletko varma?\")\n .setNegativeButton(\"Peruuta\", null)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n weightDataSet.removeEntry(e);\n chart.invalidate();\n\n mUser.weight.removeWeightByDate(e.getX());\n updateText();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n @Override\n public void onNothingSelected() {\n\n }\n });\n\n //Add the values to the chart and intialize it\n LineData weightLineData = new LineData(weightDataSet);\n chart.setData(weightLineData);\n chart.invalidate();\n }", "public LecturerBarChart() {\n initComponents();\n }", "public LineInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public static void main(String[] args) {\n showChart(createLineChart(), \"LineChartExample\");\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n\n //----------------LineChart----------\n lineChart.setTitle(\"Number of participations by date\");\n XYChart.Series dataSeries = new XYChart.Series();\n dataSeries.setName(\"test\");\n for(int i=0;i<sut.getNbrParticipateByDate().size();i++)\n dataSeries.getData().add(new XYChart.Data(String.valueOf(sut.getNbrParticipateByDate().get(i).getCreatedAt()),sut.getNbrParticipateByDate().get(i).getNbr()));\n lineChart.getData().add(dataSeries);\n //------------------------------------------//\n l = se.AfficherEvent();\n System.out.println(l);\n titleCol.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\n descriptionCol.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n startDayCol.setCellValueFactory(new PropertyValueFactory<>(\"startDate\"));\n endDateCol.setCellValueFactory(new PropertyValueFactory<>(\"endDate\"));\n priceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n locationCol.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\n categoryCol.setCellValueFactory(new PropertyValueFactory<>(\"cat\"));\n eventTable.setItems(l);\n }", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "public LineData() {\n\t\t\tallPoints = new ArrayList<>(SIZE_OF_ORIGINAL_LIST);\n\t\t}", "public GraphPanel4KochCurve() {\n initComponents();\n }", "public LineView(Element elem) {\n super(elem);\n }", "private void setData(int count) {\n\n int goalValue = mSharedPreferences.getData(PREF_GOAL_VALUE);\n Log.e(TAG, \"setData: \" + goalValue);\n\n ArrayList<Entry> values = new ArrayList<>();\n values.add(new Entry(0, 0));\n for (int i = 1; i < count; i++) {\n\n float val = (float) (Math.random() * 10) + values.get(i-1).getY();\n Log.e(TAG, \"val 1: \" + val);\n\n if(val >= goalValue) val = goalValue;\n Log.e(TAG, \"val 2: \" + val);\n\n values.add(new Entry(i, val));\n }\n\n LineDataSet lineDataSet;\n\n if (mChart.getData() != null &&\n mChart.getData().getDataSetCount() > 0) {\n lineDataSet = (LineDataSet)mChart.getData().getDataSetByIndex(0);\n lineDataSet.setValues(values);\n mChart.getData().notifyDataChanged();\n mChart.notifyDataSetChanged();\n } else {\n // create a dataset and give it a type\n lineDataSet = new LineDataSet(values, \"\");\n\n lineDataSet.setColor(ContextCompat.getColor(getContext(), R.color.green));\n lineDataSet.setCircleColor(ContextCompat.getColor(getContext(), R.color.green));\n lineDataSet.setDrawIcons(false);\n lineDataSet.setLineWidth(2f);\n lineDataSet.setCircleRadius(1f);\n lineDataSet.setDrawCircleHole(false);\n lineDataSet.setDrawFilled(true);\n lineDataSet.disableDashedLine();\n\n mChart.setDescription(new Description()); // Hide the description\n mChart.getAxisLeft().setDrawGridLines(false);\n mChart.getAxisLeft().setDrawLabels(false);\n mChart.getAxisRight().setDrawGridLines(false);\n mChart.getAxisRight().setDrawLabels(false);\n mChart.getXAxis().setDrawGridLines(false);\n mChart.getXAxis().setDrawLabels(false);\n mChart.getLegend().setEnabled(false);\n\n lineDataSet.setDrawValues(false);\n\n if (Utils.getSDKInt() >= 18) {\n // fill drawable only supported on api level 18 and above\n final Drawable drawable = ContextCompat.getDrawable(getContext(), R.drawable.ic_add_black_24dp);\n lineDataSet.setFillDrawable(drawable);\n }\n else {\n lineDataSet.setFillColor(Color.BLACK);\n }\n\n\n ArrayList<Entry> values2 = new ArrayList<>();\n values2.add(new Entry(values.get(20).getX(), values.get(20).getY()));\n for (int i = 29; i >= 20; i--) {\n\n float val = (float) (Math.random() * 10) + values.get(i).getY();\n\n Log.d(TAG, \"Golden Values : \" + val);\n values2.add(new Entry(values.get(20).getX() + i, val));\n }\n\n LineDataSet lineDataSet2;\n\n lineDataSet2 = new LineDataSet(values2, \"Predicted\");\n\n lineDataSet2.setColor(ContextCompat.getColor(getContext(), R.color.colorOppositePrimary));\n lineDataSet2.setCircleColor(ContextCompat.getColor(getContext(), R.color.colorOppositePrimary));\n lineDataSet2.setDrawIcons(false);\n lineDataSet2.setLineWidth(2f);\n lineDataSet2.setCircleRadius(1f);\n lineDataSet2.setDrawCircleHole(false);\n lineDataSet2.setDrawFilled(true);\n lineDataSet2.disableDashedLine();\n\n lineDataSet2.setDrawValues(false);\n\n if (Utils.getSDKInt() >= 18) {\n // fill drawable only supported on api level 18 and above\n final Drawable drawable = ContextCompat.getDrawable(getContext(), R.drawable.ic_add_black_24dp);\n lineDataSet2.setFillDrawable(drawable);\n }\n else {\n lineDataSet2.setFillColor(Color.BLACK);\n }\n\n final ArrayList<ILineDataSet> dataSets = new ArrayList<>();\n dataSets.add(lineDataSet); // add the datasets\n// dataSets.add(lineDataSet2);\n\n // create a data object with the datasets\n final LineData data = new LineData(lineDataSet/*, lineDataSet2*/);\n\n // set data\n mChart.setData(data);\n\n// final ArrayList<ILineDataSet> dataSets2 = new ArrayList<>();\n// dataSets.add(lineDataSet2); // add the datasets\n\n // create a data object with the datasets\n// final LineData data2 = new LineData(dataSets2);\n// mChart.setData(data2);\n }\n }", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public CrnLineContainer() {\n }", "private void createChart() {\n\t\tchartSpace = CTChartSpace.Factory.newInstance();\n\t\tchart = chartSpace.addNewChart();\n\t\tCTPlotArea plotArea = chart.addNewPlotArea();\n\n\t\tplotArea.addNewLayout();\n\t\tchart.addNewPlotVisOnly().setVal(true);\n\n\t\tCTPrintSettings printSettings = chartSpace.addNewPrintSettings();\n\t\tprintSettings.addNewHeaderFooter();\n\n\t\tCTPageMargins pageMargins = printSettings.addNewPageMargins();\n\t\tpageMargins.setB(0.75);\n\t\tpageMargins.setL(0.70);\n\t\tpageMargins.setR(0.70);\n\t\tpageMargins.setT(0.75);\n\t\tpageMargins.setHeader(0.30);\n\t\tpageMargins.setFooter(0.30);\n\t\tprintSettings.addNewPageSetup();\n\t}", "private void createchart() {\n int successcount = 0;\n int failedcount = 0;\n \n DefaultPieDataset barchartdata = new DefaultPieDataset();\n \n if(system == null && enterprise == null){\n for(Enterprise ent: network.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n else if(network == null && enterprise == null){\n for(Network net: system.getNetworkList()){\n for(Enterprise ent: net.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n }\n else{\n for(WorkRequest request: enterprise.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n \n barchartdata.setValue( \"Successful Trials\",new Double(successcount));\n barchartdata.setValue(\"Failed trials\",new Double(failedcount));\n\n JFreeChart pieChart = ChartFactory.createPieChart(\"Successful versus failed trials\",barchartdata, false, true, false);\n final PiePlot plot=(PiePlot) pieChart.getPlot();\n ChartPanel barPanel = new ChartPanel(pieChart);\n\n dashboardpanel.removeAll();\n dashboardpanel.setLayout(new java.awt.BorderLayout());\n dashboardpanel.add(barPanel, BorderLayout.CENTER);\n dashboardpanel.validate();\n \n }", "private void setupChart(LineChart chart, LineData data, int color) {\n chart.setData(data);\n\n // get the legend (only possible after setting data)\n // Legend l = chart.getLegend();\n // l.setEnabled(false);\n // chart.getAxisLeft().setEnabled(true);\n // chart.getAxisLeft().setDrawLabels(true);\n // chart.getAxisRight().setEnabled(true);\n // chart.getAxisRight().setDrawLabels(true);\n // chart.getAxisLeft().setSpaceTop(40);\n // chart.getAxisLeft().setSpaceBottom(40);\n /* chart.getAxisLeft().setLabelCount(10,true);\n chart.getAxisRight().setEnabled(false);\n chart.getXAxis().setEnabled(true);\n chart.getXAxis().setDrawAxisLine(true);\n chart.getXAxis().setDrawLabels(true);\n chart.getXAxis().setLabelCount(10,true);*/\n // animate calls invalidate()...\n // chart.animateX(2500);\n lpg_fragment.MyMarkerView markerView = new lpg_fragment.MyMarkerView(getContext(),R.layout.aqimarker);\n chart.setMarkerView(markerView);\n chart.invalidate();\n }", "public BasicLinePix() {\r\n\t\tsetTitle(\"Basic Line Pix 1.0\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tContainer cp = getContentPane();\r\n\t\tcp.setLayout(new BorderLayout());\r\n\t\teh = new EventHandler();\r\n\t\tdrawingPanel = makeDrawingPanel();\r\n\t\tdrawingPanel.addMouseListener(eh);\r\n\t\tdrawingPanel.addMouseMotionListener(eh);\r\n\t\tJPanel statusBar = createStatusBar();\r\n\t\tcp.add(drawingPanel, BorderLayout.CENTER);\r\n\t\tcp.add(statusBar, BorderLayout.SOUTH);\r\n\t\tbuildMenu();\r\n\t\tpack();\r\n\t}", "public ThongKeHD() {\n initComponents();\n initialization();\n performEvent();\n //drawChart(2021);\n }", "public CoreChart()\n {\n super(\"org.apache.myfaces.trinidad.Chart\");\n }", "private void plotDato() {\n List<Entry> entriesMedidas = new ArrayList<Entry>();\n entriesMedidas.add(new Entry((float) dato.getYears(), (float) dato.getMeasures()[mag]));\n LineDataSet lineaMedidas = new LineDataSet(entriesMedidas, \"Medida\");\n lineaMedidas.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineaMedidas.setColor(ColorTemplate.rgb(\"0A0A0A\"));\n lineaMedidas.setCircleColor(ColorTemplate.rgb(\"0A0A0A\"));\n todasMedidas.add(lineaMedidas);\n }", "org.tensorflow.proto.profiler.XLine getLines(int index);", "private void getChartPoints(ArrayList<Map<String,Object>> result) {\n lineChart = (LineChart) findViewById(R.id.temperature_chart);\n\n chartPoints = new ArrayList<>();\n chartXLabels = new ArrayList<>();\n\n for (int i = result.size()-1; i >=0; i--) {\n chartPoints.add(new Entry((float) ((double)result.get(i).get(\"CurrentTemp\")), result.size()-1-i));\n chartXLabels.add(result.get(i).get(\"Time\").toString());\n }\n\n LineDataSet dataSet = new LineDataSet(chartPoints, getResources().getString(R.string.temperature_screen_chartLineLabel));\n dataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n dataSet.setColor(R.color.temperature_chart_line_color);\n dataSet.setCircleColor(R.color.temperature_chart_circle_color);\n\n LineData data = new LineData(chartXLabels, dataSet);\n lineChart.setData(data);\n\n //Chart interaction settings\n lineChart.setTouchEnabled(true);\n\n //Chart layout settings\n lineChart.setDrawGridBackground(false);\n lineChart.setBackgroundColor(getResources().getColor(R.color.temperature_chart_background_color));\n\n lineChart.getXAxis().setEnabled(true);\n lineChart.getXAxis().setDrawGridLines(true);\n lineChart.getXAxis().setTextColor(getResources().getColor(R.color.temperature_chart_XLabels_color));\n lineChart.getXAxis().setGridColor(getResources().getColor(R.color.temperature_chart_XGrid_color));\n lineChart.getXAxis().setAxisLineColor(getResources().getColor(R.color.temperature_chart_XAxis_color));\n lineChart.getXAxis().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_XAxis_labels_dimension));\n lineChart.getXAxis().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_GridWidth_dimension));\n lineChart.getXAxis().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_AxisWidth_dimension));\n lineChart.getAxisLeft().setEnabled(true);\n lineChart.getAxisLeft().setDrawGridLines(true);\n lineChart.getAxisLeft().setTextColor(getResources().getColor(R.color.temperature_chart_YLabels_color));\n lineChart.getAxisLeft().setGridColor(getResources().getColor(R.color.temperature_chart_YGrid_color));\n lineChart.getAxisLeft().setAxisLineColor(getResources().getColor(R.color.temperature_chart_YAxis_color));\n lineChart.getAxisLeft().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_YAxis_labels_dimension));\n lineChart.getAxisLeft().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_GridWidth_dimension));\n lineChart.getAxisLeft().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_AxisWidth_dimension));\n lineChart.getAxisRight().setEnabled(false);\n\n LimitLine minLimit = new LimitLine((float) minTemp, getResources().getString(R.string.temperature_screen_chartMinLimit));\n minLimit.setLineColor(getResources().getColor(R.color.temperature_chart_minLimit_color));\n minLimit.setTextColor(getResources().getColor(R.color.temperature_chart_minLimit_label_color));\n minLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_width_dimension));\n minLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_label_dimension));\n LimitLine maxLimit=new LimitLine((float) maxTemp,getResources().getString(R.string.temperature_screen_chartMaxLimit));\n maxLimit.setLineColor(getResources().getColor(R.color.temperature_chart_maxLimit_color));\n maxLimit.setTextColor(getResources().getColor(R.color.temperature_chart_maxLimit_label_color));\n maxLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_width_dimension));\n maxLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_label_dimension));\n lineChart.getAxisLeft().addLimitLine(minLimit);\n lineChart.getAxisLeft().addLimitLine(maxLimit);\n\n //Refreshes chart\n lineChart.invalidate();\n\n //Gets the most recent temperature registered\n TextView currentTempTextView = (TextView)findViewById(R.id.temperature_currentTemp_TextView);\n currentTemp=chartPoints.get(chartPoints.size()-1).getVal();\n currentTempTextView.setText(Float.toString(currentTemp)+\"ºC\");\n\n //Gets the higher and lower temperatures registered\n float higherTemp=-900;\n float lowerTemp=900;\n for (Entry entry:chartPoints)\n {\n if(entry.getVal()>higherTemp)\n higherTemp=entry.getVal();\n if(entry.getVal()<lowerTemp)\n lowerTemp=entry.getVal();\n }\n TextView lowerTempTextView = (TextView)findViewById(R.id.temperature_minTemp2_TextView);\n lowerTempTextView.setText(Float.toString(lowerTemp)+\"ºC\");\n TextView higherTempTextView = (TextView)findViewById(R.id.temperature_maxTemp2_TextView);\n higherTempTextView.setText(Float.toString(higherTemp)+\"ºC\");\n }", "public Line(){\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_perfomance_2_, container, false);\n lineChart = (LineChart) view.findViewById(R.id.perfomance_chart);\n chartContainer = (RelativeLayout)view.findViewById(R.id.container);\n std = (TextView) view.findViewById(R.id.stdName);\n\n // initialize bundle to aed data which passed from the previous activity\n mybundle = this.getArguments();\n // initialize controller\n studentController = new StudentController(getActivity());\n\n\n // initialize the chart of performance with the values\n\n // creating list of entry of the chart\n ArrayList<Entry> entries = new ArrayList<>();\n ArrayList<Integer> markList = studentController.getExamMarkListOfStudent(mybundle.getInt(\"StudentID\"));\n entries.add(new Entry(0f,0));\n for(int i=1;i<=markList.size();i++){\n entries.add(new Entry(markList.get(i - 1), i));\n }\n ArrayList<String> labels = new ArrayList<>();\n for (int i=0;i<entries.size();i++)\n {\n if(i==0){\n labels.add(\"\");\n }\n else {\n labels.add(\"Exam_\"+(i));\n }\n }\n // set data to the chart and modify chart appearance\n LineDataSet dataset = new LineDataSet(entries, \"Marks\");\n dataset.setColor(Color.RED);\n LineData data = new LineData(labels, dataset);\n lineChart.setData(data);\n lineChart.setDescription(\"Exams\"); // set the description\n\n return view;\n\n }", "public EPILine(int[][] pixels, int line, Position position)\r\n\t{\r\n\t\t_position=position;\r\n\t\t_line=line;\r\n\t\t_pixels=pixels;\r\n\t\t\r\n\t}", "@FXML\r\n protected void linechartStage() throws IOException {\r\n LineChartStage s\r\n = new LineChartStage(MainStage.getSclAnalysisFile());\r\n s.createStage();\r\n }", "public AvailabilityChart() {\n chart = new HashMap<>();\n\n\n //initializing the chart so that the person is completely unavailable\n for (int i = 1; i < 8; i++)\n chart.put((Integer) i, false);\n\n }", "public StockTableDataRequest(DetailedOutputFileManager oManager,\n String sChartName) {\n super(sChartName, oManager);\n m_oLegend = (DetailedOutputLegend) oManager.getLegend(); \n\n m_iNumSpecies = oManager.getNumberOfSpecies();\n int iNumTypes = oManager.getNumberOfTypes();\n\n mp_iVolumeCode = new int[iNumTypes][m_iNumSpecies];\n mp_iDbhCode = new int[iNumTypes][m_iNumSpecies];\n mp_iHeightCode = new int[iNumTypes][m_iNumSpecies];\n int i, j;\n for (i = 0; i < mp_iDbhCode.length; i++) {\n for (j = 0; j < mp_iDbhCode[i].length; j++) {\n mp_iVolumeCode[i][j] = -1;\n mp_iDbhCode[i][j] = -1;\n mp_iHeightCode[i][j] = -1;\n }\n }\n\n m_fPlotAreaInHectares = oManager.getPlotArea();\n m_fNumYearsPerTimestep = oManager.getNumberOfYearsPerTimestep();\n m_iNumTimesteps = oManager.getNumberOfActualTimesteps();\n\n //Set that this displays all timesteps at once\n m_bShowOneTimestep = false;\n\n //Create our species box\n mp_sSpeciesNames = new String[m_iNumSpecies+1];\n try {\n for (i = 0; i < m_iNumSpecies; i++) {\n mp_sSpeciesNames[i] = m_oLegend.getSpeciesDisplayName(i);\n }\n } catch (sortie.data.simpletypes.ModelException oErr) {;}\n\n mp_sSpeciesNames[m_iNumSpecies] = \"All Species\"; \n }", "public PerformanceManager(PortfolioOverviewController overviewController, LineChart<String, Double> performanceGraph) {\n this.overviewController = overviewController;\n this.performanceGraph = performanceGraph;\n this.currMode = Mode.GROSS_PROFITS;\n this.fromDateBound = null;\n this.toDateBound = null;\n this.userSetDates = false;\n\n Axis<String> xAxis = performanceGraph.getXAxis();\n Axis<Double> yAxis = performanceGraph.getYAxis();\n\n xAxis.setAnimated(false);\n xAxis.setTickLabelGap(5);\n\n yAxis.setAnimated(false);\n yAxis.setTickLabelGap(5);\n\n formatYAxis();\n }", "public void setGraph(ActionEvent event)\n {\n theLineGraph.getData().clear();\n double temporary=0;\n theLineGraph.getXAxis().setLabel(\"Days\");\n\n XYChart.Series<String, Number> theGraph = new XYChart.Series<String, Number>();\n\n for (int i=0; i<Driver.save.getLog().size();i++)\n {\n String myI=i+\"\";\n\n if (event.getSource()==caloriesButton)\n {\n temporary=Driver.save.getDayCalories(i);\n theLineGraph.getYAxis().setLabel(\"Calories\");\n\n } else if(event.getSource()==protienButton)\n {\n temporary=Driver.save.getDayProtein(i);\n theLineGraph.getYAxis().setLabel(\"protien\");\n }\n else if (event.getSource()==carbsButton)\n {\n temporary=Driver.save.getDayCarbo(i);\n theLineGraph.getYAxis().setLabel(\"Carbs\");\n }\n else if (event.getSource()==fatsButton)\n {\n temporary=Driver.save.getDayFats(i);\n theLineGraph.getYAxis().setLabel(\"Fats\");\n }\n else if (event.getSource()==bevButton)\n {\n temporary=Driver.save.getDayBevarage(i);\n theLineGraph.getYAxis().setLabel(\"Drinks in ml\");\n }\n\n theGraph.getData().add(new XYChart.Data<String, Number>(myI ,temporary));\n }\n theLineGraph.getData().addAll(theGraph);\n\n }", "private void btnRenderActionPerformed(java.awt.event.ActionEvent evt) {\n \r\n String x = jcbX_Axis.getSelectedItem().toString();\r\n String y = jcbY_Axis.getSelectedItem().toString();\r\n \r\n if(y.equals(\"Depth\")){\r\n //log plot\r\n \r\n WitsmlLogCurve ydata = currentCurves.get(0);\r\n WitsmlLogCurve xdata = null;\r\n // the selected value by looping through the curve object\r\n \r\n for(int i = 1; i < currentCurves.size(); i ++){\r\n if(x.equals(currentCurves.get(i).getDescription())){\r\n xdata = currentCurves.get(i);\r\n // System.out.println(\"got \"+currentCurves.get(i).getDescription());\r\n break;\r\n }\r\n }\r\n \r\n \r\n List<Object> yvalues = ydata.getValues();\r\n List<Object> xvalues = xdata.getValues();\r\n \r\n \r\n String title = \"Depth against \"+xdata.getDescription();\r\n XYSeries series = new XYSeries(title);\r\n for(int i = 0; i<yvalues.size(); i++){\r\n Object vx = xvalues.get(i);\r\n Object vy = yvalues.get(i);\r\n double dx = Double.parseDouble(vx.toString());\r\n double dy = Double.parseDouble(vy.toString());\r\n // System.out.println(\"depth : \"+dy +\" : \"+title+\" : \"+dx);\r\n series.add(dx, dy);\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n \r\n // create a chart using the createYLineChart method...\r\n JFreeChart chart = ChartFactory.createXYLineChart(title, // chart title\r\n xdata.getDescription(), \"Depth\", // x and y axis labels\r\n data); // data\r\n \r\n XYPlot plot = (XYPlot) chart.getPlot();\r\n XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\r\n renderer.setSeriesLinesVisible(0, true);\r\n renderer.setSeriesShapesVisible(0, false);\r\n renderer.setSeriesLinesVisible(1, false);\r\n renderer.setSeriesShapesVisible(1, true); \r\n plot.setRenderer(renderer);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n \r\n }else{\r\n // trajectory\r\n \r\n ArrayList<Double> ax = getValues(x);\r\n ArrayList<Double> ay = getValues(y);\r\n \r\n XYSeries series = new XYSeries(trajName);\r\n for(int i = 0; i < ax.size(); i++){\r\n series.add(ax.get(i), ay.get(i));\r\n }\r\n XYSeriesCollection data = new XYSeriesCollection();\r\n data.addSeries(series);\r\n JFreeChart chart = ChartFactory.createXYLineChart(trajName, // chart title\r\n x, y, // x and y axis labels\r\n data);\r\n ChartPanel cp = new ChartPanel(chart);\r\n setDisplayArea(cp);\r\n// call a method to select the method here \r\n }\r\n }", "Chart(ChartFormat cFormat, int digits) {\n // set the background\n setBackground(Color.BLACK);\n\n // set the members\n setFormat(cFormat);\n setBarLenght(DEFAULT_BAR_LENGH);\n setTextAreaLenght(DEFAULT_TEXT_AREA_LENGHT);\n setDigitsAfterDot(digits);\n\n }", "public Series () {\n super();\n this.price = RandomFill.generateNumber(5,15);\n this.listSeason = RandomFill.generateListSeason();\n }", "public void initGraph(StackPane stackPane, String lineChartTitle) {\n m_pLineChartTitle = lineChartTitle;\n m_pStackPane = stackPane;\n\n createChart(m_pLineChartTitle);\n if (m_pStackPane.getChildren().size() > 0) {\n m_pStackPane.getChildren().remove(0); // Remove the last line chart if there is\n }\n m_pStackPane.getChildren().add(m_pLineChart);\n addOrReplaceDataSeries();\n }", "public abstract void explodingKittenDrawn(int playerIndex);", "public void generateChart(){\n String[][] contents = retrieveFields();\n\n// String msg = \"test - \";\n// printCells(contents);\n\n String[] houseDisplay = new String[12];\n houseDisplay = new String[]{\"6\",\"4\",\"2\",\"1\",\"4\",\"6\",\"3\",\"5\",\"7/8\",\"\",\"5\",\"3\"};\n display(houseDisplay);\n }", "public void setLine (int Line);", "public VixHedgePanel() {\n initComponents();\n \n JPanel p1 = new VerticalPanel();\n p1.add(\"Strike Pirce\", m_strikePrice);\n \n this.add(p1, BorderLayout.NORTH);\n \n }" ]
[ "0.627216", "0.62064946", "0.6095921", "0.60236925", "0.5951102", "0.57447976", "0.5737167", "0.5672064", "0.5605654", "0.5593199", "0.55076015", "0.54946697", "0.5462024", "0.5458207", "0.5441096", "0.543343", "0.5428137", "0.53922266", "0.53768754", "0.53629506", "0.53433144", "0.53206074", "0.5303969", "0.5295448", "0.5292731", "0.5280189", "0.5265543", "0.52526027", "0.5211533", "0.5202384", "0.51974237", "0.517241", "0.5153597", "0.5113372", "0.51100165", "0.5088987", "0.5088393", "0.508809", "0.508372", "0.50800395", "0.50721353", "0.5068314", "0.5064978", "0.506457", "0.50617445", "0.50468993", "0.50211525", "0.50211114", "0.502041", "0.5007225", "0.49936607", "0.4993628", "0.49841815", "0.49591878", "0.49529943", "0.49397844", "0.49232087", "0.4913875", "0.49018794", "0.48825437", "0.48723325", "0.48717806", "0.48611787", "0.4856321", "0.48523533", "0.48462787", "0.4842365", "0.4839558", "0.48375133", "0.48237464", "0.4821755", "0.4819208", "0.4813782", "0.48131368", "0.481126", "0.4809782", "0.48000807", "0.47971803", "0.47891957", "0.47755828", "0.47691983", "0.47681868", "0.4763313", "0.47628233", "0.47508934", "0.47451568", "0.47451082", "0.47333366", "0.47318643", "0.4731354", "0.4730479", "0.47144455", "0.47135213", "0.47111115", "0.47107825", "0.47073877", "0.47056752", "0.47053996", "0.46998125", "0.46984935" ]
0.68832344
0
createDataset method updates information about the progress of players in a specific experiment by retrieving agents' scores for different tournaments from the Dataset stored HIR
private DefaultCategoryDataset createDataset() { dataset.clear(); // Query HIM to submit data for bar chart display HistoricalInfoMgr.getChartDataset(expNum); return dataset; // add the data point (y-value, variable, x-value) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateDataset(Dataset dataset, User user) {\n // get current state of the report\n Report report = ReportingMechanism.getInstance().getReport();\n // calculate completeness\n float completeness = this.datasetPerformance.getCompletenessPercentage();\n // calculate number of users\n int numberOfUsers = this.datasetPerformance.getNumberOfUserAssigned();\n\n JsonObject reportObject = report.getJsonObject();\n JsonArray datasets = (JsonArray) reportObject.get(\"datasets\");\n Iterator<JsonElement> datasetIterator = datasets.iterator();\n while (datasetIterator.hasNext()) {\n JsonObject datasetObj = (JsonObject) (datasetIterator.next());\n if (datasetObj.get(\"dataset_id\").getAsInt() != dataset.getDatasetID())\n continue;\n // add number of users and completeness to report\n datasetObj.addProperty(\"number_of_users\", numberOfUsers);\n datasetObj.addProperty(\"completeness\", completeness);\n\n // final instance labels part\n JsonArray finalLabels = (JsonArray) datasetObj.get(\"final_instance_labels\");\n ArrayList<String> finalLabelsList = datasetPerformance.getDistributionInstance();\n\n // flush final labels array\n for (int z = finalLabels.size() - 1; z >= 0; z--) {\n finalLabels.remove(z);\n }\n // recreate final labels\n for (int i = 0; i < finalLabelsList.size(); i = i + 2) {\n JsonObject finalLabelObj = new JsonObject();\n finalLabelObj.addProperty(\"instance\", finalLabelsList.get(i));\n finalLabelObj.addProperty(\"percentage\", Double.parseDouble(finalLabelsList.get(i + 1)));\n finalLabels.add(finalLabelObj);\n }\n\n // starting of unique number of instances for each label part\n // -------------------\n\n JsonArray uniqueInstances = (JsonArray) datasetObj.get(\"unique_instance_number_for_each_label\");\n\n // flush unique instance labels array\n for (int z = uniqueInstances.size() - 1; z >= 0; z--) {\n uniqueInstances.remove(z);\n }\n\n // recreate unique instances\n ArrayList<Label> labels = datasetPerformance.getDataset().getClassLabels();\n int labelsSize = labels.size();\n for (int j = 0; j < labelsSize; j++) {\n JsonObject labelObj = new JsonObject();\n int number = datasetPerformance.getNumOfUniqueInstance(labels.get(j));\n labelObj.addProperty(\"label_id\", labels.get(j).getLabelID());\n labelObj.addProperty(\"unique_instance_number\", number);\n uniqueInstances.add(labelObj);\n }\n\n // --------------------------- ending of unique number of instances for each\n // label part\n\n // find current user's userMetric\n UserPerformance userPerformance = null;\n ArrayList<UserPerformance> userPerformances = ReportingMechanism.getInstance().getUserReportMechanism()\n .getUserPerformances();\n int userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n if (userPerformances.get(i).getUser().getUserID() == user.getUserID()) {\n userPerformance = userPerformances.get(i);\n break;\n }\n }\n\n // starting of user completeness for datasets in report part\n // -----------------------------------------\n\n JsonArray userCompleteness = (JsonArray) datasetObj.get(\"user_completeness\");\n Iterator<JsonElement> userCompIterator = userCompleteness.iterator();\n // initially if there is no userCompleteness part, create it with user id and\n // percentage properties\n if (!userCompIterator.hasNext()) {\n userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n JsonObject completenessObject = new JsonObject();\n completenessObject.addProperty(\"user_id\", userPerformances.get(i).getUser().getUserID());\n completenessObject.addProperty(\"percentage\", 0);\n userCompleteness.add(completenessObject);\n }\n }\n\n // if objects of the userCompleteness exists, find current user and update\n // corresponding properties\n userCompIterator = userCompleteness.iterator();\n boolean isFound = false;\n while (userCompIterator.hasNext()) {\n JsonObject completenessObj = (JsonObject) (userCompIterator.next());\n if (completenessObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n completenessObj.addProperty(\"percentage\", userPerformance.getDatasetCompletenessPer());\n isFound = true;\n }\n }\n\n // if user added in between executions, create and update user's information\n if (!isFound) {\n JsonObject completenessObject = new JsonObject();\n completenessObject.addProperty(\"user_id\", user.getUserID());\n completenessObject.addProperty(\"percentage\", userPerformance.getDatasetCompletenessPer());\n userCompleteness.add(completenessObject);\n }\n\n // -------------------------------------------- ending of user completeness for\n // datasets in report part\n\n // starting of user consistency for datasets in report part\n // ----------------------------------\n\n JsonArray userConsistency = (JsonArray) datasetObj.get(\"user_consistency\");\n Iterator<JsonElement> userConsIterator = userConsistency.iterator();\n // if objects of the userConsistency array is not created then create and add\n // user id and consistency percentages\n if (!userConsIterator.hasNext()) {\n userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n JsonObject consistencyObject = new JsonObject();\n consistencyObject.addProperty(\"user_id\", userPerformances.get(i).getUser().getUserID());\n consistencyObject.addProperty(\"consistency_percentages\", 0);\n userConsistency.add(consistencyObject);\n }\n }\n\n // if objects of the userConsistency array has already created then find current\n // user and update it\n userConsIterator = userConsistency.iterator();\n isFound = false;\n while (userConsIterator.hasNext()) {\n JsonObject consistencyObj = (JsonObject) (userConsIterator.next());\n if (consistencyObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n JsonArray users = (JsonArray) reportObject.get(\"users\");\n Iterator<JsonElement> userIterator = users.iterator();\n while (userIterator.hasNext()) {\n JsonObject userObj = (JsonObject) (userIterator.next());\n // if current user is found in all users, update consistency percentage based on\n // all datasets\n if (userObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n consistencyObj.addProperty(\"consistency_percentages\",\n userPerformance.getConsistencyPercentagesForUser(\n ReportingMechanism.getInstance().getAllDatasets()));\n }\n }\n isFound = true;\n }\n }\n\n // if user added in between executions, create and update user's information\n if (!isFound) {\n JsonObject consistencyObject = new JsonObject();\n\n JsonArray users = (JsonArray) reportObject.get(\"users\");\n Iterator<JsonElement> userIterator = users.iterator();\n while (userIterator.hasNext()) {\n JsonObject userObj = (JsonObject) (userIterator.next());\n if (userObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n consistencyObject.addProperty(\"user_id\", user.getUserID());\n consistencyObject.addProperty(\"consistency_percentages\", userPerformance\n .getConsistencyPercentagesForUser(ReportingMechanism.getInstance().getAllDatasets()));\n }\n }\n userConsistency.add(consistencyObject);\n }\n\n // ---------------------------------- ending of user consistency for datasets in\n // report part\n\n }\n\n }", "private void updateTableData() {\n if (articles.size() == 0) {\n return; // no agent data yet !!!!\n }\n for (int i = 0; i < articles.size(); i++) {\n NewsArticle article = (NewsArticle) articles.elementAt(i);\n String score = \"0.0\";\n\n switch (filterType) {\n case FilterAgent.USE_KEYWORDS:\n score = String.valueOf(article.getKeywordScore());\n break ;\n case FilterAgent.USE_CLUSTERS:\n score = String.valueOf(article.getClusterScore());\n break ;\n case FilterAgent.USE_PREDICTED_RATING:\n score = String.valueOf(article.getPredictedRating()) ;\n break ;\n }\n data[i][COL_SCOREID] = score;\n }\n return;\n }", "@Override\n\tpublic void execute()\n\t{\n\t\tSortedSet<String> active_agent_ids = sim.getactiveParticipantIdSet(\"group\");\n\t\tIterator<String> iter = active_agent_ids.iterator();\n\t\tString name;\n\t\tupdateLoanPlayers(active_agent_ids, iter);\n\n\t\tif (en.getRoundsPassed() == rounds)\n\t\t{\n\t\t\tdata.add(\n\t\t\t\t\t\t\t\" ==== Cycle \" + sim.getTime() + \" Begins (\" + en.getRoundsPassed() + ':' + en.getCurrentTurnType() + \") ==== \");\n\t\t\tdata.add(\n\t\t\t\t\t\t\t\"************************************************************************************************************ \");\n\t\t\tfor (Map.Entry<String, PoliticalGroup> entry : p_players.entrySet())\n\t\t\t{\n\t\t\t\twhile (iter.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString id = iter.next();\n\t\t\t\t\tif (p_players.get(id) != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tname = p_players.get(id).getDataModel().getName();\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"===============================\" + name + \"===============================\");\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"Group population: \" + p_players.get(id).getDataModel().getMemberList().size());\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"Current reserve: \" + p_players.get(id).getDataModel().getCurrentReservedFood());\n\t\t\t\t\t\tdata.add(\"Greediness: \" + PoliticalGroup.getGreediness(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel()));\n\t\t\t\t\t\tdata.add(\"++++++LOAN HISTORY OF THIS GROUP++++++\");\n\n\t\t\t\t\t\t//Display debtors / loans given\n\t\t\t\t\t\tdata.add(\"Debtors History-------------------------------\");\n\t\t\t\t\t\tMap<String, List<Tuple<Double, Double>>> loansGiven = PoliticalGroup.getLoansGiven(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel());\n\t\t\t\t\t\tif (loansGiven != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSet<String> debtors = loansGiven.keySet();\n\t\t\t\t\t\t\tfor (String deb : debtors)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString gname;\n\t\t\t\t\t\t\t\tif (PublicEnvironmentConnection.getInstance().getGroupById(deb) == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = \"A DEAD GROUP\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = PublicEnvironmentConnection.getInstance().getGroupById(\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeb).getName();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\"---->Debtor: \" + gname + \" has been given: \" + loansGiven.get(\n\t\t\t\t\t\t\t\t\t\t\t\tdeb).size() + \" loans from this group!\");\n\t\t\t\t\t\t\t\tdouble amountBorrowed = 0;\n\t\t\t\t\t\t\t\tfor (Tuple<Double, Double> t : loansGiven.get(deb))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tamountBorrowed += t.getKey() * (1 + t.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\t\t\" This debtor has borrowed \" + amountBorrowed + \" units of food\");\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{\n\t\t\t\t\t\t\tdata.add(\"No loans given at the moment!\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.add(\"Creditors History-------------------------------\");\n\t\t\t\t\t\t//Display debtors / loans given\n\t\t\t\t\t\tMap<String, List<Tuple<Double, Double>>> loansTaken = PoliticalGroup.getLoansTaken(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel());\n\t\t\t\t\t\tif (loansTaken != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSet<String> creditors = loansTaken.keySet();\n\t\t\t\t\t\t\tfor (String cred : creditors)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString gname;\n\t\t\t\t\t\t\t\tif (PublicEnvironmentConnection.getInstance().getGroupById(cred) == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = \"A DEAD GROUP\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = PublicEnvironmentConnection.getInstance().getGroupById(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcred).getName();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\"---->Creditor: \" + gname + \" has given this group: \" + loansTaken.get(\n\t\t\t\t\t\t\t\t\t\t\t\tcred).size() + \" loans!\");\n\t\t\t\t\t\t\t\tdouble amountBorrowed = 0;\n\t\t\t\t\t\t\t\tfor (Tuple<Double, Double> t : loansTaken.get(cred))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tamountBorrowed += t.getKey() * (1 + t.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\t\t\" This group has been given \" + amountBorrowed + \" units of food from this creditor\");\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{\n\t\t\t\t\t\t\tdata.add(\"No loans taken at the moment!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdata.add(\" \");\n\t\t\t\titer = active_agent_ids.iterator();\n\t\t\t}\n\t\t\trounds++;\n\t\t}\n\t}", "@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }", "public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }", "@Override\n public void runOneExperiment(int numGoods, int numBidders, int k, double p, String distribution, SqlDB dbLogger) throws Exception {\n if (!dbLogger.checkIfRowExists(\"singleton_\" + distribution, numGoods, numBidders, p)) {\n System.out.print(\"\\t Adding data... \");\n HashMap<String, DescriptiveStatistics> stats = new HashMap<String, DescriptiveStatistics>();\n for (int i = 0; i < RunParameters.numTrials; i++) {\n // Generate Singleton random market.\n SingletonMarket<Goods, Bidder<Goods>> M = this.getSingletonMarket(numGoods, numBidders, p, distribution);\n // Optimal Utilitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> utilitarianMaxAlloc = new WelfareMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalWelfare = utilitarianMaxAlloc.getValue();\n // Optimal Egalitarian Allocation.\n MarketAllocation<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>> egalitarianMaxAlloc = new EgalitarianMaxAllocationILP<Market<Goods, Bidder<Goods>>, Goods, Bidder<Goods>>().Solve(M);\n double optimalEgalitarian = (double) egalitarianMaxAlloc.getNumberOfWinners();\n // Obtain statistics from all algorithms.\n this.populateStats(stats, new SingletonEVP(M).Solve(), \"ev\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyWelfare), \"gw\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.GreedyEgalitarian), \"ge\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalWelfare), \"ow\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.OptimalEgalitarian), \"oe\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.WaterFall), \"wf\", optimalWelfare, optimalEgalitarian);\n this.populateStats(stats, this.getRevMaxMarketPrices(M, Allocations.MaxBidder), \"mb\", optimalWelfare, optimalEgalitarian);\n }\n System.out.println(\"done!\");\n dbLogger.saveSingleton(\"singleton_\" + distribution, numGoods, numBidders, p, stats);\n } else {\n System.out.println(\"\\t Already have data \");\n }\n }", "protected void addFinishedData() throws ModelException {\n int i;\n \n //Harvest data\n ArrayList<Behavior> p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"Harvest\");\n if (mp_oHarvestData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Harvest oHarvest;\n if (p_oBehs.size() > 0) {\n oHarvest = (Harvest) p_oBehs.get(0);\n oHarvest.clearHarvestEvents();\n } else {\n oHarvest = (Harvest) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"Harvest\");\n }\n for (i = 0; i < mp_oHarvestData.size(); i++) {\n oHarvest.addHarvestEvent(mp_oHarvestData.get(i));\n }\n }\n \n //Mortality episode data\n p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"EpisodicMortality\");\n if (mp_oMortEpisodeData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n EpisodicMortality oEp;\n if (p_oBehs.size() > 0) {\n oEp = (EpisodicMortality) p_oBehs.get(0);\n oEp.clearMortalityEpisodes();\n } else {\n oEp = (EpisodicMortality) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"EpisodicMortality\");\n }\n for (i = 0; i < mp_oMortEpisodeData.size(); i++) {\n oEp.addMortalityEpisode(mp_oMortEpisodeData.get(i));\n }\n }\n\n //Planting data\n p_oBehs = m_oPlantBehaviors.getBehaviorByParameterFileTag(\"Plant\");\n if (mp_oPlantingData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Planting oPlant;\n if (p_oBehs.size() > 0) {\n oPlant = (Planting) p_oBehs.get(0);\n oPlant.clearPlantingEvents();\n } else {\n oPlant = (Planting) m_oPlantBehaviors.createBehaviorFromParameterFileTag(\"Plant\");\n }\n for (i = 0; i < mp_oPlantingData.size(); i++) {\n oPlant.addPlantingEvent(mp_oPlantingData.get(i));\n }\n }\n }", "@Override\n\tpublic void loadData() {\n\t\t\n\t\tint teamId = ((MatchPagerActivity)getActivity()).getTeamId();\n\t\tint matchId = ((MatchPagerActivity)getActivity()).getMatchId();\n\n\t\tUri teamUri = Matches.buildMatchIdTeamIdUri(\"\"+matchId, \"\"+teamId);\n\t\tfinal Cursor cur = getActivity().getContentResolver().query(teamUri, PROJECTION, null, null, null);\n\t\t\n\t\tif (cur != null && cur.moveToFirst()) {\n\t\t\tint numHighShotsMade = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_SCORED_HIGH));\n\t\t\tint numMedShotsMade = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_SCORED_MED));\n\t\t\tint numLowShotsMade = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_SCORED_LOW));\n\t\t\tint numHighShotsAtmp = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_ATTEMPT_HIGH));\n\t\t\tint numMedShotsAtmp = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_ATTEMPT_MED));\n\t\t\tint numLowShotsAtmp = cur.getInt(cur.getColumnIndex(TeamMatches.NUM_ATTEMPT_LOW));\n\t\t\n\t\t\tmHighCounter.setText(\"\" + numHighShotsMade);\n\t\t\tmMedCounter.setText(\"\" + numMedShotsMade);\n\t\t\tmLowCounter.setText(\"\" + numLowShotsMade);\n\t\t\tmHighMissCounter.setText(\"\" + (numHighShotsAtmp-numHighShotsMade));\n\t\t\tmMedMissCounter.setText(\"\" + (numMedShotsAtmp-numMedShotsMade));\n\t\t\tmLowMissCounter.setText(\"\" + (numLowShotsAtmp-numLowShotsMade));\n\t\t}\n\t\tcur.close();\n\t}", "@Override\r\n\tpublic void calculateFinalData() {\n\t\tfor(TeamPO oneTeam:teams.getAllTeams()){\r\n\t\t\toneTeam.calculateTeamDataInOneSeason();\r\n\t\t}\r\n\t}", "@Override\r\n public boolean doLoadTrackersData() {\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n ObjectTracker objectTracker = (ObjectTracker) tManager.getTracker(ObjectTracker.getClassType());\r\n if (objectTracker == null)\r\n return false;\r\n if (mCurrentDataset == null)\r\n mCurrentDataset = objectTracker.createDataSet();\r\n if (mCurrentDataset == null)\r\n return false;\r\n if (!mCurrentDataset.load(mDatasetStrings.get(mCurrentDatasetSelectionIndex), STORAGE_TYPE.STORAGE_APPRESOURCE))\r\n return false;\r\n if (!objectTracker.activateDataSet(mCurrentDataset))\r\n return false;\r\n int numTrackables = mCurrentDataset.getNumTrackables();\r\n for (int count = 0; count < numTrackables; count++) {\r\n Trackable trackable = mCurrentDataset.getTrackable(count);\r\n if (isExtendedTrackingActive())\r\n trackable.startExtendedTracking();\r\n\r\n String name = \"Current Dataset : \" + trackable.getName();\r\n trackable.setUserData(name);\r\n Log.d(LOGTAG, \"UserData:Set the following user data \" + trackable.getUserData());\r\n }\r\n return true;\r\n }", "public static void main(String[] args) throws IOException {\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"FilmTrust Dataset Testing.\");\n System.out.println(\"------------------------------------------------\");\n\n double duration = System.currentTimeMillis();\n filmTrust = new Network(new File(\"src//data//ratings.txt\"),\n new File(\"src//data//trust.txt\"));\n\n filmTrust.connect();\n duration = System.currentTimeMillis() - duration;\n System.out.println(\"FilmTrust connected in \" + duration / 1000 + \" seconds.\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"Data Statistics:\");\n filmTrust.showStatistics();\n System.out.println(\"------------------------------------------------\");\n\n duration = System.currentTimeMillis();\n\n if (metaPath.equals(\"TrTeTr\")) {\n System.out.println(\"PathSim using Trustor -> Trustee -> Trustor :\");\n String predictionFileName = similaritMatrixFileName+metaPath+ \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n \n\n Set<Integer> trustorUsers = filmTrust.getTrustorUsers(); \n \n for (int userId : trustorUsers) { \n ArrayList<TrustorUser> similarTrustors = filmTrust.PathSimTrustor(userId, metaPath); \n writeSimilarityToFile(similarTrustors, userId, pFile);\n \n }// for trustor users \n \n pFile.close();\n System.out.println(\"\"); \n System.out.println(\"End of TrTeTr path\");\n } // if TrTeTr\n \n else if (metaPath.equals(\"TrTeTrTeTr\")) {\n System.out.println(\"PathSim using Trustor -> Trustee -> Trustor -> Trustee -> Trustor :\");\n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> trustorUsers = filmTrust.getTrustorUsers(); \n\n int counter = 0,processStatus=0, size = trustorUsers.size();\n for (int userId : trustorUsers) {\n \n ArrayList<TrustorUser> similarTrustors = filmTrust.PathSimTrustor(userId, metaPath);\n writeSimilarityToFile(similarTrustors, userId, pFile); \n \n }// for \n\n pFile.close();\n System.out.println(\"End of TrTeTrTeTr path\");\n } // if TrTeTrTeTr\n \n else if (metaPath.equals(\"TrTrTeTrTr\")) {\n System.out.println(\"PathSim using Trustor -> Trustor -> Trustee -> Trustor -> Trustor :\");\n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName)); \n \n Set<Integer> trustorUsers = filmTrust.getTrustorUsers();\n\n\n for (int userId : trustorUsers) { \n ArrayList<TrustorUser> similarTrustors = filmTrust.PathSimTrustor(userId, metaPath);\n writeSimilarityToFile(similarTrustors, userId, pFile);\n }\n pFile.close();\n System.out.println(\"End of TrTrTeTrTr path\");\n } // if TrTrTeTrTr\n \n else if (metaPath.equals(\"TeTrTe\")) {\n System.out.println(\"PathSim using Trustee -> Trustor -> Trustee :\");\n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> trusteeUsers = filmTrust.getTrusteeUsers();\n\n for (int userId : trusteeUsers) { \n ArrayList<TrusteeUser> similarTrustees = filmTrust.PathSimTrustee(userId, metaPath);\n writeSimilarityToFile(similarTrustees, userId, pFile); \n }\n pFile.close();\n System.out.println(\"End of TeTrTe path\");\n } // if TeTrTe\n \n else if (metaPath.equals(\"TeTrTeTrTe\")) {\n System.out.println(\"PathSim using Trustee -> Trustor -> Trustee -> Trustor -> Trustee:\"); \n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> trusteeUsers = filmTrust.getTrusteeUsers();\n for (int userId : trusteeUsers) { \n ArrayList<TrusteeUser> similarTrustees = filmTrust.PathSimTrustee(userId, metaPath);\n writeSimilarityToFile(similarTrustees, userId, pFile);\n }\n\n pFile.close();\n System.out.println(\"End of TeTrTeTrTe path\");\n } // if TeTrTeTrTe \n \n else if (metaPath.equals(\"TeTeTrTeTe\")) {\n System.out.println(\"PathSim using Trustee -> Trustee -> Trustor -> Trustee -> Trustee:\"); \n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> trusteeUsers = filmTrust.getTrusteeUsers();\n\n for (int userId : trusteeUsers) { \n ArrayList<TrusteeUser> similarTrustees = filmTrust.PathSimTrustee(userId, metaPath);\n writeSimilarityToFile(similarTrustees, userId, pFile);\n }\n\n pFile.close();\n System.out.println(\"End of TeTeTrTeTe path\");\n } // if TeTeTrTeTe\n \n else if (metaPath.equals(\"UrImUr\")) {\n System.out.println(\"PathSim using User -> Item -> User :\");\n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> ratingUsers = filmTrust.getRatingUsers();\n \n for (int userId : ratingUsers) {\n filmTrust.resetDataOfUsers();\n ArrayList<RatingUser> similarRatingUsers = filmTrust.PathSimRatingUser(userId, metaPath);\n writeSimilarityToFile(similarRatingUsers, userId, pFile);\n }\n pFile.close();\n System.out.println(\"End of UrImUr path\");\n }// if UrImUr\n else if (metaPath.equals(\"TrImTr\")) {\n System.out.println(\"PathSim using Trustor -> Item -> Trustor :\"); \n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n \n Set<Integer> trustorUsers = filmTrust.getTrustorUsers();\n\n for (int userId : trustorUsers) { \n ArrayList<TrustorUser> similarTrustors = filmTrust.PathSimTrustor(userId, metaPath);\n writeSimilarityToFile(similarTrustors, userId, pFile);\n }\n pFile.close();\n System.out.println(\"End of TrImTr path\");\n }// if TrImTr\n \n else if (metaPath.equals(\"TeImTe\")) {\n System.out.println(\"PathSim using Trustee -> Item -> Trustee :\"); \n String predictionFileName = similaritMatrixFileName+metaPath + \".csv\";\n FileWriter pFile = new FileWriter(new File(predictionFileName));\n\n Set<Integer> trusteeUsers = filmTrust.getTrusteeUsers();\n\n for (int userId : trusteeUsers) { \n ArrayList<TrusteeUser> similarTrustees = filmTrust.PathSimTrustee(userId, metaPath);\n writeSimilarityToFile(similarTrustees, userId, pFile);\n }\n pFile.close();\n System.out.println(\"End of TeImTe path\");\n }// if TrImTr\n else if(metaPath.equals(\"Test\")){\n System.out.println(\"sperating users:\");\n HashMap<Integer, RatingUser> ratingUsersItems = filmTrust.getRatingUsersItems(); \n HashMap<Integer, RatedItem> ratedItemsUsers = filmTrust.getRatedItemsUsers();\n \n System.out.println(\"cold users...\");\n String seperatedUsers = \"filmtrust-coldusers\";\n String seperatedFileName = seperatedUsers + \".txt\";\n FileWriter pFile = new FileWriter(new File(seperatedFileName));\n \n writeColdUsersToFile(ratingUsersItems, pFile); \n pFile.close();\n \n System.out.println(\"heavy users...\");\n seperatedUsers = \"filmtrust-heavyusers\";\n seperatedFileName = seperatedUsers + \".txt\";\n pFile = new FileWriter(new File(seperatedFileName)); \n writeHeavyUsersToFile(ratingUsersItems, pFile); \n pFile.close(); \n \n System.out.println(\"opinionated users...\");\n seperatedUsers = \"filmtrust-opinionatedusers\";\n seperatedFileName = seperatedUsers + \".txt\";\n pFile = new FileWriter(new File(seperatedFileName)); \n writeOpinionatedUsersToFile(ratingUsersItems, pFile); \n pFile.close(); \n \n System.out.println(\"niche items...\"); \n seperatedUsers = \"filmtrust-nicheitems\";\n seperatedFileName = seperatedUsers + \".txt\";\n pFile = new FileWriter(new File(seperatedFileName)); \n writeNicheItemsToFile(ratedItemsUsers, pFile); \n pFile.close();\n \n System.out.println(\"controversial items...\"); \n seperatedUsers = \"filmtrust-controversialitems\";\n seperatedFileName = seperatedUsers + \".txt\";\n pFile = new FileWriter(new File(seperatedFileName)); \n writeControversialItemsToFile(ratedItemsUsers, pFile); \n pFile.close();\n \n System.out.println(\"End of seperation\");\n }//test\n\n duration = System.currentTimeMillis() - duration;\n\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"calculations done in \" + duration / 1000 + \" seconds.\");\n\n }", "public static void main(String[] args) throws IOException, InterruptedException {\n\n File src = new ClassPathResource(\"winequality-red.csv\").getFile();\n\n FileSplit fileSplit = new FileSplit(src);\n\n RecordReader rr = new CSVRecordReader(1,',');// since there is header in the file remove row 1 with delimter coma\n rr.initialize(fileSplit);\n\n Schema sc = new Schema.Builder()\n .addColumnsDouble(\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\")\n .addColumnCategorical(\"quality\", Arrays.asList(\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"))\n .build();\n\n TransformProcess tp = new TransformProcess.Builder(sc)\n .categoricalToInteger(\"quality\")\n .build();\n\n System.out.println(\"Initial Schema : \"+tp.getInitialSchema());\n System.out.println(\"New Schema : \"+tp.getFinalSchema());\n\n List<List<Writable>> original_data = new ArrayList<>();\n\n while(rr.hasNext()){\n original_data.add(rr.next());\n }\n\n List<List<Writable>> transformed_data = LocalTransformExecutor.execute(original_data,tp);\n\n CollectionRecordReader crr = new CollectionRecordReader(transformed_data);\n\n DataSetIterator iter = new RecordReaderDataSetIterator(crr,transformed_data.size(),-1,6);\n\n DataSet fullDataSet = iter.next();\n fullDataSet.shuffle(seed);\n\n SplitTestAndTrain traintestsplit = fullDataSet.splitTestAndTrain(0.8);\n DataSet trainDataSet = traintestsplit.getTrain();\n DataSet testDataSet = traintestsplit.getTest();\n\n\n DataNormalization normalization = new NormalizerMinMaxScaler();\n normalization.fit(trainDataSet);\n normalization.transform(trainDataSet);\n normalization.transform(testDataSet);\n\n MultiLayerConfiguration config = getConfig (numberInput,numberClasses,learning_rate);\n\n MultiLayerNetwork model = new MultiLayerNetwork(config);\n model.init();\n\n //UI-Evaluator\n StatsStorage storage = new InMemoryStatsStorage();\n UIServer server = UIServer.getInstance();\n server.attach(storage);\n\n //Set model listeners\n model.setListeners(new StatsListener(storage, 10));\n\n Evaluation eval;\n\n for(int i=0;i<epochs;i++) {\n model.fit(trainDataSet);\n eval = model.evaluate(new ViewIterator(testDataSet, transformed_data.size()));\n System.out.println(\"Epoch \" + i + \", Accuracy : \"+eval.accuracy());\n }\n\n Evaluation evalTrain = model.evaluate(new ViewIterator(trainDataSet,transformed_data.size()));\n Evaluation evalTest = model.evaluate(new ViewIterator(testDataSet,transformed_data.size()));\n\n System.out.println(\"Train Eval : \"+evalTrain.stats());\n System.out.println(\"Test Eval : \"+evalTest.stats());\n\n\n\n\n\n\n\n }", "@Override\n\tpublic void saveData() {\n\t\t\n\t\tint teamId = ((MatchPagerActivity)getActivity()).getTeamId();\n\t\tint matchId = ((MatchPagerActivity)getActivity()).getMatchId();\n\t\t\n\t\t// retrieve data from screen\n\t\tString highShotsMade = mHighCounter.getText().toString();\n\t\tString medShotsMade = mMedCounter.getText().toString();\n\t\tString lowShotsMade = mLowCounter.getText().toString();\n\t\tString highShotsMiss = mHighMissCounter.getText().toString();\n\t\tString medShotsMiss = mMedMissCounter.getText().toString();\n\t\tString lowShotsMiss = mLowMissCounter.getText().toString();\n\t\t\n\t\tint numHighShotsMade = (highShotsMade == null || highShotsMade.length() == 0) ? 0 : Integer.valueOf(highShotsMade);\n\t\tint numMedShotsMade = (medShotsMade == null || medShotsMade.length() == 0) ? 0 : Integer.valueOf(medShotsMade);\n\t\tint numLowShotsMade = (lowShotsMade == null || lowShotsMade.length() == 0) ? 0 : Integer.valueOf(lowShotsMade);\n\t\tint numHighShotsMiss = (highShotsMiss == null || highShotsMiss.length() == 0) ? 0 : Integer.valueOf(highShotsMiss);\n\t\tint numMedShotsMiss = (medShotsMiss == null || medShotsMiss.length() == 0) ? 0 : Integer.valueOf(medShotsMiss);\n\t\tint numLowShotsMiss = (lowShotsMiss == null || lowShotsMiss.length() == 0) ? 0 : Integer.valueOf(lowShotsMiss);\n\t\t\n\t\t// compute summary data offset\n\t\tint summaryNumScored = (numHighShotsMade + numMedShotsMade + numLowShotsMade) - mSummaryNumScoredInit;\n\t\tint summaryNumAttempt = (numHighShotsMiss + numMedShotsMiss + numLowShotsMiss) \n\t\t\t+(numHighShotsMade + numMedShotsMade + numLowShotsMade)- mSummaryNumAttemptInit;\n\t\tint summaryNumPoints = (3*numHighShotsMade + 2*numMedShotsMade + 1*numLowShotsMade) - mSummaryNumPointsInit;\n\t\t\n\t\t// get already existing cumulative data\n\t\tfinal Uri summaryUri = Teams.buildTeamIdUri(\"\"+teamId);\n\t\tfinal Cursor summaryCur = getActivity().getContentResolver().query(summaryUri, SUMMARY_PROJ, null, null, null);\n\t\t\n\t\tif (summaryCur != null && summaryCur.moveToFirst()) {\n\t\t\tsummaryNumScored += summaryCur.getInt(summaryCur.getColumnIndex(Teams.SUMMARY_NUM_SCORED));\n\t\t\tsummaryNumAttempt += summaryCur.getInt(summaryCur.getColumnIndex(Teams.SUMMARY_NUM_ATTEMPT));\n\t\t\tsummaryNumPoints += summaryCur.getInt(summaryCur.getColumnIndex(Teams.SUMMARY_NUM_POINTS));\t\t\t\n\t\t\tsummaryCur.close();\n\t\t}\n\t\t\n\t\tContentValues teamMatchValues = new ContentValues();\n\t\tContentValues summaryValues = new ContentValues();\n\t\t\n\t\t// add team-match data\n\t\t//teamMatchValues.put(TeamMatches.TEAM_ID, teamId);\n\t\t//teamMatchValues.put(TeamMatches.MATCH_ID, matchId);\n\t\tteamMatchValues.put(TeamMatches.NUM_SCORED_HIGH, numHighShotsMade);\n\t\tteamMatchValues.put(TeamMatches.NUM_SCORED_MED, numMedShotsMade);\n\t\tteamMatchValues.put(TeamMatches.NUM_SCORED_LOW, numLowShotsMade);\n\t\tteamMatchValues.put(TeamMatches.NUM_ATTEMPT_HIGH, numHighShotsMiss+numHighShotsMade);\n\t\tteamMatchValues.put(TeamMatches.NUM_ATTEMPT_MED, numMedShotsMiss+numMedShotsMade);\n\t\tteamMatchValues.put(TeamMatches.NUM_ATTEMPT_LOW, numLowShotsMiss+numLowShotsMade);\n\t\t\n\t\t// add summary data\n\t\tsummaryValues.put(Teams.SUMMARY_NUM_SCORED, summaryNumScored);\n\t\tsummaryValues.put(Teams.SUMMARY_NUM_ATTEMPT, summaryNumAttempt);\n\t\tsummaryValues.put(Teams.SUMMARY_NUM_POINTS, summaryNumPoints);\n\t\t\n\t\tgetActivity().getContentResolver().update(Matches.buildMatchIdTeamIdUri(\"\"+matchId, \"\"+teamId), teamMatchValues, null, null);\n\t\tgetActivity().getContentResolver().update(summaryUri, summaryValues, null, null);\n\t}", "public static void populate() throws IOException, Exception {\n\n EntityManager em = emf.createEntityManager();\n facade.fillingUpDBWithEquipments(facade.getEquipmentDTOsFromAPI(jsonReader));\n Player player1 = new Player(\"Nikolaj\", \"Hamster16\");\n Player DM = new Player(\"Cathrine\", \"Portraet11\");\n Player player2 = new Player(\"Jens\", \"Skeletor69\");\n AbillityScores abiSco11 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco12 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco13 = new AbillityScores(18, 8, 14, 12, 14, 10);\n Random randi = new Random(0);\n Skills skils1 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils2 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils3 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Character ch1 = new Character(5, 150, 85, 10, 30, \"Damascus\", \"He was a valiant paladin.\", \"orc\", \"paladin\", abiSco11, skils1);\n Character ch2 = new Character(5, 104, 85, 17, 60, \"Heidi\", \"He was a valiant druid.\", \"human\", \"druid\", abiSco12, skils2);\n Character ch3 = new Character(5, 160, 85, 17, 30, \"Varanoth\", \"He was a valiant fighter.\", \"orc\", \"fighter\", abiSco13, skils3);\n Equipment e1 = em.find(Equipment.class, \"club\");\n Equipment e2 = em.find(Equipment.class, \"candle\");\n Equipment e3 = em.find(Equipment.class, \"camel\");\n Equipment e4 = em.find(Equipment.class, \"bucket\");\n ch1.addInventory(new Inventory(e1, 1));\n ch2.addInventory(new Inventory(e2, 1));\n ch2.addInventory(new Inventory(e3, 1));\n ch3.addInventory(new Inventory(e4, 1));\n e1.addInventory(ch1.getInventories().get(0));\n e2.addInventory(ch2.getInventories().get(0));\n e3.addInventory(ch2.getInventories().get(1));\n e4.addInventory(ch3.getInventories().get(0));\n //ch1.getInventory().addEquipmentAndQty(equipment, 1);\n try {\n em.getTransaction().begin();\n Role playerRole = new Role(\"player\");\n Role DMRole = new Role(\"dungeonmaster\");\n player1.addRole(playerRole);\n DM.addRole(DMRole);\n player2.addRole(playerRole);\n //both.addRole(DMRole); // MAN KAN GODT HAVE BEGGE ROLLER CATHRINE !!!\n em.persist(playerRole);\n em.persist(DMRole);\n //em.persist(equipment);\n player1.addCharacter(ch1);\n player1.addCharacter(ch2);\n player2.addCharacter(ch3);\n //em.persist(ch1);\n em.persist(player1);\n em.persist(DM);\n em.persist(player2);\n em.getTransaction().commit();\n System.out.println(\"\");\n } finally {\n em.close();\n }\n }", "public static void main(String[] args) {\n String fileName = \"data1.txt\";\n \n \n //Load the data from the dataset file\n dataSet = getDataSet(fileName);\n \n //Setting up the output file\n String outputFileName = \"\";\n if (fileName.indexOf(\".\") > 0) {\n outputFileName = fileName.substring(0, fileName.lastIndexOf(\".\"));\n }\n \n createFile(outputFileName+\".csv\");\n \n //log the time the algorithm started\n long startTime = System.currentTimeMillis();\n \n //Placeholder of the fittest individual\n fittestIndividual = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n fittestIndividual.generateRulebase(); \n \n //Setup the mating pool\n matingPool = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n \n //used to run the GA multiple times without doing it manually\n //set to 1 because we want to run the GA once\n for (int a = 0; a < 1; a++) {\n currentBest = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n currentBest.generateRulebase();\n\n //Generate a population\n generatePopulation();\n\n //Initial calculation of the fitness\n calculateFitness(population);\n\n for (int i = 0; i < GENERATION; i++) {\n average = 0; //reset the average\n currentBestArray[i] = currentBest.getFitness();\n \n tournamentSelect(population);\n\n //Calculate the fitness of the mating pool\n calculateFitness(matingPool);\n\n //Perfrom crossover on the mating pool\n crossover(matingPool);\n\n //Mutation\n mutation(matingPool);\n\n //Calculate the fitness of the mating pool\n calculateFitness(matingPool);\n\n //Evaluate the current population\n for (Individual individual : matingPool) {\n if (individual.getFitness() > currentBest.getFitness()) {\n currentBest = new Individual(individual);\n }\n average = average + individual.getFitness();\n }\n \n\n //Replace the population with the new generation\n for (int j = 0; j < POP_SIZE; j++) {\n population[j] = new Individual(matingPool[j]);\n }\n \n averageArray[i] = average / POP_SIZE;\n }\n \n //Check whether the current best is fitter than the global fittest individual\n if (currentBest.fitness > fittestIndividual.fitness) {\n fittestIndividual = new Individual(currentBest);\n //copy the fittest individuals performance\n fittestArray = Arrays.copyOf(currentBestArray, currentBestArray.length);\n }\n }\n\n System.out.println(\"Best fitness generated for the dataset: \" + fittestIndividual.fitness);\n \n //output the rules\n printRules(fittestIndividual.getRulebase());\n \n //Save the performance data into the output file\n for (int i = 0; i < fittestArray.length; i++) {\n addToFile(i, fittestArray[i], averageArray[i]);\n }\n \n //close the file\n close();\n \n //Evaluate the fitness agaisnt the dataset\n calculateFitness(fittestIndividual);\n double accuracyPercentage = ((double) 100 / dataSet.size()) * fittestIndividual.fitness;\n System.out.format(\"%.2f%% accuracy on the datase set.\\n\", accuracyPercentage);\n \n //Log the duration it took\n long duration = System.currentTimeMillis() - startTime;\n System.out.println(\"Completed in \" + String.format(\"%02d min, %02d.%02d sec\",\n TimeUnit.MILLISECONDS.toMinutes(duration),\n TimeUnit.MILLISECONDS.toSeconds(duration)\n - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration)),\n TimeUnit.MILLISECONDS.toMillis(duration) - TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(duration))\n ));\n }", "private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }", "public void updateExperimentalData() {\n experimentalData = dataProducer.getExperimentDataset();\n }", "void saveForReplay(String playerIdentifier) {\n Player clone = new Player(seedUsed);\n clone.brain = brain.getClone();\n clone.asteroidSeeds = (ArrayList)asteroidSeeds.clone();\n\n //create table\n Table t = new Table();\n\n //convert the matrices to an array\n float[] whiArr = brain.whi.toArray();\n float[] whhArr = brain.whh.toArray();\n float[] wohArr = brain.woh.toArray();\n\n //create the amount of columns needed to fit the weights in the biggest layer to layer matrix\n int columnsNeeded = Constants.processing.max(whiArr.length, whhArr.length, wohArr.length);\n for (int i = 0; i< columnsNeeded; i++) {\n t.addColumn();\n }\n\n t.addColumn(\"Base seed\");\n\n //create column for base seed and asteroid seeds\n for (int i = 0; i< asteroidSeeds.size(); i++) {\n t.addColumn(\"Asteroid Seed \" + i);\n }\n\n t.addColumn(\"Top Score\");\n\n //set the first row as whi\n TableRow tr = t.addRow();\n\n for (int i = 0; i< whiArr.length; i++) {\n tr.setFloat(i, whiArr[i]);\n }\n\n // add base seed\n tr.setLong(columnsNeeded, seedUsed);\n\n for (int i = 0; i < asteroidSeeds.size();i++){\n int col = columnsNeeded + 1 + i;\n tr.setLong(col,asteroidSeeds.get(i));\n }\n\n int scoreOffset = columnsNeeded + 1 + asteroidSeeds.size();\n tr.setLong(scoreOffset,this.score);\n\n //set the second row as whh\n tr = t.addRow();\n\n for (int i = 0; i< whhArr.length; i++) {\n tr.setFloat(i, whhArr[i]);\n }\n\n //set the third row as woh\n tr = t.addRow();\n\n for (int i = 0; i< wohArr.length; i++) {\n tr.setFloat(i, wohArr[i]);\n }\n\n Constants.processing.saveTable(t, \"data/replay\" + playerIdentifier + \".csv\");\n }", "private void setBestChampionData(int[] stats, int championRank, Champion champion){\n\n ImageView championView;\n TextView championCs;\n TextView kdaChampionView;\n TextView gamesPlayedView;\n TextView gamesWonView;\n\n if(championRank == 1){\n championView = findViewById(R.id.iv_champion1_image);\n championCs = findViewById(R.id.tv_champion1_cs);\n kdaChampionView = findViewById(R.id.tv_champion1_kda);\n gamesPlayedView = findViewById(R.id.tv_champion1_games_played);\n gamesWonView = findViewById(R.id.tv_champion1_win_rate);\n }else if(championRank == 2){\n championView = findViewById(R.id.iv_champion2_image);\n championCs = findViewById(R.id.tv_champion2_cs);\n kdaChampionView = findViewById(R.id.tv_champion2_kda);\n gamesPlayedView = findViewById(R.id.tv_champion2_games_played);\n gamesWonView = findViewById(R.id.tv_champion2_win_rate);\n }else{\n championView = findViewById(R.id.iv_champion3_image);\n championCs = findViewById(R.id.tv_champion3_cs);\n kdaChampionView = findViewById(R.id.tv_champion3_kda);\n gamesPlayedView = findViewById(R.id.tv_champion3_games_played);\n gamesWonView = findViewById(R.id.tv_champion3_win_rate);\n }\n\n champion.loadImageFromDDragon(championView);\n\n int numberOfKills = stats[0];\n int numberOfDeaths = stats[1];\n int numberOfAssists = stats[2];\n int totalMinionsKilled = stats[3];\n int gamesPlayed = stats[4];\n int gamesWon = stats[5];\n Log.d(LOG_TAG, \"Games won: \" + gamesWon);\n\n double averageMinionsKilled = (double) totalMinionsKilled / (double) gamesPlayed;\n double averageKills = (double) numberOfKills / (double) gamesPlayed;\n double averageDeaths = (double) numberOfDeaths / (double) gamesPlayed;\n double averageAssists = (double) numberOfAssists / (double) gamesPlayed;\n\n championCs.setText(String.valueOf(averageMinionsKilled));\n\n double kdaChampion = LoLStatsUtils.calculateKDA(averageKills, averageAssists, averageDeaths);\n LoLStatsUtils.setKdaAndTextColorInView(kdaChampionView, kdaChampion, this);\n\n double winRate = ((double) gamesWon / (double) gamesPlayed) *100;\n Log.d(LOG_TAG, \"WR: \" + winRate + \" dividiendo \" + gamesWon + \" entre \"+ gamesPlayed);\n\n gamesPlayedView.setText(\"Games: \" + String.valueOf(gamesPlayed));\n gamesWonView.setText(String.valueOf((int) winRate).concat(\"%\"));\n\n }", "public void getPredictions() throws IOException, InterruptedException{\n //splitColsDataFiles();\n for(String learner:listLearners){\n File modelsFolder = new File(\"models/\"+learner);\n File[] IPFolders = modelsFolder.listFiles();\n for (File nodeFolder : IPFolders) {\n if (nodeFolder.isDirectory()) {\n File[] filesInFolder = nodeFolder.listFiles();\n ArrayList<String> filesINFolderAL = new ArrayList<String>();\n for(int i=0;i<filesInFolder.length;i++){\n filesINFolderAL.add(filesInFolder[i].getName());\n }\n if(filesINFolderAL.contains(model) && filesINFolderAL.contains(\"data.properties\")){\n System.out.println(\"Generating data for: \" + nodeFolder.getPath());\n // read properties file\n // get indices of variables\n // paste appropriate cols in models/temp\n // change commands below with appropriate data\n Properties dataProps = loadProps(nodeFolder.getPath()+\"/data.properties\");\n ArrayList<Integer> indices = new ArrayList<Integer>();\n String featuresS = dataProps.getProperty(\"sampled_variables\");\n if(featuresS!=null){\n String[] featuresArray = featuresS.split(\" \");\n for(int i=0;i<featuresArray.length;i++){\n indices.add(i, Integer.parseInt(featuresArray[i]));\n }\n // the order of indices is important\n Collections.sort(indices);\n\n String pasteTrainTempCommand = \"paste -d',' \";\n for(int i=0;i<indices.size();i++){\n pasteTrainTempCommand += \" models/temp/tr_\" + (indices.get(i)+1) + \".csv\";\n }\n pasteTrainTempCommand += \" models/temp/tr_targets.csv > models/temp/tr_temp.csv\";\n System.out.println(pasteTrainTempCommand);\n Process pasteTrainTemp_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", pasteTrainTempCommand});\n pasteTrainTemp_process.waitFor();\n\n\n String pasteTestTempCommand = \"paste -d',' \";\n for(int i=0;i<indices.size();i++){\n pasteTestTempCommand += \" models/temp/te_\" + (indices.get(i)+1) + \".csv\";\n }\n pasteTestTempCommand += \" models/temp/te_targets.csv > models/temp/te_temp.csv\";\n System.out.println(pasteTestTempCommand);\n Process pasteTestTemp_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", pasteTestTempCommand});\n pasteTestTemp_process.waitFor();\n \n // Add a new case when adding a new learner\n if(learner.equals(\"gpfunction\") || learner.equals(\"ruletree\") || learner.equals(\"rulelist\")){ // JAVA\n String predictTrain_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }else if(learner.equals(\"mplcs\")){// C OR C++\n String predictTrain_command = \"learners/\" + learner + \" -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"learners/\" + learner + \" -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }if(learner.equals(\"lccb\")){ // Python\n String predictTrain_command = \"python learners/\" + learner + \".py -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"python learners/\" + learner + \".py -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n System.out.println(predictTest_command);\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }if(learner.equals(\"SBBJ\")){ // JAVA\n String predictTrain_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }\n \n }\n }\n }\n }\n }\n }", "private void evaluateData () {\n long rows = DatabaseUtils.longForQuery(sqliteDBHelper.openSqlDatabaseReadable(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME, null);\r\n // calculate the amount of tasks (thread) depending on the MaxBatchSize\r\n tasks = rows >= MaxBatchSize? (int)(rows/MaxBatchSize + 1):1;\r\n // set the amount of finished tasks to 0\r\n finished = 0;\r\n // send the amount of task to the main activity so it can be displayed in the progress dialog\r\n sendTaskAmount(tasks + 1);\r\n // create a thread pool with tasks amount of threads\r\n final ExecutorService executorService = Executors.newFixedThreadPool(tasks);\r\n // create a list which holds all the tasks to be executed\r\n final List<ProcessingDataHandler> taskList = new LinkedList<>();\r\n // for each task create a batch of MaxBatchSize rows to evaluate\r\n for (int i = 0; i < tasks; i++) {\r\n // pass the offset (where to start) and the limit (how many rows)\r\n taskList.add(new ProcessingDataHandler(i*MaxBatchSize, MaxBatchSize));\r\n }\r\n // invoke all the task at once\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n executorService.invokeAll(taskList);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }).start();\r\n\r\n updateProgressDialog();\r\n }", "public void dataChanged() {\n // get latest data\n runs = getLatestRuns();\n wickets = getLatestWickets();\n overs = getLatestOvers();\n\n currentScoreDisplay.update(runs, wickets, overs);\n averageScoreDisplay.update(runs, wickets, overs);\n }", "public static void main(String args[]) throws Exception {\n\t\t createFile();\n\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat. (Sandbox)\");\n\t\t return;\n\t\t }\n\n\t\t // open the file with read and write access\n\t\t ///FileFormat testFile = fileFormat.open(fname, FileFormat.WRITE);\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tFileFormat testFile = fileFormat.open(fname, FileFormat.WRITE);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to open file: \" + fname);\n\t\t return; \n\t\t }\n\n\t\t // open the file and retrieve the file structure\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // retrieve athe dataset \"2D 32-bit integer 20x10\"\n\t\t Dataset dataset = (Dataset) root.getMemberList().get(0);\n\t\t dataset.hasAttribute();\n\t\t int[] dataRead = (int[]) dataset.read();\n\n\t\t // print out the data values\n\t\t System.out.println(\"\\n\\nOriginal Data Values\");\n\t\t for (int i = 0; i < 20; i++) {\n\t\t System.out.print(\"\\n\" + dataRead[i * 10]);\n\t\t for (int j = 1; j < 10; j++) {\n\t\t System.out.print(\", \" + dataRead[i * 10 + j]);\n\t\t }\n\t\t }\n\n\t\t // change data value and write it to file.\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataRead[i * 10 + j]++;\n\t\t }\n\t\t }\n\t\t dataset.write(dataRead);\n\n\t\t // clearn and reload the data value\n\t\t int[] dataModified = (int[]) dataset.read();\n\n\t\t // print out the modified data values\n\t\t System.out.println(\"\\n\\nModified Data Values\");\n\t\t for (int i = 0; i < 20; i++) {\n\t\t System.out.print(\"\\n\" + dataModified[i * 10]);\n\t\t for (int j = 1; j < 10; j++) {\n\t\t System.out.print(\", \" + dataModified[i * 10 + j]);\n\t\t }\n\t\t }\n\n\t\t // close file resource\n\t\t testFile.close();\n\t\t }", "public static void main(String[] args) {\n\t\tint timeJump = 500;\n\t\tUser[] users = Snippet.DBBuilderUsers();\n\t\tUser agent = users[0];\n\t\tAuction a = new Auction();\n\t\tTime t = new Time();\n\t\tdouble reward = 0;\n\t\tdouble lastTenReward = 0;\n\t\tList<Double> rewards = new ArrayList<Double>();\n\t\tList<Double> trends = new ArrayList<Double>();\n\t\tString fileName = \"Avg_Performance (Value Iteration) (0.001, 0.9).xls\";\n\t\tint data = 1000;\n\t\tProbabilityDatabase DB = new ProbabilityDatabase(500);\n\t\tValueIteration DPAgent = new ValueIteration(0.001, 0.9);\n\t\t\n\t\tDB.generateDatabase(users);\n\t\tSystem.out.println(\"Probability Database Generated\");\n\t\tDPAgent.evaluateState(users, DB);\n\t\tSystem.out.println(\"State Evaluated\");\n\t\tfor (int row = 0; row < data; row++) {\n\t\t\trewards = new ArrayList<Double>();\n\t\t\ttrends = new ArrayList<Double>();\n\t\t\treward = 0;\n\t\t\tlastTenReward = 0;\n\t\t\tt = new Time();\n\t\t\tusers = Snippet.DBBuilderUsers();\n\t\t\tfor (int i = 0; i < users.length; i++) {\n\t\t\t\tif (users[i].getStrategy() == 6) {\n\t\t\t\t\tagent = users[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < timeJump; i++) {\n\t\t\t\tt.advanceTime();\n\t\t\t\tSnippet.startOfDay(users, t);\n\t\t\t\ta.runDPAuction(users, t, DB, DPAgent);\n\t\t\t\tSnippet.endOfDay(users, t);\n\t\t\t\treward = agent.getPerformance().normalizedScore();\n\t\t\t\trewards.add(reward);\n\t\t\t\t\n\t\t\t\tlastTenReward = 0;\n\t\t\t\tif (t.getDay() > 6) {\n\t\t\t\t\tfor (int j = 1; j < 8; j++) {\n\t\t\t\t\t\tlastTenReward += rewards.get(rewards.size() - j);\n\t\t\t\t\t}\n\t\t\t\t\trewards.remove(0);\n\t\t\t\t\ttrends.add(lastTenReward/7);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t // Assume default encoding.\n\t FileWriter fileWriter =\n\t new FileWriter(fileName, true);\n\n\t // Always wrap FileWriter in BufferedWriter.\n\t BufferedWriter bufferedWriter =\n\t new BufferedWriter(fileWriter);\n\n\t // Note that write() does not automatically\n\t // append a newline character.\n\t \n\t for (Double temp : trends) {\n\t \tbufferedWriter.write(temp + \"\\t\");\n\t\t\t\t}\n\t bufferedWriter.write(\"\\n\");\n\t // Always close files.\n\t bufferedWriter.close();\n\t } catch(IOException ex) {}\n\t\t}\n\t}", "public void updateData() {\n\n ProgramWorker pw = new ProgramWorker();\n pw.execute();\n\n }", "private void initDataset() {\r\n CollGestDBHelper collGestDBHelper = new CollGestDBHelper(activityContext);\r\n List<CollGestItem> listAllItems = collGestDBHelper.getAllGestItem();\r\n\r\n mDataset = new String[listAllItems.size()][7];\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n System.out.println(listAllItems.size());\r\n System.out.println(listAllItems.toString());\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n for (int i = 0; i < listAllItems.size(); i++) {\r\n mDataset[i][0] = listAllItems.get(i).getItemName();\r\n mDataset[i][1] = Integer.toString(listAllItems.get(i).getItemMinJoueurs());\r\n mDataset[i][2] = Integer.toString(listAllItems.get(i).getItemMaxJoueurs());\r\n mDataset[i][3] = Integer.toString(listAllItems.get(i).getItemDuration());\r\n mDataset[i][4] = listAllItems.get(i).getItemTypes();\r\n mDataset[i][5] = listAllItems.get(i).getItemCheckedOut();\r\n mDataset[i][6] = listAllItems.get(i).getItemLastPlayed();\r\n }\r\n System.out.println(mDataset);\r\n }", "public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }", "public void experimentAndPlotter(){\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 1\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 1.);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory qLearningFactory2 = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 0.5\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 0.5);\n\t\t\t}\n\t\t};\n\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\tenv, 10, 50, qLearningFactory, qLearningFactory2);\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOST_RECENT_AND_AVERAGE,\n\t\t\t\tPerformanceMetric.STEPS_PER_EPISODE,\n\t\t\t\tPerformanceMetric.AVERAGE_EPISODE_REWARD);\n\n\t\texp.startExperiment();\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}", "private void DataCreator() {\n\t\t// Creation of employees\n\t\tEmployee emp1 = new Employee(\"Akos\", \"Toth\", true);\n\t\tEmployee emp2 = new Employee(\"Gabor\", \"Kovacs\", true);\n\t\tEmployee emp3 = new Employee(\"Adam\", \"Ciceri\", true);\n\n\t\tempRep.save(emp1);\n\t\tempRep.save(emp2);\n\t\tempRep.save(emp3);\n\t\tLOGGER.info(\"TEST DATA: Employees saved!\");\n\n\t\t// creation of tasks\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\n\t\ttry {\n\t\t\tTaskStates task1State = new TaskStates(\"CLOSED\");\n\t\t\tProjectTask task1 = new ProjectTask(\n\t\t\t\t\t\"Modelling of system\",\n\t\t\t\t\t\"Engineering Systems Analyst\",\n\t\t\t\t\t\"Engineering Systems Analyst Dorking Surrey Salary ****K Our client is located in Dorking, Surrey and are looking for Engineering Systems Analyst our client provides specialist software development Keywords Mathematical Modelling, Risk Analysis, System Modelling, Optimisation, MISER, PIONEEER Engineering Systems Analyst Dorking Surrey Salary ****K\",\n\t\t\t\t\ttask1State,\n\t\t\t\t\tsdf.parse(\"20-01-2015\"),\n\t\t\t\t\tsdf.parse(\"25-01-2015\"),\n\t\t\t\t\t0.9);\n\t\t\tTaskStates task2State = new TaskStates(\"OPEN\");\n\t\t\tProjectTask task2 = new ProjectTask(\n\t\t\t\t\t\"Material performance design\",\n\t\t\t\t\t\"Stress Engineer Glasgow\",\n\t\t\t\t\t\"Stress Engineer Glasgow Salary **** to **** We re currently looking for talented engineers to join our growing Glasgow team at a variety of levels. The roles are ideally suited to high calibre engineering graduates with any level of appropriate experience, so that we can give you the opportunity to use your technical skills to provide high quality input to our aerospace projects, spanning both aerostructures and aeroengines. In return, you can expect good career opportunities and the chance for advancement and personal and professional development, support while you gain Chartership and some opportunities to possibly travel or work in other offices, in or outside of the UK. The Requirements You will need to have a good engineering degree that includes structural analysis (such as aeronautical, mechanical, automotive, civil) with some experience in a professional engineering environment relevant to (but not limited to) the aerospace sector. You will need to demonstrate experience in at least one or more of the following areas: Structural/stress analysis Composite stress analysis (any industry) Linear and nonlinear finite element analysis Fatigue and damage tolerance Structural dynamics Thermal analysis Aerostructures experience You will also be expected to demonstrate the following qualities: A strong desire to progress quickly to a position of leadership Professional approach Strong communication skills, written and verbal Commercial awareness Team working, being comfortable working in international teams and self managing PLEASE NOTE SECURITY CLEARANCE IS REQUIRED FOR THIS ROLE Stress Engineer Glasgow Salary **** to ****\",\n\t\t\t\t\ttask2State,\n\t\t\t\t\tsdf.parse(\"20-06-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\t\t\tTaskStates task3State = new TaskStates(\"IN_PROGRESS\");\n\t\t\tProjectTask task3 = new ProjectTask(\n\t\t\t\t\t\"Implementation embedded system\",\n\t\t\t\t\t\"CNC Programmer\",\n\t\t\t\t\t\"Working within a small but busy sub contract ISO accredited sub contract machine shop. Must be able to programme straight from drawings programming and operating a Bridgeport VMC or a Haas VMC with Heidenhain controls. Machining 1 off,s to small batch work. Hours of work are Mon Thurs 8am 5.00pm and 3.00pm finish on a Friday\",\n\t\t\t\t\ttask3State,\n\t\t\t\t\tsdf.parse(\"20-03-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\n\t\t\ttaskStatesRep.save(task1State);\n\t\t\ttaskStatesRep.save(task2State);\n\t\t\ttaskStatesRep.save(task3State);\n\t\t\t\n\t\t\tprjTaskRep.save(task1);\n\t\t\tprjTaskRep.save(task2);\n\t\t\tprjTaskRep.save(task3);\n\t\t\tLOGGER.info(\"TEST DATA: Tasks and task statuses saved!\");\n\t\t\t\n\t\t\t// creation of project\n\t\t\tProject prj1 = new Project(\"Building modernization\", sdf.parse(\"01-01-2015\"), sdf.parse(\"01-09-2015\"), 0.9, 0.1, true);\n\t\t\tTaskSet tskSet1 = prj1.assignTaskToEmployee(emp1, task1);\n\t\t\tTaskSet tskSet2 = prj1.assignTaskToEmployee(emp2, task2);\n\t\t\tTaskSet tskSet3 = prj1.assignTaskToEmployee(emp3, task3);\n\t\n\t\t\ttaskSetRep.save(tskSet1);\n\t\t\ttaskSetRep.save(tskSet2);\n\t\t\ttaskSetRep.save(tskSet3);\n\t\t\tLOGGER.info(\"TEST DATA: Task sets are saved!\");\n\t\n\t\t\tprjRep.save(prj1);\n\t\t\tLOGGER.info(\"TEST DATA: Projects are saved!\");\n\t\t\t\n\t\t\t//creation of Performance statistics\n\t\t\tPerfStat emp1PerfStat = new PerfStat(prj1, emp1, 10, 5, 0, 100);\n\t\t\tPerfStat emp2PerfStat = new PerfStat(prj1, emp2, 5, 15, 6, 170);\n\t\t\tPerfStat emp3PerfStat = new PerfStat(prj1, emp3, 0, 6, 3, 20);\n\t\t\t\n\t\t\tperfStatRep.save(emp1PerfStat);\n\t\t\tperfStatRep.save(emp2PerfStat);\n\t\t\tperfStatRep.save(emp3PerfStat);\n\t\t\tLOGGER.info(\"TEST DATA: Project and employee assignments are saved!\");\n\n\t\t\t\n\t\t\tLOGGER.info(\"TEST DATA: Upload of TEST employee, task and project data is FINISHED!\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void persistData(RatingData[] data) {\n //start by setting long_comp_result\n //TODO: maybe remove old_rating / vol and move to the record creation?\n String sqlStr = \"update long_comp_result set rated_ind = 1, \" +\n \"old_rating = (select rating from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"old_vol = (select vol from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"new_rating = ?, \" +\n \"new_vol = ? \" +\n \"where round_id = ? and coder_id = ?\";\n PreparedStatement psUpdate = null;\n PreparedStatement psInsert = null;\n \n try {\n psUpdate = conn.prepareStatement(sqlStr);\n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n psUpdate.executeUpdate();\n }\n \n psUpdate.close();\n //update algo_rating\n String updateSql = \"update algo_rating set rating = ?, vol = ?,\" +\n \" round_id = ?, num_ratings = num_ratings + 1 \" +\n \"where coder_id = ? and algo_rating_type_id = 3\";\n \n psUpdate = conn.prepareStatement(updateSql);\n \n String insertSql = \"insert into algo_rating (rating, vol, round_id, coder_id, algo_rating_type_id, num_ratings) \" +\n \"values (?,?,?,?,3,1)\";\n \n psInsert = conn.prepareStatement(insertSql);\n \n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n if(psUpdate.executeUpdate() == 0) {\n psInsert.clearParameters();\n psInsert.setInt(1, data[i].getRating());\n psInsert.setInt(2, data[i].getVolatility());\n psInsert.setInt(3, roundId);\n psInsert.setInt(4, data[i].getCoderID());\n psInsert.executeUpdate();\n }\n }\n \n psUpdate.close();\n psInsert.close();\n \n //mark the round as rated\n psUpdate = conn.prepareStatement(\"update round set rated_ind = 1 where round_id = ?\");\n psUpdate.setInt(1, roundId);\n psUpdate.executeUpdate();\n \n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n DBMS.close(psUpdate);\n DBMS.close(psInsert);\n }\n }", "public boolean evaluateDataClientHeavy() {\n // reset labels\n resetLabels();\n // get IDs of players\n // create one map with playerName and playerID\n // create one map with playerID and the count how often this player participates in this game\n List<Map<String, Object>> returnList;\n Map<String, Integer> mapNameToID = new HashMap<>();\n HashMap<Integer, Integer> mapIDToCount = new HashMap<>();\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n for (String playerName : playerNameList) {\n returnList = dbAccess.selectSQL(\"SELECT players.id FROM players WHERE players.name = '\" + playerName + \"';\");\n if (returnList == null || returnList.isEmpty()) {\n showAlertDBError();\n return false;\n } else {\n int playerID = (int) returnList.get(0).get(\"id\");\n if (!mapNameToID.containsKey(playerName)) {\n mapNameToID.put(playerName, playerID);\n }\n if (!mapIDToCount.containsKey(playerID)) {\n mapIDToCount.put(playerID, 1);\n } else {\n mapIDToCount.put(playerID, mapIDToCount.get(playerID) + 1);\n }\n }\n }\n\n // get all games and all participants from DB\n List<Map<String, Object>> dbGames = dbAccess.selectSQL(\"SELECT * FROM games;\");\n List<Map<String, Object>> dbParticipants = dbAccess.selectSQL(\"SELECT * FROM participants;\");\n if (dbGames == null || dbParticipants == null) {\n showAlertDBError();\n return false;\n }\n dbAccess.closeConn();\n\n // create winners map\n // holds gameID and ID of winning participant, if game has no winner participantID is -1\n HashMap<Integer, Integer> mapGameIDToWinnerID = new HashMap<>();\n\n // iterate all games\n for (Map<String, Object> rowGames : dbGames) {\n boolean dumpGame = false;\n int gameId = (int) rowGames.get(\"id\");\n String endTime = null;\n if (rowGames.get(\"end_time\") != null)\n endTime = rowGames.get(\"end_time\").toString();\n boolean isAIOnly = (boolean) rowGames.get(\"ai_only\");\n // get deepCopy of mapIDToCount\n Map<Integer, Integer> idToCountCopy = copyHashMapIntInt(mapIDToCount);\n // check if game was aborted preemptively\n if (endTime == null)\n continue;\n int winner = -1;\n\n //iterate all participants\n for (Map<String, Object> rowParticipants : dbParticipants) {\n // check if game.id matches participants.game\n if (gameId == (int) rowParticipants.get(\"game\")) {\n // get participants.id\n int playerID = (int) rowParticipants.get(\"player\");\n // check if participant is in the map of participants, if not skip to next game (break)\n if (idToCountCopy.containsKey(playerID)) {\n // check if the count in this map is higher than 0, if not skip to next game (break)\n if (idToCountCopy.get(playerID) > 0) {\n // lower value of count in map of participants for this participant\n idToCountCopy.put(playerID, idToCountCopy.get(playerID) - 1);\n // if this participant is winner - store it temporarily\n if (rowParticipants.get(\"winner\") != null) {\n winner = playerID;\n }\n } else {\n dumpGame = true;\n break;\n }\n } else {\n dumpGame = true;\n break;\n }\n }\n }\n // check if every value in idToCountCopy is 0\n // if yes -> save game and winner in winners map\n // if not -> dump game\n for (Map.Entry<Integer, Integer> entry : idToCountCopy.entrySet()) {\n if (entry.getValue() != 0) {\n dumpGame = true;\n }\n }\n if (dumpGame == false) {\n mapGameIDToWinnerID.put(gameId, winner);\n }\n }\n\n // check if any games with this constellation of players was played\n if (mapGameIDToWinnerID.isEmpty()) {\n resetPieChart();\n resetLabels();\n showAlertSelectionFail(\"Selection error\", \"No games with this constellation were found.\");\n return false;\n }\n\n // calculate average turns until winner is determined\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n Integer turnSum = 0;\n Integer gameCounter = 0;\n int averageTurns = 0;\n for (Map.Entry<Integer, Integer> entry : mapGameIDToWinnerID.entrySet()) {\n // check if game has winner\n if (entry.getValue() != -1) {\n // get number of turns for this game\n List<Map<String, Object>> resultList = dbAccess.selectSQL(\"SELECT MAX(turn) FROM moves WHERE game = \" + entry.getKey() + \";\");\n if (resultList == null || resultList.isEmpty()) {\n showAlertDBError();\n return false;\n } else {\n turnSum += (int) resultList.get(0).get(\"MAX(turn)\");\n gameCounter++;\n }\n }\n }\n\n // calculate average turns\n String strAverageTurns = \"\";\n if (gameCounter > 0) {\n averageTurns = Math.round(turnSum / gameCounter);\n }\n strAverageTurns = String.valueOf(averageTurns);\n dbAccess.closeConn();\n\n // now process mapGameIDToWinnerID to pieChart and labels\n Map<String, Integer> mapNameToWins = new HashMap<>();\n // iterate over GameID-WinnerID map and count wins for each player\n int endlessGames = 0;\n for (Map.Entry<Integer, Integer> entryWins : mapGameIDToWinnerID.entrySet()) {\n if (entryWins.getValue() == -1)\n endlessGames++;\n for (Map.Entry<String, Integer> entryName : mapNameToID.entrySet()) {\n if (entryName.getValue() == entryWins.getValue()) {\n if (!mapNameToWins.containsKey(entryName.getKey())) {\n mapNameToWins.put(entryName.getKey(), 1);\n } else {\n mapNameToWins.put(entryName.getKey(), mapNameToWins.get(entryName.getKey()) + 1);\n }\n }\n }\n }\n // add players without wins to the map\n for (Map.Entry<String, Integer> entry : mapNameToID.entrySet()) {\n if (!mapNameToWins.containsKey(entry.getKey()))\n mapNameToWins.put(entry.getKey(), 0);\n }\n\n // fill labels with numbers\n lblTotalGames.setText(String.valueOf(mapGameIDToWinnerID.size()));\n lblGamesWithoutWinner.setText(String.valueOf(endlessGames));\n if (averageTurns == 0) {\n lblAverageTurns.setText(\"Not available\");\n } else {\n lblAverageTurns.setText(strAverageTurns);\n }\n int labelCounter = 1;\n for (Map.Entry<String, Integer> entry : mapNameToWins.entrySet()) {\n vBoxDesc.getChildren().add(labelCounter, new Label(entry.getKey() + \":\"));\n vBoxNumbers.getChildren().add(labelCounter, new Label(String.valueOf(entry.getValue()) + \" wins\"));\n }\n\n // fill pieChart\n pieChartData = FXCollections.observableArrayList();\n for (Map.Entry<String, Integer> entry : mapNameToWins.entrySet()) {\n pieChartData.add(new PieChart.Data(entry.getKey(), entry.getValue()));\n }\n if (endlessGames > 0) {\n pieChartData.add(new PieChart.Data(\"No winner\", endlessGames));\n }\n chart.setData(pieChartData);\n chart.setTitle(\"Winners by percentage\");\n\n lblCaption.setTextFill(Color.web(\"#404040\", 1.0));\n lblCaption.setStyle(\"-fx-font: 24 arial;\");\n\n // set percentages\n for (PieChart.Data data : chart.getData()) {\n data.getNode().addEventHandler(MouseEvent.MOUSE_PRESSED,\n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent e) {\n lblCaption.setTranslateX(e.getSceneX());\n lblCaption.setTranslateY(e.getSceneY());\n double percentage = (data.getPieValue() * 100) / Integer.valueOf(mapGameIDToWinnerID.size()).doubleValue();\n String strPercentage = formatDec(percentage);\n lblCaption.setText(String.valueOf(strPercentage + \"%\"));\n }\n });\n }\n // add pieChart and caption\n if (!diagramBox.getChildren().contains(chart))\n diagramBox.getChildren().add(chart);\n if (!root.getChildren().contains(lblCaption))\n root.getChildren().add(lblCaption);\n return true;\n }", "private void initData(IInternalContest contest, int numTeams, int numProblems) {\n\n // Add accounts\n contest.generateNewAccounts(ClientType.Type.TEAM.toString(), numTeams, true);\n contest.generateNewAccounts(ClientType.Type.JUDGE.toString(), 6, true);\n \n // Add scoreboard account and set the scoreboard account for this client (in contest)\n contest.setClientId(createBoardAccount (contest));\n \n checkForJudgeAndTeam(contest);\n \n // Add Problem\n for (int i = 0; i < numProblems; i ++){\n char letter = 'A';\n letter += i;\n Problem problem = new Problem(\"\"+letter);\n contest.addProblem(problem);\n }\n\n // Add Language\n Language language = new Language(\"Java\");\n contest.addLanguage(language);\n\n String[] judgementNames = { \"Yes\", \"No - incorrect output\", \"No - compilation error\", \"Contact staff\", \"No - Security Violation\" };\n \n String[] acronyms = { \"AC\", \"WA\", \"CE\", \"WA\", \"SV\" };\n\n for (int i = 0; i < judgementNames.length; i++) {\n Judgement judgement = new Judgement(judgementNames[i], acronyms[i]);\n contest.addJudgement(judgement);\n }\n }", "private void prepareDataAnimation() {\n for (SliceValue value : pieChartData.getValues()) {\n value.setTarget((float) Math.random() * 30 + 15);//更新数据\n }\n detailLineChart.startDataAnimation();\n }", "private static void loadDiscoveryDataFromProtexServer(\r\n\t\t\tProjectDiscoveryController pProjectDiscoveryController, \r\n\t\t\tUIResponseObserver observer) {\n\t\tString projectName = pProjectDiscoveryController.getProjectName();\r\n\t\tIdentificationDBManager.init(projectName);\r\n\t\tReportAPIWrapper.discardAllDataForProject(projectName);\r\n\t\t\r\n\t\tlog.debug(\"@@@ table generation start (loading from Protex Server- \"+new java.util.Date());\r\n\t\t\r\n\t\tobserver.setMessageHeader(\"Update Identification Table from Protex Server...\\n\");\r\n\t\tobserver.pushMessageWithHeader(\" > Generating Match Table from Protex Server.\\n\");\r\n\t\tlog.debug(\" > Generating Match Table.\");\r\n\t\t\r\n\t\tReportEntityList identifiedFiles = ReportAPIWrapper.getIdentifiedFiles(projectName, new DefaultUIResponseObserver(), true);\r\n\t\tReportEntityList stringSearch = ReportAPIWrapper.getStringSearches(projectName, new DefaultUIResponseObserver(), true);\r\n\t\tReportEntityList compareCodeMatches = ReportAPIWrapper.getCompareCodeMatches(projectName,observer, true);\r\n//\t\tReportEntityList codeMatchesPrecision = ReportAPIWrapper.getCodeMatchesPrecision(projectName,observer, true);\r\n\t\tReportEntityList codeMatchesPrecision = ReportAPIWrapper.precessCodeMatchesPrecision(projectName,observer, true);\r\n\t\tReportEntityList patternMatchesPendingFiles = ReportAPIWrapper.getPatternMatchesPendingFiles(projectName, new DefaultUIResponseObserver(), true);\r\n\t\t\r\n\t\tArrayList<DiscoveryControllerLoaderThread> discoveryDataLoader = new ArrayList<DiscoveryControllerLoaderThread>();\r\n\t\t\r\n\t\tdiscoveryDataLoader.add(\r\n\t\t\t\tnew StringSearchDiscoveryControllerLoaderThread(\r\n\t\t\t\t\t\tpProjectDiscoveryController,\r\n\t\t\t\t\t\tobserver,\r\n\t\t\t\t\t\tidentifiedFiles, \r\n\t\t\t\t\t\tstringSearch,\r\n\t\t\t\t\t\tcompareCodeMatches,\r\n\t\t\t\t\t\tcodeMatchesPrecision,\r\n\t\t\t\t\t\tpatternMatchesPendingFiles\r\n\t\t\t\t\t\t));\r\n\t\t\r\n\t\tdiscoveryDataLoader.add(\r\n\t\t\t\tnew CodeMatchDiscoveryControllerLoaderThread(\r\n\t\t\t\t\t\tpProjectDiscoveryController,\r\n\t\t\t\t\t\tobserver,\r\n\t\t\t\t\t\tidentifiedFiles, \r\n\t\t\t\t\t\tstringSearch,\r\n\t\t\t\t\t\tcompareCodeMatches,\r\n\t\t\t\t\t\tcodeMatchesPrecision,\r\n\t\t\t\t\t\tpatternMatchesPendingFiles\r\n\t\t\t\t\t\t));\r\n\t\t\r\n\t\tdiscoveryDataLoader.add(\r\n\t\t\t\tnew PatternMatchDiscoveryControllerLoaderThread(\r\n\t\t\t\t\t\tpProjectDiscoveryController,\r\n\t\t\t\t\t\tobserver,\r\n\t\t\t\t\t\tidentifiedFiles, \r\n\t\t\t\t\t\tstringSearch,\r\n\t\t\t\t\t\tcompareCodeMatches,\r\n\t\t\t\t\t\tcodeMatchesPrecision,\r\n\t\t\t\t\t\tpatternMatchesPendingFiles\r\n\t\t\t\t\t\t));\t\t\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// starting loaders\r\n\t\t\tfor(int i=0; i<discoveryDataLoader.size(); i++) {\r\n\t\t\t\tdiscoveryDataLoader.get(i).start();\r\n\t\t\t}\r\n\t\t\t// waiting for finishing loaders.\r\n\t\t\tfor(int i=0; i<discoveryDataLoader.size(); i++) {\r\n\t\t\t\tlog.debug(\"@@@ DiscoveryControllerThread joining : \" + discoveryDataLoader.get(i).getClass().getName());\r\n\t\t\t\tdiscoveryDataLoader.get(i).join();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.warn(e);\r\n\t\t}\r\n\t\tlog.debug(\"@@@ table generate end - \"+new java.util.Date());\r\n\t}", "private void prepareDatabaseStats(Player player) {\n this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {\n synchronized (this.statsController) {\n if (this.statsController.getByPlayer(player) == null) {\n PlayerMeta meta;\n if ((meta = this.playerMetaController.getByUUID(player.getUniqueId())) == null) {\n meta = this.playerMetaController.create(player);\n this.playerMetaController.store(meta);\n }\n final Stats stats = this.statsController.create();\n stats.setPlayerId(meta.getId());\n this.statsController.store(stats);\n }\n }\n });\n }", "public static ArrayList<ArrayList<ArrayList<Double>>> assignScoreToQueries() {\r\n\t\t\r\n\t\tArrayList<ArrayList<ArrayList<Double>>> allQueries = Queries.createQueries();\r\n\t\tArrayList<ArrayList<String>> dataset = ReadInDataset.finalDataset;\r\n\t\tint Counter = 0;\r\n\t\tDouble Score = 0.0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\r\n\t\tdf.setRoundingMode(RoundingMode.CEILING); // round up to 4 decimal places\r\n\t\t\r\n\t\t\r\n\t\t// initially assign to each query a score of 0\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) {\r\n\t\t\tArrayList<Double> zero = new ArrayList<Double>();\r\n\t\t\tzero.add(0.0);\r\n\t\t\tallQueries.get(i).add(zero);}\r\n\t\t\r\n\t\t// go through each query and check how many entries of the dataset it matches\r\n\t\t// with each match increase the score\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) { // for each query\r\n\t\t\tfor(int b=0; b < dataset.size(); b++) { // for each dataset\r\n\t\t\t\tCounter = 0; \r\n\t\t\t\tfor (int a=0; a < allQueries.get(i).size()-1; a++) { // for each query clause\r\n\t\t\t\t//check if the query criteria match the dataset and increase the Score accordingly\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //this counter ensures that all query requirements are met in order to increase the score\r\n\t\t\t\t\tif (a != allQueries.get(i).size() - 1) {\t\t\t\t\t\t // ensure that Score entry is not involved in Query Matching\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// take min and max from query along with an entry from the dataset, convert to a double of 4 decimal places\r\n\t\t\t\t\t\tdouble minPoint1 = allQueries.get(i).get(a).get(0);\r\n\t\t\t\t\t\tString minPoint2 = df.format(minPoint1);\r\n\t\t\t\t\t\tdouble minPoint = Double.parseDouble(minPoint2);\r\n\t\t\t\t\t\tdouble maxPoint1 = allQueries.get(i).get(a).get(1);\r\n\t\t\t\t\t\tString maxPoint2 = df.format(maxPoint1);\r\n\t\t\t\t\t\tdouble maxPoint = Double.parseDouble(maxPoint2);\r\n\t\t\t\t\t\tdouble dataPoint1 = Double.parseDouble(dataset.get(b).get(a+1));\r\n\t\t\t\t\t\tString dataPoint2 = df.format(dataPoint1);\r\n\t\t\t\t\t\tdouble dataPoint = Double.parseDouble(dataPoint2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( dataPoint<= maxPoint && dataPoint >= minPoint) { Counter++; \r\n\t\t\t\t\t//\tSystem.out.println(\"min:\" + minPoint+\" max: \"+maxPoint+\" data: \"+dataPoint+ \" of Query: \" + b+ \"| Query Match!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {//System.out.println(minPoint+\" \"+maxPoint+\" \"+dataPoint+ \" of \" + b);\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\tif (Counter==(Queries.getDimensions())/2) { // if counter equals the dimensions of the query then increase score\r\n\t\t\t\t\tScore = allQueries.get(i).get(allQueries.get(i).size()-1).get(0);\r\n\t\t\t\t\tallQueries.get(i).get(allQueries.get(i).size()-1).set(0, Score+1.00); \r\n\t\t\t\t\t}}\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t//\tSystem.out.println(\"Score = \" + allQueries.get(i).get(allQueries.get(i).size()-1).get(0));\r\n\t\t}\t\r\n\t\treturn allQueries;\r\n\t}", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n gameData.setDayEastCounter((long)dataSnapshot.child(\"East\").child(\"Day\").child(\"Donations\").getValue());\n gameData.setDayNorthCounter((long)dataSnapshot.child(\"North\").child(\"Day\").child(\"Donations\").getValue());\n gameData.setDaySouthCounter((long)dataSnapshot.child(\"South\").child(\"Day\").child(\"Donations\").getValue());\n gameData.setDayWestCounter((long)dataSnapshot.child(\"West\").child(\"Day\").child(\"Donations\").getValue());\n\n gameData.setNightEastCounter((long)dataSnapshot.child(\"East\").child(\"Night\").child(\"Donations\").getValue());\n gameData.setNightNorthCounter((long)dataSnapshot.child(\"North\").child(\"Night\").child(\"Donations\").getValue());\n gameData.setNightSouthCounter((long)dataSnapshot.child(\"South\").child(\"Night\").child(\"Donations\").getValue());\n gameData.setNightWestCounter((long)dataSnapshot.child(\"West\").child(\"Night\").child(\"Donations\").getValue());\n\n //read donations per all area\n gameData.setEastTotal((long)dataSnapshot.child(\"East\").child(\"Donations\").getValue());\n gameData.setNorthTotal((long)dataSnapshot.child(\"North\").child(\"Donations\").getValue());\n gameData.setSouthTotal((long)dataSnapshot.child(\"South\").child(\"Donations\").getValue());\n gameData.setWestTotal((long)dataSnapshot.child(\"West\").child(\"Donations\").getValue());\n\n Log.d(\"GAME4\", \"done importing game stats update\" );\n\n gameData.computeGameStats();\n Log.d(\"GAME4\", \"done computing stats from updated data\");\n }", "public Input readData() {\n JSONParser jsonParser = new JSONParser();\n List<Consumer> consumers = new ArrayList<>();\n List<Distributor> distributors = new ArrayList<>();\n List<Producer> producers = new ArrayList<>();\n List<MonthlyUpdates> monthlyUpdates = new ArrayList<>();\n long numberOfTurns;\n\n try {\n // Parsing the contents of the JSON file\n JSONObject jsonObject = (JSONObject) jsonParser.parse(new FileReader(inputPath));\n numberOfTurns = (long) (jsonObject.get(\"numberOfTurns\"));\n JSONObject initialData = (JSONObject) jsonObject.get(\"initialData\");\n JSONArray jsonConsumers = (JSONArray) initialData.get(\"consumers\");\n JSONArray jsonDistributors = (JSONArray) initialData.get(\"distributors\");\n JSONArray jsonProducers = (JSONArray) initialData.get(\"producers\");\n\n if (jsonConsumers != null) {\n ConsumerFactory consumerFactory = ConsumerFactory.getInstance();\n for (Object jsonConsumer : jsonConsumers) {\n consumers.add(consumerFactory.createConsumer(\n (long) ((JSONObject) jsonConsumer).get(\"id\"),\n (long) ((JSONObject) jsonConsumer).get(\"initialBudget\"),\n (long) ((JSONObject) jsonConsumer).get(\"monthlyIncome\")));\n }\n }\n\n if (jsonDistributors != null) {\n DistributorFactory distributorFactory = DistributorFactory.getInstance();\n for (Object jsonDistributor : jsonDistributors) {\n distributors.add(distributorFactory.createDistributor(\n (long) ((JSONObject) jsonDistributor).get(\"id\"),\n (long) ((JSONObject) jsonDistributor).get(\"contractLength\"),\n (long) ((JSONObject) jsonDistributor).get(\"initialBudget\"),\n (long) ((JSONObject) jsonDistributor).get(\"initialInfrastructureCost\"),\n (long) ((JSONObject) jsonDistributor).get(\"energyNeededKW\"),\n EnergyChoiceStrategyType.valueOf(((JSONObject) jsonDistributor).\n get(\"producerStrategy\").toString())));\n }\n }\n\n if (jsonProducers != null) {\n for (Object jsonProducer : jsonProducers) {\n producers.add(new Producer(((long) ((JSONObject) jsonProducer).get(\"id\")),\n EnergyType.valueOf(((JSONObject) jsonProducer).\n get(\"energyType\").toString()),\n (long) ((JSONObject) jsonProducer).get(\"maxDistributors\"),\n (double) ((JSONObject) jsonProducer).get(\"priceKW\"),\n (long) ((JSONObject) jsonProducer).get(\"energyPerDistributor\")));\n }\n }\n\n JSONArray jsonUpdates = (JSONArray) jsonObject.get(\"monthlyUpdates\");\n\n for (JSONObject monthlyUpdate : (Iterable<JSONObject>) jsonUpdates) {\n MonthlyUpdates update = new MonthlyUpdates();\n JSONArray newConsumers = (JSONArray) monthlyUpdate.get(\"newConsumers\");\n for (JSONObject newConsumer : (Iterable<JSONObject>) newConsumers) {\n update.getNewConsumers().add(new Consumer(Long.parseLong(newConsumer.get(\"id\").\n toString()),\n Long.parseLong(newConsumer.get(\"initialBudget\").toString()),\n Long.parseLong(newConsumer.get(\"monthlyIncome\").toString())));\n }\n org.json.simple.JSONArray costsChanges = (JSONArray) monthlyUpdate.\n get(\"distributorChanges\");\n for (JSONObject costsChange : (Iterable<JSONObject>) costsChanges) {\n update.getCostsChanges().add(new CostsChanges(Long.parseLong(costsChange.\n get(\"id\").toString()),\n Long.parseLong(costsChange.get(\"infrastructureCost\").toString())));\n }\n monthlyUpdates.add(update);\n }\n return new Input(numberOfTurns, consumers, distributors, producers, monthlyUpdates);\n\n } catch (ParseException | IOException e) {\n e.printStackTrace();\n }\n\n return new Input(0, consumers, distributors, producers, monthlyUpdates);\n\n }", "public void run() {\n\n long startTime = System.nanoTime();\n\n /*\"*********************************\n * Getting data from the algorithm *\n ***********************************/\n\n // Posterior values, get them from memory instead of propagating again. Since this method is called write,\n // it should only write.\n HashMap<Variable, TablePotential> results = algorithm.getLastPosteriorValues();\n\n // Samples\n double[][] sampleStorage;\n try {\n sampleStorage = algorithm.getSamples();\n if (sampleStorage.length == 0) { // Case of empty database\n throw new NullPointerException();\n }\n\n } catch (NullPointerException e) { // Case of empty database and no database\n logger.error(\"No samples found to write\");\n LocalizedException NoDatabaseException =\n new LocalizedException(new OpenMarkovException(\"Exception.NoDatabase\"), this.dialog);\n NoDatabaseException.showException();\n return;\n }\n\n // Variables\n List<Variable> sampledVariables = algorithm.getVariablesToSample();\n\n // The maximum number of states defines the number of columns of the second sheet in Excel.\n int maxNStates = 0;\n for (Variable variable : sampledVariables) {\n if (variable.getNumStates() > maxNStates) {\n maxNStates = variable.getNumStates();\n }\n }\n\n // Evidence variables\n EvidenceCase evidence = algorithm.getFusedEvidence();\n List<Variable> evidenceVariables = evidence.getVariables();\n\n // Time measuring for this phase\n long elapsedMS = (System.nanoTime() - startTime) / 1000000;\n logger.info(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"***********************\n * Creating the workbook *\n *************************/\n\n SXSSFWorkbook workbook = new SXSSFWorkbook(1000);\n\n /* Styles */\n\n // Styles to convey graphically the weight\n\n // Weight = 0\n XSSFCellStyle incompatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n incompatibleSample.setFillForegroundColor(new XSSFColor(INCOMPATIBLE_SAMPLE));\n incompatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n // Weight = 1\n XSSFCellStyle compatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n compatibleSample.setFillForegroundColor(new XSSFColor(COMPATIBLE_SAMPLE));\n compatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n\n /// Font with big emphasis for the next styles\n XSSFFont bigBoldArial = (XSSFFont) workbook.createFont();\n bigBoldArial.setFontName(\"Arial\");\n bigBoldArial.setFontHeightInPoints((short) 11);\n bigBoldArial.setBold(true);\n\n // Header of table\n XSSFCellStyle topTable = (XSSFCellStyle) workbook.createCellStyle();\n\n topTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR));\n topTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n topTable.setAlignment(HorizontalAlignment.LEFT);\n topTable.setFont(bigBoldArial);\n\n // Header of table centered\n XSSFCellStyle centeredTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n centeredTopTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR_2));\n centeredTopTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n centeredTopTable.setAlignment(HorizontalAlignment.CENTER);\n centeredTopTable.setFont(bigBoldArial);\n\n\n /// Font with some emphasis\n XSSFFont bigArial = (XSSFFont) workbook.createFont();\n bigArial.setFontName(\"Arial\");\n bigArial.setFontHeightInPoints((short) 10);\n bigArial.setBold(true);\n\n // Chance node\n XSSFCellStyle chanceNode = (XSSFCellStyle) workbook.createCellStyle();\n\n chanceNode.setFillForegroundColor(new XSSFColor(CHANCE_NODE_COLOR));\n chanceNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n chanceNode.setFont(bigArial);\n\n // Algorithm name\n XSSFCellStyle subTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n subTopTable.setFont(bigArial);\n\n\n /// Font with some emphasis and white for contrast\n XSSFFont bigWhiteArial = (XSSFFont) workbook.createFont();\n bigWhiteArial.setFontName(\"Arial\");\n bigWhiteArial.setFontHeightInPoints((short) 11);\n bigWhiteArial.setColor(new XSSFColor(new Color(255, 255, 255)));\n\n // Node with finding\n XSSFCellStyle findingNode = (XSSFCellStyle) workbook.createCellStyle();\n\n findingNode.setFillForegroundColor(new XSSFColor(FINDING_NODE_COLOR));\n findingNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n findingNode.setFont(bigWhiteArial);\n\n\n\n // No more than four decimal places\n XSSFCellStyle smartDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.0000\"));\n\n // No more than two decimal places\n XSSFCellStyle smartFewDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartFewDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.##\"));\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"******************\n * Sheet of samples *\n ********************/\n SXSSFSheet samples = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.Samples\"));\n\n /* Title row */\n Row titlesRow = samples.createRow(0);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.SampleN\"));\n for (int colNum = 1; colNum < sampledVariables.size() + 1; colNum++) { // Names of variables\n titlesRow.createCell(colNum).setCellValue(sampledVariables.get(colNum - 1).toString());\n }\n titlesRow.createCell(sampledVariables.size() + 1).setCellValue(dialog.stringDatabase.\n getString(\"ColumnTitles.Weight\"));\n\n // Apply header style\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(topTable);\n }\n\n // Auto-size columns of first sheet\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n samples.trackAllColumnsForAutoSizing();\n samples.autoSizeColumn(colNum);\n }\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /* Sample's rows */\n int rowNum;\n\n // Sample's loop\n for (rowNum = 1; rowNum < algorithm.getSampleSize() + 1; rowNum++) {\n\n Row sampleRow = samples.createRow(rowNum);\n sampleRow.createCell(0).setCellValue(rowNum);\n double weight = sampleStorage[rowNum - 1][sampledVariables.size()];\n for (int colNum = 1; colNum < sampledVariables.size() + 2; colNum++) { // Sampled states\n sampleRow.createCell(colNum).setCellValue(sampleStorage[rowNum - 1][colNum - 1]);\n if (weight == 0) {\n sampleRow.getCell(colNum).setCellStyle(incompatibleSample);\n } else {\n sampleRow.getCell(colNum).setCellStyle(compatibleSample);\n }\n }\n }\n\n\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"************************\n * Sheet of general stats *\n **************************/\n\n SXSSFSheet generalStats = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.GeneralStats\"));\n\n /* Rows of algorithm data */\n\n rowNum = 0;\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Algorithm\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.algorithmName);\n generalStats.getRow(rowNum).getCell(1).setCellStyle(subTopTable);\n\n rowNum++; // Row 1\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.TotalSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getSampleSize());\n\n rowNum++; // Row 2\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.RuntimePerSample\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime()/algorithm.getSampleSize());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartDecimals);\n\n rowNum++; // Row 3\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Runtime\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 4\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ValidSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getNumPositiveSamples());\n\n rowNum++; // Row 5\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.AccumulatedWeight\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getAccumulatedWeight());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 6\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ExactAlgorithmName\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.stringDatabase.getString(\"Algorithms.Hugin\"));\n\n // Empty row\n\n rowNum +=2; // rows written until now\n\n /* Row of titles */\n titlesRow = generalStats.createRow(rowNum);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.Variable\"));\n\n // Big long cell for state names\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n titlesRow.createCell(1).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.States\"));\n\n // Set header style\n for (int colNum = 0; colNum < 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(centeredTopTable);\n }\n\n // Empty row for clarity\n if (evidenceVariables.size() > 0) {\n rowNum++ ;\n }\n\n // Write about evidence variables that have not been sampled\n for (Variable evidenceVariable : evidenceVariables) {\n if (!sampledVariables.contains(evidenceVariable)) {\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(evidenceVariable.toString());\n variableName.setCellStyle(findingNode); // The color marks it as a finding\n\n // and then the names of their states\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(evidenceVariable.getStateName(colNum - 1));\n stateName.setCellStyle(findingNode);\n }\n\n /* Row of occurrences */\n // Write \"non-sampled\"\n Row occurrencesRow = generalStats.createRow(rowNum + 1);\n Cell nSamples = occurrencesRow.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n occurrencesRow.createCell(colNum)\n .setCellValue(dialog.stringDatabase.getString(\"NonSampled\"));\n }\n\n /* Row of finding */\n // Write the finding\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Finding\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n int value = 0;\n if (evidence.getState(evidenceVariable) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 4; // Go to the next variable (each variable uses 4 rows)\n }\n }\n\n rowNum++; // Empty row for clarity.\n\n // Write sampled variables\n for (int variablePosition = 0; variablePosition < sampledVariables.size(); variablePosition++) {\n\n Variable variableToWrite = sampledVariables.get(variablePosition);\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(sampledVariables.get(variablePosition).toString());\n\n // and then the names of its states\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(variableToWrite.getStateName(colNum - 1));\n }\n\n // In logical sampling, evidence variables are samples. If so, mark them as findings.\n if (evidenceVariables.contains(variableToWrite)) {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(findingNode);\n }\n } else {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(chanceNode);\n }\n }\n\n /* Row of occurrences */\n Row occurrencesRows = generalStats.createRow(rowNum + 1);\n // Write the title of the row\n Cell nSamples = occurrencesRows.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n occurrencesRows.createCell(colNum)\n .setCellValue(getStateOccurrences(sampleStorage, variablePosition,colNum - 1));\n }\n\n /* Row of approximate probabilities */\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n // Write the title of the row\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ApproximateProbability\"));\n // Write the sampled probability\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n if (evidenceVariables.contains(variableToWrite)) {\n // Logic Sampling: in case of a sampled evidence variable, probability = 1 for the finding.\n int value = 0;\n if (evidence.getState(variableToWrite) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n\n } else {\n approxProbsRow.createCell(colNum)\n .setCellValue(results.get(variableToWrite).getValues()[colNum - 1]);\n }\n approxProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n\n /* Row of exact probabilities */\n Row exactProbsRow = generalStats.createRow(rowNum + 3);\n // Write the title of the row\n Cell exactProbs = exactProbsRow.createCell(0);\n exactProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ExactProbability\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n exactProbsRow.createCell(colNum)\n .setCellValue(exactPosteriorValues.get(variableToWrite).getValues()[colNum - 1]);\n exactProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 5; // Go to the next variable (each variable uses 5 rows)\n\n }\n\n // Auto-size columns of second sheet (variable column + states columns)\n for (int colNum = 0; colNum <= 1 + maxNStates; colNum++) {\n generalStats.trackAllColumnsForAutoSizing();\n generalStats.autoSizeColumn(colNum);\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"*****************\n * Output the file *\n *******************/\n try {\n FileOutputStream outputStream = new FileOutputStream(fileName);\n workbook.write(outputStream);\n // remember to close\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n LocalizedException OutputException =\n new LocalizedException(new OpenMarkovException(\"Exception.Output\"), this.dialog);\n OutputException.showException();\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n String conclusion = dialog.stringDatabase.getString(\"Conclusion\") + \"\\n\" + fileName;\n logger.info(conclusion);\n System.out.println(conclusion);\n JOptionPane.showMessageDialog(dialog, conclusion,\n dialog.stringDatabase.getString(\"ConclusionTitle\"), JOptionPane.DEFAULT_OPTION);\n }", "private void updateGeneStatusDistributionData() {\n\t\tdouble[][][] value = gaTracker.getGeneValueDistribution();\n\t\tdouble[][][] status = gaTracker.getGeneStatusDistribution();\n\n\t\t/*\n\t\t * Collecting all data into one array, then replacing everything at once\n\t\t * to hopefully fix race condition in JFreeChart\n\t\t */\n\t\tdouble[][][][][] new_datasets = new double[geneCount][][][][];\n\n\t\tif (refreshWaiter.isReadyToRefresh()) {\n\t\t\tfor (int j = 0; j < geneCount; j++) {\n\t\t\t\tnew_datasets[j] = new double[numAgentTypes][2][][];\n\n\t\t\t\tfor (int i = 0; i < numAgentTypes; i++) {\n\t\t\t\t\tdouble[][] newx = {gene_status_distribution_range, status[i][j]};\n\t\t\t\t\tnew_datasets[j][i][0] = newx;\n\t\t\t\t\tdouble[][] newy = {gene_value_distribution_range, value[i][j]};\n\t\t\t\t\tnew_datasets[j][i][1] = newy;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < geneCount; j++) {\n\t\t\t\tfor (int i = 0; i < numAgentTypes; i++) {\n\t\t\t\t\tString key = \"Agent \" + (i+1);\n\t\t\t\t\tgene_status_distribution_data[j].addSeries(key, new_datasets[j][i][0]);\n\t\t\t\t\tgene_value_distribution_data[j].addSeries(key, new_datasets[j][i][1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If wait is true, there might be a deadlock pressing the stop button\n\t\t\trefreshWaiter.refresh(false);\n\t\t}\n\n\t}", "public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}", "public static void main(String[] args) {\n Double rateOfSvi;\n Double rateOfEvi;\n Double rateOfIvi;\n Double rateOfShi;\n Double rateOfEhi;\n Double rateOfIhi;\n Double weeklyRateOfIhi;\n Double Ihi;\n int nextSvi;\n int nextEvi;\n int nextIvi;\n int nextShi;\n int nextEhi;\n int nextIhi;\n int week = 0;\n final int id = 69;\n String[] line;\n final int[] infectedPredictions = new int[53];\n double vectorPopulation; // 3times the Host population in the area\n// initializeMobility();\n int val = 0;\n double error = 1000;\n\n// for(int e = 3500; e < 4500; e++) {\n// mohSampleMob = e;\n\n// System.out.println(\"Mobility Initialized\");\n initializePopulation();\n// System.out.println(\"Population Initialized\");\n initializeInfected();\n// System.out.println(\"Infected Initialized\");\n setInitialConditions(id, 0);\n// System.out.println(\"Initial conditions created\");\n// System.out.println(\"betaVi,betaHi,scalingFactor = \" + betaVi + \",\" + betaHi + \",\" + scalingFactor);\n infectedPredictions[0] = currentIhi;\n// try {\n// writer = new CSVWriter(new FileWriter(\"/Users/Anushka/Documents/workspace/CSV/Colombo_MSE.csv\"));\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// for (int bvi = 0; bvi<100 ; bvi++) {\n// betaVi = (bvi * 0.01);\n// for (int bhi = 0; bhi < 100; bhi++) {\n// betaHi = (bhi * 0.01);\n for (int i = 1; i <= 52; i++) {\n week = i;\n weeklyRateOfIhi = 0.0;\n\n setInitialConditions(69, week - 1);\n\n for (int j = 0; j < 7; j++) { // Do this for a week as we calculate daily figures.\n //Equations for the vectors\n rateOfSvi = muVi * scalingFactor * getMOHPopulation(id) - betaVi * getConnectivity(id, week) * currentSvi - muVi * currentSvi; // scalingFactor*HostPopulation = vectorPopulation\n rateOfEvi = betaVi * getConnectivity(id, week) * currentSvi - muVi * currentEvi - kappa * currentEvi;\n rateOfIvi = kappa * currentEvi - muVi * currentIvi;\n\n // Equations for the hosts\n rateOfShi = getMOHPopulation(id) - betaHi * getConnectivityWithinRegion(id) * currentShi - muHi * currentShi;\n rateOfEhi = betaHi * getConnectivityWithinRegion(id) * currentShi - lambda * currentEhi - muHi * currentEhi;\n rateOfIhi = lambda * currentEhi - delta * currentIhi - muHi * currentIhi;\n weeklyRateOfIhi += rateOfIhi;\n // Obtain next states\n\n// if (i == 0) {\n// currentSvi = rateOfSvi.intValue();\n// currentEvi = rateOfEvi.intValue();\n// currentIvi = rateOfIvi.intValue();\n// currentShi = rateOfShi.intValue();\n// currentEhi = rateOfEhi.intValue();\n// currentIhi = rateOfIhi.intValue();\n// }else{\n currentSvi += rateOfSvi.intValue();\n currentEvi += rateOfEvi.intValue();\n currentIvi += rateOfIvi.intValue();\n currentShi += rateOfShi.intValue();\n currentEhi += rateOfEhi.intValue();\n\n// if (rateOfIhi.intValue() > 0) {\n// currentIhi += rateOfIhi.intValue();\n// }\n// }\n\n\n }\n infectedPredictions[week] = weeklyRateOfIhi.intValue();\n //System.out.println(\"Week \" + week + \" Prediction \" + infectedPredictions[week] + \" Actual \" + infected[id][week]);\n //System.out.print(infectedPredictions[week] + \",\");\n //System.out.print(infected[id][week] + \",\");\n // Set current infected to actual value for next prediction\n currentIhi = infected[id][week];\n }\n System.out.println(Arrays.toString(infectedPredictions));\n System.out.println(Arrays.toString(infected[id]));\n\n// double er = calculateMSE(infectedPredictions, infected[id]);\n System.out.println(betaVi + \" \" + betaHi + \" \" + calculateMSE(infectedPredictions, infected[id]));\n\n// if(er < error){\n// error = er;\n// val = e;\n// }\n\n// DrawGraph provider = new DrawGraph();\n// DrawGraph.createAndShowGui();\n int[] actual = Arrays.copyOfRange(infected[id], 0, 52);\n int[] predict = Arrays.copyOfRange(infectedPredictions, 0, 52);\n\n// System.out.println();\n// }\n\n// System.out.println(val);\n// System.out.println(Arrays.toString(predict));\n// System.out.println(Arrays.toString(actual));\n\n XYLineChartExample temp = new XYLineChartExample(actual, predict);\n\n\n// BufferedWriter br = null;\n// try {\n// br = new BufferedWriter(new FileWriter(\"myfile.csv\"));\n//\n// StringBuilder sb = new StringBuilder();\n// for (int element : infectedPredictions) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n// sb.append(\",\");\n//\n// for (int element : infected[id]) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n//\n// br.write(String.valueOf(sb));\n// br.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n\n //line = new String[]{Double.toString(betaVi), Double.toString(betaHi), Double.toString(calculateMSE(infectedPredictions, infected[id]))};\n //writer.writeNext(line);\n// }\n//\n// }\n// try {\n// writer.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }", "private void populateData(String seriesName) {\n competitorsList = new ArrayList<>();\n {\n Cursor cursor = DB.readSeriesResult(seriesName);\n int rankCount = 1;\n while (cursor.moveToNext()) {\n\n int rank = rankCount;\n String bClass = cursor.getString(0);\n int sailNo = Integer.parseInt(cursor.getString(1));\n String helmName = cursor.getString(2);\n String crewName = cursor.getString(3) == null ? \"\" :cursor.getString(3) ;\n int PY = Integer.parseInt(cursor.getString(4));\n int points = cursor.getString(5) == null ? -1 : Integer.parseInt(cursor.getString(5));\n rankCount++;\n FinalCompetitorData competitor = new FinalCompetitorData(rank, bClass, sailNo, helmName, crewName, PY, points);\n competitorsList.add(competitor);\n }\n records = new String[competitorsList.size()][columnHeaders.length];\n for (int i = 0; i < competitorsList.size(); i++) {\n FinalCompetitorData s = competitorsList.get(i);\n\n records[i][0] = String.valueOf(s.getRank());\n records[i][1] = s.getBoatClass();\n records[i][2] = String.valueOf(s.getSailNo());\n records[i][3] = s.getHelmName();\n records[i][4] = s.getCrewName().equals(\"\") ? \"--\" : s.getCrewName();\n records[i][5] = String.valueOf(s.getPY());\n records[i][6] = s.getPoints() == -1 ? \"--\" : String.valueOf(s.getPoints());\n }//for\n }\n }", "@Override\n public PreparedData prepare(SparkContext sc, TrainingData trainingData) {\n // now that we have all actions in separate RDDs we must merge any user dictionaries and\n // make sure the same user ids map to the correct events\n Optional<BiDictionaryJava> userDictionary = Optional.empty();\n\n List<Tuple2<String,IndexedDatasetJava>> indexedDatasets = new ArrayList<>();\n\n // make sure the same user ids map to the correct events for merged user dictionaries\n for(Tuple2<String,JavaPairRDD<String,String>> entry : trainingData.getActions()) {\n\n String eventName = entry._1();\n JavaPairRDD<String,String> eventIDS = entry._2();\n\n // passing in previous row dictionary will use the values if they exist\n // and append any new ids, so after all are constructed we have all user ids in the last dictionary\n IndexedDatasetJava ids = IndexedDatasetJava.apply(eventIDS, userDictionary, sc);\n userDictionary = Optional.of(ids.getRowIds());\n\n // append the transformation to the indexedDatasets list\n indexedDatasets.add(new Tuple2<>(eventName, ids));\n }\n\n List<Tuple2<String,IndexedDatasetJava>> rowAdjustedIds = new ArrayList<>();\n\n // check to see that there are events in primary event IndexedDataset and return an empty list if not\n if(userDictionary.isPresent()){\n\n // now make sure all matrices have identical row space since this corresponds to all users\n // with the primary event since other users do not contribute to the math\n for(Tuple2<String,IndexedDatasetJava> entry : indexedDatasets) {\n String eventName = entry._1();\n IndexedDatasetJava eventIDS = entry._2();\n rowAdjustedIds.add(new Tuple2<>(eventName,\n (new IndexedDatasetJava(eventIDS.getMatrix(),userDictionary.get(),eventIDS.getColIds())).\n newRowCardinality(userDictionary.get().size())));\n }\n }\n\n JavaPairRDD<String, Map<String,JsonAST.JValue>>fieldsRDD =\n trainingData.getFieldsRDD().mapToPair(entry -> new Tuple2<>(\n entry._1(), JavaConverters.mapAsJavaMapConverter(entry._2().fields()).asJava()));\n\n JavaPairRDD<String,HashMap<String,JsonAST.JValue>> fields = fieldsRDD.mapToPair(entry ->\n new Tuple2<>(entry._1(),new HashMap<>(entry._2())));\n\n return new PreparedData(rowAdjustedIds, fields);\n }", "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}", "protected void getDataAndMakeTables() throws ModelException {\n\n if (m_oLegend == null) {\n return;\n }\n\n m_oChartFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\n DetailedOutputFileManager oManager = m_oLegend.getDetailedOutputFileManager();\n int iNumTimesteps = m_oLegend.getNumberOfTimesteps(),\n iTimestepToReturnTo = m_oLegend.getCurrentTimestep(), i;\n \n declareArrays();\n \n //Force the processing of each timestep\n for (i = 0; i <= iNumTimesteps; i++) {\n\n //Flag this as desired processing\n m_bCurrentProcessing = true;\n\n //Make the file manager parse this file\n oManager.readFile(i); \n \n }\n\n //Cause this chart to ignore data from other sources\n m_bCurrentProcessing = false;\n\n //Refresh all the existing charts back to the way they were\n oManager.readFile(iTimestepToReturnTo);\n oManager.updateCharts(); \n\n // Display the tables with whatever the user has selected for a species\n\n //Make a content panel that packages in the size class controls\n JPanel jContentPanel = new JPanel(new BorderLayout());\n JComboBox<String> jComboBox = (JComboBox<String>)DataGrapher.findNamedComponent(\n m_oChartFrame.getContentPane(), SPECIES_COMBO_BOX_NAME);\n jContentPanel.add(makeSizeClassPanel(this, mp_sSpeciesNames, \n m_iNumSizeClasses, m_fSizeClassSize, jComboBox.getSelectedIndex(),\n m_bIncludeLive, m_bIncludeSnags), BorderLayout.NORTH);\n \n jContentPanel.add(makeTablePanel(jComboBox.getSelectedIndex()), BorderLayout.CENTER);\n m_oChartFrame.setContentPane(jContentPanel);\n\n //Create our menu\n m_oChartFrame = DataGrapher.addFileMenu(m_oChartFrame, this, m_bShowOneTimestep);\n\n m_oChartFrame.pack();\n\n m_oChartFrame.setCursor(Cursor.getPredefinedCursor(Cursor.\n DEFAULT_CURSOR));\n }", "public static void DatasetAndQueryToFiles(double d, double e) throws IOException {\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch1.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch2.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch3.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch4.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch5.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch6.dat\");\r\n\t\tReadInDataset.findMinAndMax();\r\n\t\tReadInDataset.finalizeDataset();\r\n\t\tReadInDataset.writeToFile2(\"FinalDataset\"+\".arff\",ReadInDataset.finalDataset); //write down the used dataset\r\n\t\tquery=assignScoreToQueries(); //assign the scores to queries\r\n\t\ttrainQueries=takeTrainingQuerySet(query,d);\r\n\t\ttestQueries=takeTestingQuerySet(query,e,d);\r\n\t\tscoreToFile(Queries.NumberOfDimensions, trainQueries, \"TrainScoreSet.arff\"); //write down the queries with the scores\r\n\t\tscoreToFile(Queries.NumberOfDimensions, testQueries, \"TestScoreSet.arff\"); //write down the queries with the scores\r\n\t//\tqueryAndDataToCSV(); // this produces a graph with both queries and the dataset, not needded right now\r\n\t\twriteQueriesToCSV(testQueries, \"test\"); \r\n\t\twriteQueriesToCSV(trainQueries, \"train\"); \r\n\t}", "public boolean evaluateDataDBHeavy() {\n // reset labels\n resetLabels();\n\n // create Map with player-name and count how often he participates\n Map<String, Integer> nameToPart = new HashMap<>();\n for (String playerName : playerNameList) {\n if (nameToPart.containsKey(playerName)) {\n nameToPart.put(playerName, nameToPart.get(playerName) + 1);\n } else {\n nameToPart.put(playerName, 1);\n }\n }\n\n // open conn\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n\n // get List with all games that finished (end_time != null) and have\n // the right number of each participant -> goes to totalGames\n String strSQL = \"SELECT max_turn.game, max_turn.turn, players.name, participants.winner FROM max_turn INNER JOIN participants ON max_turn.game = participants.game \" +\n \"INNER JOIN players ON participants.player = players.id \" +\n \"INNER JOIN games ON games.id = max_turn.game WHERE end_time IS NOT null GROUP BY max_turn.game \" +\n \"HAVING \";\n // add criteria of how often a player participates in a game in a loop (for every player)\n int counter = 0;\n for (Map.Entry<String, Integer> entry : nameToPart.entrySet()) {\n if (counter != 0)\n strSQL += \"AND \";\n strSQL += \"(SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player WHERE participants.game = max_turn.game AND players.name = '\";\n strSQL += entry.getKey() + \"') = \";\n strSQL += entry.getValue() + \" \";\n counter++;\n }\n // add criteria total amount of participants in game (numberOfParticipants)\n strSQL += \"AND (SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player \" +\n \"WHERE participants.game = max_turn.game) = \" + numberOfParticipants +\";\";\n // do select on db\n List<Map<String, Object>> resultList = dbAccess.selectSQL(strSQL);\n // check for dbError\n if(resultList == null){\n showAlertDBError();\n return false;\n }\n totalGames = resultList.size();\n\n\n // first new map to save wins - copy names from nameToPart\n nameToWins = new HashMap<>();\n for(Map.Entry<String, Integer> entry : nameToPart.entrySet()){\n nameToWins.put(entry.getKey(), 0);\n }\n\n // get list with winners and average turns - iterate through resultList of all games WITH A WINNER and the max turns\n strSQL = \"SELECT max_turn.game, max_turn.turn, players.name, participants.winner FROM max_turn INNER JOIN participants ON max_turn.game = participants.game \" +\n \"INNER JOIN players ON participants.player = players.id \" +\n \"INNER JOIN games ON games.id = max_turn.game WHERE end_time IS NOT null AND winner = 1 \" +\n \"HAVING \";\n // add criteria of how often a player participates in a game in a loop (for every player)\n counter = 0;\n for (Map.Entry<String, Integer> entry : nameToPart.entrySet()) {\n if (counter != 0)\n strSQL += \"AND \";\n strSQL += \"(SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player WHERE participants.game = max_turn.game AND players.name = '\";\n strSQL += entry.getKey() + \"') = \";\n strSQL += entry.getValue() + \" \";\n counter++;\n }\n // add criteria total amount of participants in game (numberOfParticipants)\n strSQL += \"AND (SELECT COUNT(participants.player) FROM participants INNER JOIN players ON players.id = participants.player \" +\n \"WHERE participants.game = max_turn.game) = \" + numberOfParticipants +\";\";\n // do select on db\n resultList = dbAccess.selectSQL(strSQL);\n // check for dbError\n if(resultList == null){\n showAlertDBError();\n return false;\n }\n\n // close conn\n dbAccess.closeConn();\n\n // iterate resultList with winners, write winners, sum up turns\n int turnSum = 0;\n for(Map<String, Object> row : resultList){\n String name = (String) row.get(\"name\");\n nameToWins.put(name, nameToWins.get(name) + 1);\n int maxTurn = (int) row.get(\"turn\");\n turnSum += maxTurn;\n }\n // until now nameToWins only holds winners - adding players without wins to the map with (with 0 as wins)\n for(Map.Entry<String, Integer> entry : nameToPart.entrySet()){\n if(!nameToWins.containsKey(entry.getKey()))\n nameToWins.put(entry.getKey(), 0);\n }\n\n // calculate games without winner\n int gamesWithWinner = resultList.size();\n gamesWithoutWinner = totalGames-gamesWithWinner;\n // calculate average turns\n if(gamesWithWinner > 0){\n averageTurns = Math.round(turnSum/gamesWithWinner);\n }else{\n averageTurns = 0;\n }\n // update gui and end\n updateGUI();\n return true;\n }", "private void initContestData(IInternalContest contest) {\n\n // Add accounts\n contest.generateNewAccounts(ClientType.Type.TEAM.toString(), 1, true);\n contest.generateNewAccounts(ClientType.Type.TEAM.toString(), 1, true);\n \n contest.generateNewAccounts(ClientType.Type.JUDGE.toString(), 1, true);\n\n // Add scoreboard account and set the scoreboard account for this client (in contest)\n contest.setClientId(createBoardAccount (contest));\n \n // Add Problem\n Problem problem = new Problem(\"Problem One\");\n contest.addProblem(problem);\n \n // Add Language\n Language language = new Language(\"Language One\");\n contest.addLanguage(language);\n \n String[] judgementNames = { \"Yes\", \"No - compilation error\", \"No - incorrect output\", \"No - It's just really bad\",\n \"No - judges enjoyed a good laugh\", \"You've been bad - contact staff\", \"No - Illegal Function\" };\n \n String[] acronyms = { \"AC\", \"CE\", \"WA\", \"WA\", \"WA\", \"WA\", \"SV\" };\n \n for (int i = 0; i < judgementNames.length; i++) {\n Judgement judgement = new Judgement(judgementNames[i], acronyms[i]);\n contest.addJudgement(judgement);\n }\n \n checkForJudgeAndTeam(contest);\n }", "@Override\n public boolean doLoadTrackersData() {\n\n TrackerManager tManager = TrackerManager.getInstance();\n ObjectTracker objectTracker = (ObjectTracker) tManager\n .getTracker(ObjectTracker.getClassType());\n if (objectTracker == null)\n return false;\n\n if (markerDataSet == null)\n markerDataSet = objectTracker.createDataSet();\n\n if (markerDataSet == null)\n return false;\n\n if (!markerDataSet.load(\n \"Test0000.xml\",\n STORAGE_TYPE.STORAGE_APPRESOURCE))\n return false;\n\n if (!objectTracker.activateDataSet(markerDataSet))\n return false;\n\n int numTrackers = markerDataSet.getNumTrackables();\n for (int count = 0; count < numTrackers; count++) {\n Trackable trackable = markerDataSet.getTrackable(count);\n if (enableExtendedTracking) {\n trackable.startExtendedTracking();\n }\n\n String name = \"Current Dataset : \" + trackable.getName();\n trackable.setUserData(name);\n Log.d(TAG, \"UserData:Set the following user data \" + trackable.getUserData());\n }\n\n return true;\n }", "public void runExperiment(boolean saveAgentData, boolean saveMarketMakerData, boolean saveBidsData) throws AdXException, IOException {\n String agentsResults = \"\";\n String marketMakerResults = \"\";\n String bidsLogs = \"\";\n Logging.log(\"[experiment]\" + \"\\n\\t reserve = \" + this.reserve + \"\\n\\t numberOfImpressions = \" + this.numberOfImpressions + \"\\n\\t demandDiscountFactor = \"\n + this.demandDiscountFactor);\n for (int g = 0; g < this.numberOfGames; g++) {\n // Run simulator.\n Simulator simulator = new Simulator(this.simAgents, this.reserve, this.numberOfImpressions, this.demandDiscountFactor);\n // Get statistics.\n Statistics statistics = simulator.run();\n agentsResults += statistics.oneLineAgentsSummary(1, g);\n marketMakerResults += statistics.oneLineMarketMakerSummary(1, g, this.numberOfImpressions);\n bidsLogs += statistics.getStatisticsBids().logBidsToCSV(1);\n // Logging.log(\"Result Agents: \" + statistics.oneLineAgentsSummary(1, g));\n // Logging.log(\"Result Market Maker: \" + statistics.oneLineMarketMakerSummary(1, g, this.numberOfImpressions));\n }\n // Save results to .csv files.\n if (saveAgentData) {\n // Results from the agent point of view.\n Files.createDirectories(Paths.get(this.resultsDirectory + \"agents/\"));\n PrintWriter writerAgentsResults = new PrintWriter(this.resultsDirectory + \"agents/\" + this.resultsFileName + \".csv\", \"UTF-8\");\n writerAgentsResults.println(agentsResults);\n writerAgentsResults.close();\n }\n if (saveMarketMakerData) {\n // Results from the market maker point of view.\n Files.createDirectories(Paths.get(this.resultsDirectory + \"marketmaker/\"));\n PrintWriter writerMarketMakerResults = new PrintWriter(this.resultsDirectory + \"marketmaker/\" + this.resultsFileName + \".csv\", \"UTF-8\");\n writerMarketMakerResults.println(marketMakerResults);\n writerMarketMakerResults.close();\n }\n // Log of bids.\n if (saveBidsData) {\n Files.createDirectories(Paths.get(this.resultsDirectory + \"bidlogs/\"));\n PrintWriter writerBidsLog = new PrintWriter(this.resultsDirectory + \"bidlogs/\" + this.resultsFileName + \".csv\", \"UTF-8\");\n writerBidsLog.println(bidsLogs);\n writerBidsLog.close();\n }\n\n }", "@Test\n @DisplayName(\"gets all player years when player table is already partially filled\")\n void shouldUpdatePlayerYearsForExistingPlayer() throws SQLException, InterruptedException {\n //Add test player to queue\n Player tonyParker = new Player(\"2225\", \"Parker\", \"Tony\", \"0\", \"2001\", \"2018\");\n runHandler.addToQueueForTesting(tonyParker);\n Connection connPlayers1 = individualPlayerScraper.setNewConnection(\"playertest\");\n //Create test player table and insert some incomplete data\n individualPlayerScraper.createIndividualDataTable(\"parker_tony_2225_individual_data\", connPlayers1, connPlayers1);\n connPlayers1.prepareStatement(\"INSERT INTO parker_tony_2225_individual_data (year,reg,preseason,playoffs) VALUES ('2001-02',-1,-1,-1),\" +\n \"('2002-03',-1,-1,-1),('2003-04',-1,-1,-1),('2004-05',-1,-1,-1),('2005-06',-1,-1,-1),('2006-07',-1,-1,-1)\").execute();\n individualPlayerScraper.getPlayerActiveYears(connPlayers1, connPlayers1);\n //Query database for inserted player data\n HashMap<String, ArrayList<Integer>> yearSeasonActivityMap = new HashMap<>();\n ResultSet rs = connPlayers1.prepareStatement(\"SELECT * FROM parker_tony_2225_individual_data\").executeQuery();\n while (rs.next()) {\n yearSeasonActivityMap.put(rs.getString(\"year\"), new ArrayList<>(Arrays.asList(rs.getInt(\"reg\"), rs.getInt(\"preseason\"), rs.getInt(\"playoffs\"))));\n }\n assertEquals(createTonyParkerTestMap(), yearSeasonActivityMap);\n rs.close();\n connPlayers1.close();\n }", "public void initHistogram() {\n\t\th1.setString(Utilities.hist1String);\r\n\t\th2.setString(Utilities.hist2String);\r\n\t\th1.setData(results);\r\n\t\th2.setData(results);\r\n\r\n\t\t\r\n\r\n\t}", "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 refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }", "@Override\n public void importUsers() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"importUsers\");\n }\n\n for (int i = 0; i < usersForImportation.size(); i++) {\n\n if (usersForImportation.get(i).getObject1()) {\n ConnectathonParticipant cp = new ConnectathonParticipant();\n ConnectathonParticipantQuery query = new ConnectathonParticipantQuery();\n query.testingSession().eq(TestingSession.getSelectedTestingSession());\n query.email().eq(usersForImportation.get(i).getObject2().getEmail());\n\n if (query.getCount() == 0) {\n\n try {\n\n cp.setEmail(usersForImportation.get(i).getObject2().getEmail());\n cp.setFirstname(usersForImportation.get(i).getObject2().getFirstname());\n cp.setLastname(usersForImportation.get(i).getObject2().getLastname());\n cp.setMondayMeal(true);\n cp.setTuesdayMeal(true);\n cp.setWednesdayMeal(true);\n cp.setThursdayMeal(true);\n cp.setFridayMeal(true);\n cp.setVegetarianMeal(false);\n cp.setSocialEvent(false);\n cp.setTestingSession(TestingSession.getSelectedTestingSession());\n cp.setInstitution(usersForImportation.get(i).getObject2().getInstitution());\n cp.setInstitutionName(usersForImportation.get(i).getObject2().getInstitution().getName());\n\n if (Role.isUserMonitor(usersForImportation.get(i).getObject2())) {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getMonitorStatus());\n\n } else if (Role.isUserVendorAdmin(usersForImportation.get(i).getObject2())\n || Role.isUserVendorUser(usersForImportation.get(i).getObject2())) {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getVendorStatus());\n\n } else {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getVisitorStatus());\n }\n\n entityManager.clear();\n entityManager.persist(cp);\n entityManager.flush();\n\n FacesMessages.instance().add(StatusMessage.Severity.INFO, USER + usersForImportation.get(i).getObject2().getLastname() + \" \" +\n \"\" + usersForImportation.get(i).getObject2().getEmail()\n + \" is imported\");\n renderAddPanel = false;\n getAllConnectathonParticipants();\n\n } catch (Exception e) {\n LOG.warn(USER + usersForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\", cp.getFirstname(),\n cp.getLastname(), cp.getEmail());\n\n }\n FinancialCalc.updateInvoiceIfPossible(cp.getInstitution(), cp.getTestingSession(), entityManager);\n } else {\n LOG.warn(USER + usersForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\",\n usersForImportation.get(i).getObject2().getFirstname(),\n usersForImportation.get(i).getObject2().getLastname(),\n usersForImportation.get(i).getObject2().getEmail());\n }\n }\n\n }\n }", "private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}", "public void updateChart(){\n for(Pair<Number,Number> p : sss.getPopulationQueue()){\n this.population.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getDeathsQueue()){\n this.deaths.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getInfectionsQueue()){\n this.infections.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n for(Pair<Number,Number> p : sss.getHealsQueue()){\n this.heals.getData().add(new XYChart.Data<>(p.getKey(),p.getValue()));\n }\n sss.clearPopulationQueue();\n sss.clearDeathsQueue();\n sss.clearInfectionsQueue();\n sss.clearHealsQueue();\n }", "public static void main(String[] args) throws Exception {\n int numLinesToSkip = 0;\n String delimiter = \",\"; //这是csv文件中的分隔符\n RecordReader recordReader = new CSVRecordReader(numLinesToSkip,delimiter);\n recordReader.initialize(new FileSplit(new ClassPathResource(\"dataSet20170119.csv\").getFile()));\n\n //Second: the RecordReaderDataSetIterator handles conversion to DataSet objects, ready for use in neural network\n\n /**\n * 这是标签(类别)所在列的序号\n */\n int labelIndex = 0; //5 values in each row of the iris.txt CSV: 4 input features followed by an integer label (class) index. Labels are the 5th value (index 4) in each row\n //类别的总数\n int numClasses = 2; //3 classes (types of iris flowers) in the iris data set. Classes have integer values 0, 1 or 2\n\n //一次读取多少条数据。当数据量较大时可以分几次读取,每次读取后就训练。这就是随机梯度下降\n int batchSize = 2000; //Iris data set: 150 examples total. We are loading all of them into one DataSet (not recommended for large data sets)\n\n DataSetIterator iterator = new RecordReaderDataSetIterator(recordReader,batchSize,labelIndex,numClasses);\n //因为我在这里写的2000是总的数据量大小,一次读完,所以一次next就完了。如果分批的话要几次next\n DataSet allData = iterator.next();\n// allData.\n allData.shuffle();\n SplitTestAndTrain testAndTrain = allData.splitTestAndTrain(0.8); //Use 65% of data for training\n\n DataSet trainingData = testAndTrain.getTrain();\n DataSet testData = testAndTrain.getTest();\n //We need to normalize our data. We'll use NormalizeStandardize (which gives us mean 0, unit variance):\n //数据归一化的步骤,非常重要,不做可能会导致梯度中的几个无法收敛\n DataNormalization normalizer = new NormalizerStandardize();\n normalizer.fit(trainingData); //Collect the statistics (mean/stdev) from the training data. This does not modify the input data\n normalizer.transform(trainingData); //Apply normalization to the training data\n normalizer.transform(testData); //Apply normalization to the test data. This is using statistics calculated from the *training* set\n\n\n final int numInputs = 9202;\n int outputNum = 2;\n int iterations = 1000;\n long seed = 142;\n int numEpochs = 50; // number of epochs to perform\n\n log.info(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)\n .iterations(iterations)\n .activation(Activation.SIGMOID)\n .weightInit(WeightInit.ZERO) //参数初始化的方法,全部置零\n .learningRate(1e-3) //经过测试,这里的学习率在1e-3比较合适\n .regularization(true).l2(5e-5) //正则化项,防止参数过多导致过拟合。2阶范数乘一个比率\n .list()\n\n .layer(0, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(Activation.SIGMOID)\n .nIn(numInputs).nOut(outputNum).build())\n .backprop(true).pretrain(false)\n .build();\n\n //run the model\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n model.setListeners(new ScoreIterationListener(100));\n\n\n log.info(\"Train model....\");\n for( int i=0; i<numEpochs; i++ ){\n log.info(\"Epoch \" + i);\n model.fit(trainingData);\n\n //每个epoch结束后立马观察模型估计的效果,方便及早停止\n Evaluation eval = new Evaluation(numClasses);\n INDArray output = model.output(testData.getFeatureMatrix());\n eval.eval(testData.getLabels(), output);\n log.info(eval.stats());\n }\n\n }", "public void pairedT_Test(int numberRanks, String baselineRank, String targetRank, int[] rankSize, \n\t\t\tint[] numKey, String[] datasetNames, double radius, double[] alpha, String experimentName) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException {\n\n\t\tconnect();\n\n\t\tfor(int d = 0; d < datasetNames.length; d++) {\n\t\t\t\n\t\t\tSystem.out.println(experimentName+\": \" + datasetNames[d] + \"\\n\");\n\n\t\t\tfor (int a=0; a < alpha.length; a++) {\n\t\t\tfor(int k = 0; k < rankSize.length; k++) {\t\t\t\t\t\t\t\t\t\n\n\t\t\t\tfor(int n = 0; n < numKey.length; n++) {\t\t\t\t\t\n\n\t\t\t\t\tString targetQuery = \" \";\n\t\t\t\t\tString baselineQuery = \" \";\n\n\t\t\t\t\t/* Verify if the baseline algorithm is correct */\n\t\t\t\t\tif(baselineRank.equals(\"skpq\")) {\n\t\t\t\t\t\tbaselineQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+baselineRank+\"` WHERE numKey=\"+ numKey[n] \n\t\t\t\t\t\t\t\t+ \" and k=\"+rankSize[k]+\" and city ='\"+datasetNames[d]+\"' and radius=\"+radius+\" and neighborhood_name ='range' and experimentName ='recsys20' order by keyword;\";\n\t\t\t\t\t} else if (baselineRank.equals(\"inf\")) {\n\t\t\t\t\t\tbaselineQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+\"skpq\"+\"` WHERE numKey=\"+ numKey[n] \n\t\t\t\t\t\t\t\t+ \" and k=\"+rankSize[k]+\" and city ='\"+datasetNames[d]+\"'and radius=\"+radius+\" and neighborhood_name ='inf' and experimentName ='recsys20' order by keyword;\";\n\t\t\t\t\t} else if (baselineRank.equals(\"hd\")) {\n\t\t\t\t\t\t//gamma not included\n\t\t\t\t\t\tbaselineQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+\"hdskpq\"+\"` WHERE numKey=\"+ numKey[n] \n\t\t\t\t\t\t\t\t+ \" and k=\"+rankSize[k]+\" and city ='\"+datasetNames[d]+\"'and radius=\"+radius+\" and experimentName ='eswa21' order by keyword;\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Inexistent baseline rank: \" + baselineRank);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Verify if the target algorithm is correct */\n\t\t\t\t\tif(targetRank.equals(\"paretosearch\")) {\n\t\t\t\t\t\ttargetQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+targetRank+\"` where numKey=\"+numKey[n]+\" and k=\"+rankSize[k]+\n\t\t\t\t\t\t\t\t\" and city='\"+datasetNames[d]+\"' and textSimilarity_methodName='default' and radius=\"+radius+\" and alpha=\"+alpha[a]\n\t\t\t\t\t\t\t\t+ \" and experimentName ='\"+experimentName+\"' order by keyword;\";\n\t\t\t\t\t}else if(targetRank.equals(\"skpq\")) {\n\t\t\t\t\t\ttargetQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+targetRank+\"` where numKey=\"+numKey[n]+\" and k=\"+rankSize[k]+\n\t\t\t\t\t\t\" and city='\"+datasetNames[d]+\"' and radius=\"+radius+\" and neighborhood_name='paretorank' and experimentName ='recsys20' order by keyword;\";\n\t\t\t} \n\t\t\t\t\telse if(targetRank.equals(\"prr\")) {\t\t\t\t\t\t\n\t\t\t\t\t\tif(numKey.length == 1) {\n\t\t\t\t\t\t\texperimentName=\"recsys20\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\texperimentName=\"jis2020\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttargetQuery = \"SELECT keyword,ndcg,tau FROM `acm_recsys20`.`\"+targetRank+\"` where numKey=\"+numKey[n]+\" and k=\"+rankSize[k]+\n\t\t\t\t\t\t\t\t\" and city='\"+datasetNames[d]+\"' and textSimilarity_methodName='default' and radius=\"+radius+\" and alpha=\"+alpha[a]\n\t\t\t\t\t\t\t\t+ \" and experimentName ='\"+experimentName+\"' order by keyword;\";\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(\"Inexistent target rank: \" + targetRank);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\n//\t\t\t\t\tSystem.out.println(\"Baseline: \" + baselineQuery);\n//\t\t\t\t\tSystem.out.println(\"Target: \" + targetQuery);\n//\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\n\t\t\t\t\tPreparedStatement sqlBaseline = conn.prepareStatement(baselineQuery);\n\t\t\t\t\tPreparedStatement sqlTarget = conn.prepareStatement(targetQuery);\t\t\n\n\t\t\t\t\tdouble[] ndcgB = new double[numberRanks];\n\t\t\t\t\tdouble[] ndcgTarget = new double[numberRanks];\n\n\t\t\t\t\tdouble[] tauB = new double[numberRanks];\n\t\t\t\t\tdouble[] tauTarget = new double[numberRanks];\n\n\t\t\t\t\tResultSet baselineResult = sqlBaseline.executeQuery();\n\t\t\t\t\tResultSet targetResult = sqlTarget.executeQuery();\n\n\t\t\t\t\tfor(int i = 0; baselineResult.next();i++) {\n\t\t\t\t\t\tndcgB[i] = baselineResult.getDouble(\"ndcg\");\n\n\t\t\t\t\t\ttargetResult.next();\n\t\t\t\t\t\tndcgTarget[i] = targetResult.getDouble(\"ndcg\");\n\n\t\t\t\t\t\ttauB[i] = baselineResult.getDouble(\"tau\");\t\t\t\t\t\t\t\n\t\t\t\t\t\ttauTarget[i] = targetResult.getDouble(\"tau\");\n\t\t\t\t\t}\n\n\t\t\t\t\tTTest t = new TTest();\n\n\t\t\t\t\tdouble p_value_ndcg = t.pairedTTest(ndcgB, ndcgTarget);\t\t\t\t\t\t\n\n\t\t\t\t\tdouble p_value_tau = t.pairedTTest(tauB, tauTarget);\n\n\t\t\t\t\tif(numKey.length>1) {\n\t\t\t\t\t\tSystem.out.println(\"NDCG --> #keys=\"+numKey[n]+ \" -- p=\"+p_value_ndcg);\n\n\t\t\t\t\t\tSystem.out.println(\"TAU --> #keys=\"+numKey[n]+ \" -- p=\"+p_value_tau);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"NDCG --> k=\"+rankSize[k]+ \" -- p=\"+p_value_ndcg);\n\n\t\t\t\t\t\tSystem.out.println(\"TAU --> k=\"+rankSize[k]+ \" -- p=\"+p_value_tau);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\tsqlBaseline.close();\n\t\t\t\t\tsqlTarget.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\t\t\n\t}", "private void setData(int count) {\n\n int goalValue = mSharedPreferences.getData(PREF_GOAL_VALUE);\n Log.e(TAG, \"setData: \" + goalValue);\n\n ArrayList<Entry> values = new ArrayList<>();\n values.add(new Entry(0, 0));\n for (int i = 1; i < count; i++) {\n\n float val = (float) (Math.random() * 10) + values.get(i-1).getY();\n Log.e(TAG, \"val 1: \" + val);\n\n if(val >= goalValue) val = goalValue;\n Log.e(TAG, \"val 2: \" + val);\n\n values.add(new Entry(i, val));\n }\n\n LineDataSet lineDataSet;\n\n if (mChart.getData() != null &&\n mChart.getData().getDataSetCount() > 0) {\n lineDataSet = (LineDataSet)mChart.getData().getDataSetByIndex(0);\n lineDataSet.setValues(values);\n mChart.getData().notifyDataChanged();\n mChart.notifyDataSetChanged();\n } else {\n // create a dataset and give it a type\n lineDataSet = new LineDataSet(values, \"\");\n\n lineDataSet.setColor(ContextCompat.getColor(getContext(), R.color.green));\n lineDataSet.setCircleColor(ContextCompat.getColor(getContext(), R.color.green));\n lineDataSet.setDrawIcons(false);\n lineDataSet.setLineWidth(2f);\n lineDataSet.setCircleRadius(1f);\n lineDataSet.setDrawCircleHole(false);\n lineDataSet.setDrawFilled(true);\n lineDataSet.disableDashedLine();\n\n mChart.setDescription(new Description()); // Hide the description\n mChart.getAxisLeft().setDrawGridLines(false);\n mChart.getAxisLeft().setDrawLabels(false);\n mChart.getAxisRight().setDrawGridLines(false);\n mChart.getAxisRight().setDrawLabels(false);\n mChart.getXAxis().setDrawGridLines(false);\n mChart.getXAxis().setDrawLabels(false);\n mChart.getLegend().setEnabled(false);\n\n lineDataSet.setDrawValues(false);\n\n if (Utils.getSDKInt() >= 18) {\n // fill drawable only supported on api level 18 and above\n final Drawable drawable = ContextCompat.getDrawable(getContext(), R.drawable.ic_add_black_24dp);\n lineDataSet.setFillDrawable(drawable);\n }\n else {\n lineDataSet.setFillColor(Color.BLACK);\n }\n\n\n ArrayList<Entry> values2 = new ArrayList<>();\n values2.add(new Entry(values.get(20).getX(), values.get(20).getY()));\n for (int i = 29; i >= 20; i--) {\n\n float val = (float) (Math.random() * 10) + values.get(i).getY();\n\n Log.d(TAG, \"Golden Values : \" + val);\n values2.add(new Entry(values.get(20).getX() + i, val));\n }\n\n LineDataSet lineDataSet2;\n\n lineDataSet2 = new LineDataSet(values2, \"Predicted\");\n\n lineDataSet2.setColor(ContextCompat.getColor(getContext(), R.color.colorOppositePrimary));\n lineDataSet2.setCircleColor(ContextCompat.getColor(getContext(), R.color.colorOppositePrimary));\n lineDataSet2.setDrawIcons(false);\n lineDataSet2.setLineWidth(2f);\n lineDataSet2.setCircleRadius(1f);\n lineDataSet2.setDrawCircleHole(false);\n lineDataSet2.setDrawFilled(true);\n lineDataSet2.disableDashedLine();\n\n lineDataSet2.setDrawValues(false);\n\n if (Utils.getSDKInt() >= 18) {\n // fill drawable only supported on api level 18 and above\n final Drawable drawable = ContextCompat.getDrawable(getContext(), R.drawable.ic_add_black_24dp);\n lineDataSet2.setFillDrawable(drawable);\n }\n else {\n lineDataSet2.setFillColor(Color.BLACK);\n }\n\n final ArrayList<ILineDataSet> dataSets = new ArrayList<>();\n dataSets.add(lineDataSet); // add the datasets\n// dataSets.add(lineDataSet2);\n\n // create a data object with the datasets\n final LineData data = new LineData(lineDataSet/*, lineDataSet2*/);\n\n // set data\n mChart.setData(data);\n\n// final ArrayList<ILineDataSet> dataSets2 = new ArrayList<>();\n// dataSets.add(lineDataSet2); // add the datasets\n\n // create a data object with the datasets\n// final LineData data2 = new LineData(dataSets2);\n// mChart.setData(data2);\n }\n }", "static void initializeData() {\n\n if (timeLimitInHour != -1) {\n endTime = startTime + timeLimitInHour * 60 * 60 * 1000;\n }\n\n // Read the data file.\n data = new Data(dataFileName);\n\n // Build all variables.\n allVariable = data.buildAllVariable();\n\n // Read the target gene set.\n GeneSet geneSet = new GeneSet(allVariable, targetGeneSetFileName, minGeneSetSize, maxGeneSetSize, selectedCollections);\n listOfTargetGeneSets = geneSet.buildListOfGeneSets();\n\n // Read sample class labels.\n readSampleClass();\n\n // Initialize remaining fields.\n if (numberOfThreads == 0)\n numberOfThreads = getRuntime().availableProcessors();\n\n // Initialize BufferedWriter with preliminary info for log file.\n String fileInfo = \"EDDY OUTPUT FILE\\n\";\n fileInfo += (\"Data File: \" + dataFileName + \"\\n\");\n fileInfo += (\"Target Gene Set(s) File: \" + targetGeneSetFileName + \"\\n\");\n fileInfo += (\"Class Label File: \" + sampleClassInformationFileName + \"\\n\");\n fileInfo += (\"Number of Gene Sets: \" + listOfTargetGeneSets.size() + \"\\n\");\n fileInfo += (\"Number of Threads: \" + numberOfThreads + \"\\n\\n\");\n \n // log command line options, in verbatim \n fileInfo += concatStrings(commandLine) + \"\\n\\n\";\n \n fileInfo += (\"Name: \\tCollection: \\tSize: \\tURL: \\tJS Divergence: \\tP-Value: \\t#Permutations: \\tGenes: \\n\");\n try {\n \t// TODO: need to come up with a better way to assign the output file name.\n String fileName = targetGeneSetFileName.substring(0, targetGeneSetFileName.indexOf(\".gmt\")) + \"_output.txt\";\n \n File file = new File(fileName);\n \n output = new BufferedWriter(new FileWriter(file));\n output.write(fileInfo);\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n\n }", "private void initializeData() {\n String[] sportsList = getResources().getStringArray(R.array.track_title);\n String[] sportsInfo = getResources().getStringArray(R.array.track_category);\n\n // Clear the existing data (to avoid duplication).\n mSportsData.clear();\n\n TypedArray trackImageResources =\n getResources().obtainTypedArray(R.array.track_image);\n\n // Create the ArrayList of Sports objects with titles and\n // information about each sport.\n for (int i = 0; i < sportsList.length; i++) {\n for (int j = 0; j < workout.size(); j++) {\n if (workout.get(j).equals(sportsList[i])) {\n mSportsData.add(new Track(sportsList[i], sportsInfo[i], trackImageResources.getResourceId(i, 0)));\n }\n }\n }\n\n // Notify the adapter of the change.\n mAdapter.notifyDataSetChanged();\n\n trackImageResources.recycle();\n }", "public void setDataTest() {\n\n for(int i=0;i<10;i++){\n LocalDate date = DateHelper.getPastDate(i);\n\n for(int j=0;j<3;j++){\n Enums.MealTime time = Enums.MealTime.Breakfast;\n if(j==0) time = Enums.MealTime.Breakfast;\n if(j==1)time = Enums.MealTime.Lunch;\n if(j==2)time = Enums.MealTime.Dinner;\n\n for(int k=0;k<2;k++) {\n final LocalDate d = date;\n final Enums.MealTime t = time;\n FirebaseDBMenuDataHelper.getMenuData(Enums.RestaurantName.CafeVentanas, DateHelper.getCurrentDate(), time,\n new FirebaseDBCallaback<ArrayList<MenuEntity>>() {\n @Override\n public void getData(ArrayList<MenuEntity> data) {\n int ran = (int)(Math.random()*data.size());\n FirebaseDBUserDataHelper.setStatisticsData(d, t,data.get(ran));\n }\n });\n }\n }\n }\n /*\n MenuEntity ent = new MenuEntity();\n ent.setName(\"TTasdsda0\");\n ent.setPrice(200);\n FirebaseDBUserDataHelper.setStatisticsData(DateHelper.getCurrentDate(),ent);\n */\n }", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public void createCountModel (){\n System.out.println(gameNumber);\n for (int i = 0; i<gameNumber; i++){\n String winner = \"w\";\n int numOfstepsCompleted= 0;\n Connection conn = null;\n Statement stmt = null;\n try{\n //STEP 2: Register JDBC driver\n //System.out.println(\"Registered JDBC driver...\");\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n //STEP 23: Open a connection\n //System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);//acceses the database specified by the url through entering in the username and password\n //System.out.println(\"Creating statement...\");\n stmt = conn.createStatement(); //access the database server and manipulate data in database\n String sql = \"SELECT * FROM EXPERIENCE_\"+(i);\n ResultSet rs1 = stmt.executeQuery(sql);\n // System.out.println(\"sweeeeeeeeeet....\");\n while (rs1.next()){//gets the winner and total number of stepsCompleted\n System.out.println(\".\");\n if (rs1.getString(3)==null||rs1.getInt(3)==-1){\n System.out.println(\"SWAGGGG!!\");\n winner = rs1.getString(2);\n numOfstepsCompleted = rs1.getInt(1);\n }\n }\n rs1.close();\n ResultSet rs = stmt.executeQuery(sql);\n while (rs.next()){//develops list of occurrences of specific moves\n //System.out.print(\"\\n\" + rs.getInt(1)+\"\\t\");\n //System.out.print(rs.getString(2)+\": \"+rs.getInt(3)+\" \" +rs.getInt(4));\n \n\n if (rs.getString(2).equals(winner)){ //records popularity of small squares for winner depending on the stage of game (first 3rd, second 3rd, or last third)\n System.out.println(\"IT'S ME!!!\\n\\n\\n\\n\\\\n\\n\\n\\n\");\n if (rs.getInt(1)<(int)numOfstepsCompleted/3)\n popSsquare.get(0).set(rs.getInt(4), popSsquare.get(0).get(rs.getInt(4))+1);\n if((rs.getInt(1)<(int)2*numOfstepsCompleted/3)&&(rs.getInt(1)>numOfstepsCompleted/3))\n popSsquare.get(1).set(rs.getInt(4), popSsquare.get(1).get(rs.getInt(4))+1);\n if(rs.getInt(1)>(int)2*numOfstepsCompleted/3)\n popSsquare.get(2).set(rs.getInt(4), popSsquare.get(2).get(rs.getInt(4))+1);\n }\n }\n rs.close();\n \n stmt.close();\n conn.close(); \n }catch(SQLException se){\n //Handle errors for JDBC\n se.printStackTrace();\n }catch(Exception e){\n //Handle errors for Class.forName\n e.printStackTrace();\n }finally{\n //finally block used to close resources\n try{\n if(stmt!=null)\n stmt.close();\n }catch(SQLException se2){\n }// nothing we can do\n try{\n if(conn!=null)\n conn.close();\n }catch(SQLException se){\n se.printStackTrace();\n }//end finally try\n }//end try\n }//end for\n \n }", "private void processComputerPlayerTurns(Player computerPlayer)\n {\n Random random = new Random();\n String result;\n int doctor_size = computerPlayer.getDoctors().size();\n for(int i = 0; i < doctor_size; i++)\n {\n Doctor doctor = computerPlayer.getDoctors().get(i);\n int actionIndex = random.nextInt(5);\n switch(actionIndex)\n {\n case 0:\n doctor.goTraining(computerPlayer);\n result = \"Computer player : \" + \"After training:\\n\" + doctor + \"\\n\";\n printResult.add(result);\n doctor.endTurn();\n break;\n\n case 1:\n String name = computerPlayer.getName()+\"Doctor\"+game.turns; //newly recruited doctor name will be the string playerName+\"Doctor\"+turnNumber, for example \"JaneDoctor3\".\n doctor.recruitDoctor( computerPlayer, name);\n int size = computerPlayer.getDoctors().size();\n result = \"Computer player : \" + \"A new doctor is recruited \" + computerPlayer.getDoctors().get(size - 1) + \"\\n\";\n printResult.add(result);\n doctor.endTurn();\n break;\n case 2:\n int dept_num = random.nextInt(3);\n Department dept = computerPlayer.getDepartments().get(dept_num);\n if (dept != null)\n {\n doctor.upgradeDepartment( computerPlayer, dept);\n result = \"Computer player : \" + doctor.getName() + \" upgraded \" + dept.getName() + \"\\n\";\n printResult.add(result);\n }\n doctor.endTurn();\n break;\n case 3:\n int dept_num_3 = random.nextInt(3);\n Department dept_3 = computerPlayer.getDepartments().get(dept_num_3);\n if (dept_3 != null)\n {\n doctor.transferToDepartment(dept_3);\n result = \"Computer player : \" + doctor.getName() + \" transfers to \" + dept_3.getName() + \"\\n\";\n printResult.add(result);\n }\n doctor.endTurn();\n break;\n case 4:\n computerPlayer.collectMoney(doctor.raiseFund());\n doctor.endTurn();\n result = \"Computer player : \" + doctor.getName() + \" raise fund\";\n printResult.add(result);\n break;\n }\n doctor.endTurn();\n\n }\n }", "private void fillObservationsDataFast() {\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n// int variateCount = this.workbookStudy.getVariates().size();\n \n List<String> factorsReturn = getFactoresReturnList();\n \n fillFactorLabelDataOptimized(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n \n// List<Measurement> measurementList = workbookStudy.getMeasurements();\n \n// log.info(\"Getting Data Trial ...\");\n// List<Object> dataList;\n// if(! workbookStudy.getVariates().isEmpty()){\n// dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n// }else{\n// dataList = new ArrayList<Object>();\n// }\n// log.info(\"Getting Data Trial Done...\");\n// \n// \n// log.info(\"Getting List of Obsunit ...\");\n// List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n// log.info(\"Getting List of Obsunit...\");\n// int rowIndex = 0;\n// for (Obsunit obsUnit : obsunits) {\n// Measurement measurement = measurementList.get(rowIndex);\n// measurement.initMeasurementData(variateCount);\n//\n// assignMeasurementData(measurement, obsUnit, dataList);\n// rowIndex++;\n// }\n }", "public Statistic() {\n\t\tstats = new ArrayList<PlayerStatEntry>();\n\t\tteamScore = new HashMap<Integer, Integer>();\n\t}", "public void initData(SceneManager sceneManager) throws ParseException {\n\t\tthis.manager = sceneManager;\n\t\tHungarian_Algorithm h2 = new Hungarian_Algorithm(manager.sdController.TableView.getItems());\n\t\tShowDataController h1 = manager.sdController;\n\t\t\n\t\tint numOfRows = h1.TableView.getItems().size();// Integer.parseInt(h1.TextFieldNoOfTrip.getText());\n\t\tint numOfCols = 2;\n\t\tdouble[][] array = new double[numOfRows][numOfCols];\n\t\tint[][] assignment = new int[array.length][2];\n\t\th2.generateSuitableLayoverTime(array);\n\t\t\n\t\tlabelCityOne.setText(h2.BasedCityOne);\n\t\tlabelCityTwo.setText(h2.BasedCityTwo);\n\t\tlabelCityThree.setText(h2.BasedCityTwo);\n\t\tlabelCityFour.setText(h2.BasedCityOne);\n\t\t\n\t\tfor (int i = 0; i < manager.sdController.dataBeans.size(); i++) {\n\t\t\tDataBeam1 beam1 = manager.sdController.dataBeans.get(i);\n\t\t\tTableView1.getItems().add(\n\t\t\t\t\tnew DataBeam4(i + 1, beam1.getTextFieldBusDeperatureTime1(), beam1.getTextFieldBusArrivalTime1()));\n\t\t}\n\t\tfor (int i = 0; i < manager.sdController.dataBeans.size(); i++) {\n\t\t\tDataBeam1 beam1 = manager.sdController.dataBeans.get(i);\n\t\t\tTableView2.getItems().add(\n\t\t\t\t\tnew DataBeam4(i + 1+TableView1.getItems().size(), beam1.getTextFieldBusDeperatureTime2(), beam1.getTextFieldBusArrivalTime2()));\n\t\t}\n\t\tObservableList<String[]> row1 = FXCollections.observableArrayList(); // To add calculateTableOne in Hungarian\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Algorithm\n\t\trow1.clear();\n\t\tString[] leastLayoverTime = manager.sdController.dataBeans.get(0).getTextFieldLeastLayoverTime().split(\":\");\n\t\tdouble LeastLayoverTime = Double.valueOf(leastLayoverTime[0] + '.' + leastLayoverTime[1]);\n\t\tdouble[][] TableOne = new double[numOfRows][numOfRows];\n\t\tString[][] TableOneString = new String[numOfRows][numOfRows];\n\t\tTableOne = h2.calculateTableOne(LeastLayoverTime);\n\t\tfor (int i = 0; i < h2.array1.length; i++) {\n\t\t\tfor (int j = 0; j < h2.array1.length; j++) {\n\t\t\t\tTableOneString[i][j] = String.valueOf(TableOne[i][j]);\n\t\t\t}\n\t\t}\n\n\t\trow1.addAll(Arrays.asList(TableOneString));\n\n\t\tfor (int i = 0; i < TableOneString.length; i++) {\n\t\t\tTableColumn tc1 = new TableColumn(String.valueOf(i+1));\n\t\t\tfinal int colNo = i;\n\t\t\ttc1.setCellValueFactory(new Callback<CellDataFeatures<String[], String>, ObservableValue<String>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic SimpleStringProperty call(CellDataFeatures<String[], String> p) {\n\t\t\t\t\treturn new SimpleStringProperty((p.getValue()[colNo]));\n\t\t\t\t}\n\t\t\t});\n\t\t\ttc1.setPrefWidth(90);\n\t\t\tTableView3.getColumns().add(tc1);\n\t\t}\n\n\t\tTableView3.setItems(row1);\n\n\t\tObservableList<String[]> row2 = FXCollections.observableArrayList();// To add TableView 4 into calculateTableTwo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in Hungarian Algorithm\n\t\trow2.clear();\n\t\tdouble[][] TableTwo = new double[numOfRows][numOfRows];\n\t\tString[][] TableTwoString = new String[numOfRows][numOfRows];\n\t\tTableTwo = h2.calculateTableTwo(LeastLayoverTime);\n\t\tfor (int i = 0; i < h2.array2.length; i++) {\n\t\t\tfor (int j = 0; j < h2.array2.length; j++) {\n\t\t\t\tTableTwoString[i][j] = String.valueOf(TableTwo[i][j]);\n\t\t\t}\n\t\t}\n\n\t\trow2.addAll(Arrays.asList(TableTwoString));\n\n\t\tfor (int i = 0; i < TableTwoString.length; i++) {\n\t\t\tTableColumn tc2 = new TableColumn(String.valueOf(i+1));\n\t\t\tfinal int colNo = i;\n\t\t\ttc2.setCellValueFactory(new Callback<CellDataFeatures<String[], String>, ObservableValue<String>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic SimpleStringProperty call(CellDataFeatures<String[], String> p) {\n\t\t\t\t\treturn new SimpleStringProperty((p.getValue()[colNo]));\n\t\t\t\t}\n\t\t\t});\n\t\t\ttc2.setPrefWidth(90);\n\t\t\tTableView4.getColumns().add(tc2);\n\t\t}\n\n\t\tTableView4.setItems(row2);\n\n\t\tObservableList<String[]> row3 = FXCollections.observableArrayList();// To add TableView 4 into calculateTableTwo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in Hungarian Algorithm\n\t\trow3.clear();\n\t\tdouble[][] TableThree = new double[numOfRows][numOfRows];\n\t\tString[][] TableThreeString = new String[numOfRows][numOfRows];\n\t\tTableThree = h2.SelectSuitableIdleTime(TableOne, TableTwo);\n\t\tfor (int i = 0; i < h2.array1.length; i++) {\n\t\t\tfor (int j = 0; j < h2.array1.length; j++) {\n\t\t\t\tTableThreeString[i][j] = String.valueOf(TableThree[i][j]);\n\t\t\t}\n\t\t}\n\n\t\trow3.addAll(Arrays.asList(TableThreeString));\n\n\t\tfor (int i = 0; i < TableThreeString.length; i++) {\n\t\t\tTableColumn tc3 = new TableColumn(String.valueOf(i+1));\n\t\t\tfinal int colNo = i;\n\t\t\ttc3.setCellValueFactory(new Callback<CellDataFeatures<String[], String>, ObservableValue<String>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic SimpleStringProperty call(CellDataFeatures<String[], String> p) {\n\t\t\t\t\treturn new SimpleStringProperty((p.getValue()[colNo]));\n\t\t\t\t}\n\t\t\t});\n\t\t\ttc3.setPrefWidth(90);\n\t\t\tTableView5.getColumns().add(tc3);\n\t\t}\n\n\t\tTableView5.setItems(row3);\n\t}", "private void loadData (){\n\t\tImageView profilepict = (ImageView) findViewById(R.id.profilepict);\t\t\n\t\tTextView nickname = (TextView) findViewById(R.id.nickname);\n\t\tTextView alliance = (TextView) findViewById(R.id.alliance);\n\t\tTextView level = (TextView) findViewById(R.id.level);\n\t\tTextView dollars = (TextView) findViewById(R.id.bedollars);\n\t\tTextView bescore = (TextView) findViewById(R.id.salary);\n\t\tLinearLayout contestsContainer = (LinearLayout) findViewById(R.id.contests);\n\t\tif(currentPlayer.getUser() != null){\t\t\t\n\t\t\tprofilepict.setTag(currentPlayer.getUser().getUserimg());\n\t\t\timageManager.displayImage(currentPlayer.getUser().getUserimg(), context, profilepict);\t\t\t\n\t\t\tnickname.setText(currentPlayer.getUser().getNickname());\n\t\t\tlevel.setText(getContext().getString(R.string.profileLevel)+fromIntToLevel(currentPlayer.getUser().getLevel()));\n\t\t\tdollars.setText(\"Bedollars: \"+currentPlayer.getUser().getBedollars());\n\t\t\tbescore.setText(\"Bescore: \"+currentPlayer.getUser().getBescore());\n\t\t}else{\n\t\t\tnickname.setText(\"Player\");\n\t\t\tlevel.setVisibility(View.INVISIBLE);\n\t\t\tdollars.setVisibility(View.INVISIBLE);\n\t\t\tprofilepict.setImageResource(R.drawable.profbt);\n\t\t}\n\t\tif(currentPlayer.getAlliance() != null){\n\t\t\talliance.setText(currentPlayer.getAlliance().getName());\n\t\t}else{\n\t\t\talliance.setVisibility(View.GONE);\n\t\t}\t\t\t\n\t\t\n\t\tMap<String, PlayerScore> playerScore = currentPlayer.getPlayerScore();\n\t\t\n\t\tif(playerScore != null) { // THE USER HAS SCORES FOR THE APP\n\t\t\tIterator<?> it = playerScore.entrySet().iterator();\n\t\t while (it.hasNext()) {\t\t\t \t\n\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\tMap.Entry<String, PlayerScore> pairs = (Map.Entry<String, PlayerScore>) it.next();\n\t\t if(pairs.getValue().getContest().isPublic()){\n\t\t\t PlayerScore pscore = pairs.getValue();\n\t\t\t \n\t\t\t LinearLayout contestsRow = new LinearLayout(getContext());\n\t\t\t LinearLayout contestsNameFeed = new LinearLayout(getContext());\n\t\t\t LinearLayout contests = new LinearLayout(getContext());\n\t\t\t LinearLayout grayLine = new LinearLayout(getContext());\n\t\t\t LinearLayout grayLine2 = new LinearLayout(getContext());\n\t\t\t \n\t\t\t contestsRow.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contestsRow.setOrientation(LinearLayout.VERTICAL);\n\t\t\t contestsNameFeed.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contestsNameFeed.setOrientation(LinearLayout.VERTICAL);\t\t\n\t\t\t contestsNameFeed.setPadding(12,5,0,5);\n\t\t\t contestsNameFeed.setBackgroundDrawable(new BDrawableGradient(0,(int)(ratio*27),BDrawableGradient.GRAY_GRADIENT));\t\t\t \n\t\t\t contests.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\t contests.setOrientation(LinearLayout.HORIZONTAL);\t\t\n\t\t\t contests.setPadding(12,5,0,5);\n\t\t\t grayLine.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,1));\n\t\t\t grayLine.setBackgroundColor(Color.parseColor(\"#8F9193\"));\t\t\t \n\t\t\t grayLine2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,1));\n\t\t\t grayLine2.setBackgroundColor(Color.parseColor(\"#8F9193\"));\n\t\t\t \n\t\t\t \n\t\t\t TextView contestName = new TextView(getContext());\t\t\t\t \n\t\t\t TextView feedData = null;\n\t\t\t TextView totalScore = new TextView(getContext());\n\t\t\t TextView lastScore = new TextView(getContext());\n\t\t\t TextView bestScore = new TextView(getContext());\n\t\t\t \n\t\t\t contestName.setText(pscore.getContest().getName());\n\t\t\t contestName.setTextColor(Color.BLACK);\t \t\t\t \n\t\t\t contestsNameFeed.addView(contestName);\n\t\t\t \n\t\t\t String feed = pscore.getContest().getFeed();\t\t\t \n\t\t\t if(feed != null){\n\t\t\t \tfeedData = new TextView(getContext());\n\t\t\t \tfeedData.setTextColor(Color.parseColor(\"#6E6E6E\"));\t \t\t\t \t\t\t\t\t \n\t\t\t \tfeedData.setText(feed);\n\t\t\t \tcontestsNameFeed.addView(feedData);\n\t\t\t \tcontestsNameFeed.setBackgroundDrawable(new BDrawableGradient(0,(int)(ratio*60),BDrawableGradient.GRAY_GRADIENT));\n\t\t\t }\n\t\t\t \n\t\t\t //totalScore.setPadding(15,5,0,5);\n\t\t\t totalScore.setText(getContext().getString(R.string.profileTotalScore)+pscore.getBalance());\n\t\t\t totalScore.setTextSize(12);\n\t\t\t totalScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \n\t\t\t lastScore.setPadding(10,0,0,0);\n\t\t\t lastScore.setText(getContext().getString(R.string.profileLastScore)+pscore.getLastscore());\n\t\t\t lastScore.setTextSize(12);\n\t\t\t lastScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \n\t\t\t bestScore.setPadding(10,0,0,0);\n\t\t\t bestScore.setText(getContext().getString(R.string.profileBestScore)+pscore.getBestscore());\n\t\t\t bestScore.setTextSize(12);\n\t\t\t bestScore.setTextColor(Color.parseColor(\"#545859\"));\n\t\t\t \t\t\t\t \n\t\t\t \n\t\t\t contestsRow.addView(contestsNameFeed);\n\t\t\t contestsRow.addView(grayLine);\n\t\t\t contests.addView(totalScore);\t\t\t \n\t\t\t contests.addView(lastScore);\n\t\t\t contests.addView(bestScore);\n\t\t\t contestsRow.addView(contests);\n\t\t\t contestsRow.addView(grayLine2);\n\t\t\t \n\t\t\t contestsContainer.addView(contestsRow);\t\t\t \n\t\t }\n\t\t }\n\t\t}else { // NO SCORES FOR THE APP\n\t\t\tif(currentSection == CURRENT_USER_PROFILE){\n\t\t\t\tTextView noScores = new TextView(getContext());\n\t\t\t\tnoScores.setText(getContext().getString(R.string.profileNoScores));\n\t\t\t\tnoScores.setPadding(5,10,0,2);\n\t\t\t\tnoScores.setTextColor(Color.BLACK);\n\t\t\t\tcontestsContainer.addView(noScores);\t\n\t\t\t}\n\t\t} \n\t\t\n\t\tLinearLayout mc = (LinearLayout) findViewById(R.id.maincontainer);\n\t\tLinearLayout l = (LinearLayout) findViewById(R.id.loading);\n\t\tmc.removeView(l);\t\t\n\t\tLinearLayout gc = (LinearLayout) findViewById(R.id.goodcontent);\n\t\tgc.setVisibility(LinearLayout.VISIBLE);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tint numSets = 10000;//10000;//500\r\n\t\tint numElements = 1000;//1000; //50\r\n\t\t\r\n//\t\tint[] betas = {2, 4, 8, 16, 32};\r\n//\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg2.txt\", \"scpnrg5.txt\"};\r\n//\t\tString[] probfiles = {\"scpnrh1.txt\", \"scpnrh3.txt\", \"scpnrh5.txt\"};\r\n\t\tint[] betas = {5};\r\n\t\tString[] probfiles = {\"scpnrg1.txt\", \"scpnrg5.txt\"};\r\n\t\tint numTimesRun = 1;\r\n\t\tint runningTime = 10;\r\n\t\tPrintWriter printWriter = new PrintWriter(new File(\"tuning_testIII.csv\"));\r\n\t\tfor(String dataset: probfiles){\r\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\t\tfor(int beta: betas){\r\n\t\t\t\tfor(int i =0 ; i<numTimesRun; i++){\r\n\t\t\t\tDataObject data = new DataObject((\"src/\" + dataset), numSets);\r\n\t\t\t\tGRASP1 grasp = new GRASP1(numElements, numSets, data.getSets());\r\n\t\t\t\tint solution = grasp.run(runningTime, beta);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstringBuilder.append(\"Profiles: \" + \";\" + dataset + \";\");\r\n\t\t\t\tstringBuilder.append(\"The beta value: \" + \";\" + beta + \";\");\r\n\t\t\t\tstringBuilder.append(\"ItrationCount\" + \";\" + grasp.itrationCount + \";\");\r\n\t\t\t\tstringBuilder.append(\"Solution value: \" + \";\" + solution + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprintWriter.write(stringBuilder.toString());\r\n\t\t}\r\n\t\tprintWriter.close();\r\n\t\tSystem.out.println(\"done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\");\r\n\r\n\t}", "public void setUpData() {\n generalStatsCalculator.calculateOffsetTrees();\n this.MostEmissionsRouteString =\n RoutesArrayToString(routeStatsCalculator.getMostEmissionsRoutes());\n this.LeastEmissionsRouteString =\n RoutesArrayToString(routeStatsCalculator.getLeastEmissionsRoutes());\n this.MostDistanceRouteString =\n RoutesArrayToString(routeStatsCalculator.getMostDistanceRoutes());\n this.LeastDistanceRouteString =\n RoutesArrayToString(routeStatsCalculator.getLeastDistanceRoutes());\n this.MostVisitedSourceAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getMostVisitedSrcAirports());\n this.LeastVisitedSourceAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getLeastVisitedSrcAirports());\n this.MostVisitedDestAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getMostVisitedDestAirports());\n this.LeastVisitedDestAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getLeastVisitedDestAirports());\n numOfTreesToString(generalStatsCalculator.getTreesToGrow());\n generalStatsCalculator.createCarbonEmissionsComment();\n }", "public void updateDataModel() {\n //this.dataModel = new TelemetryChartDataModel();\n this.dataModel.\n setModel(getStartDate(), getEndDate(), selectedProjects, telemetryName, parameters);\n Thread thread = new Thread() {\n @Override\n public void run() {\n dataModel.loadData();\n }\n };\n thread.start();\n }", "private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}", "public Tournament(){\n simplePlayer = new SimpleFakeGinRummyPlayer(new ParamList(new double[]{}));\n\n knockOnGinPlayer = new EnsembleHandEvalPlayer(ParamList.getRandomParamList(1), new DeadwoodHandEvaluator());\n knockOnGinPlayer.setKnockDecider(new KnockOnGinKnockDecider() );\n knockOnGinPlayer.setDrawDecider(new MeldOnlyDrawDecider());\n\n ExperimentalRuns.fixTwoStageKnockDecider101();\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_EARLY, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_LATE, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_MIDDLE, 6);\n ParamList.setFixedValue(ParamList.TS_DRAW_MIDDLE, 14);\n ParamList paramOfTunedTwoStagePlayer = ParamList.getRandomParamList(1);\n System.out.println(paramOfTunedTwoStagePlayer);\n tunedTwoStagePlayer = new IndexEnsembleHandEvalPlayer(paramOfTunedTwoStagePlayer, new DeadwoodHandEvaluator());\n tunedTwoStagePlayer.setKnockDecider(new TwoStageKnockDecider(paramOfTunedTwoStagePlayer) );\n tunedTwoStagePlayer.setDrawDecider(new MeldOnlyDrawDecider());\n tunedTwoStagePlayer.setDrawDecider(new TwoStageDrawDecider(paramOfTunedTwoStagePlayer));\n\n resultSimpleVsKnockGin = 0;\n resultKnockGinVsTwoStage = 0;\n resultTwoStageVsSimple = 0;\n\n numGamePerPair = 2000;\n\n }", "private void exportData() throws Exception{\n logger.info(\"Beginning export task...\");\n // Set up some maps to hold summary data\n Map<String, Integer> mostCommonCodeFirst = new HashMap<>();\n Map<String, Integer> mostCommonCodeSecond= new HashMap<>();\n Map<String, Integer> mostCommonCodeThird = new HashMap<>();\n\n // Get the delimiters\n StillFaceCode delim1 = null;\n StillFaceCode delim2 = null;\n\n for(StillFaceCode c : StillFaceModel.getCodeList()){\n if(c.getDelimiterIndex() == 1){\n delim1 = c;\n }\n else if(c.getDelimiterIndex() == 2){\n delim2 = c;\n }\n }\n\n // Collect the summary data\n int delimiterIndex = 0;\n for(StillFaceData data : StillFaceModel.getInstance().getVisibleDataList()){\n // Code stats\n String codeName = data.getCode().getName();\n if(data.getCode().getDelimiterIndex() > delimiterIndex){\n delimiterIndex = data.getCode().getDelimiterIndex();\n }\n // Get the common code counts for each video segment\n switch(delimiterIndex){\n case 0:\n if(mostCommonCodeFirst.containsKey(codeName)){\n int count = mostCommonCodeFirst.get(codeName);\n mostCommonCodeFirst.put(codeName, count + 1);\n }\n else{\n mostCommonCodeFirst.put(codeName, 1);\n }\n break;\n\n case 1:\n if(mostCommonCodeSecond.containsKey(codeName)){\n int count = mostCommonCodeSecond.get(codeName);\n mostCommonCodeSecond.put(codeName, count + 1);\n }\n else{\n mostCommonCodeSecond.put(codeName, 1);\n }\n break;\n\n case 2:\n if(mostCommonCodeThird.containsKey(codeName)){\n int count = mostCommonCodeThird.get(codeName);\n mostCommonCodeThird.put(codeName, count + 1);\n }\n else{\n mostCommonCodeThird.put(codeName, 1);\n }\n break;\n\n\n }\n\n }\n // Count everything up\n List<StillFaceCodeCount> firstCounts = new ArrayList<>();\n List<StillFaceCodeCount> secondCounts = new ArrayList<>();\n List<StillFaceCodeCount> thirdCounts = new ArrayList<>();\n for(Map.Entry<String, Integer> entry : mostCommonCodeFirst.entrySet()){\n firstCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n for(Map.Entry<String, Integer> entry : mostCommonCodeSecond.entrySet()){\n secondCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n for(Map.Entry<String, Integer> entry : mostCommonCodeThird.entrySet()){\n thirdCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n // Sort the counts\n Collections.sort(firstCounts);\n Collections.sort(secondCounts);\n Collections.sort(thirdCounts);\n // Write them to a file\n StillFaceCSVParser parser = new StillFaceCSVParser();\n List<List<StillFaceCodeCount>> summaryList = new ArrayList<>();\n summaryList.add(firstCounts);\n summaryList.add(secondCounts);\n summaryList.add(thirdCounts);\n boolean success = parser.serializeToCSVFromCodedVideoData(\n new StillFaceVideoData(StillFaceModel.getInstance().getVisibleDataList()), this.filepath)\n && parser.serializeSummaryToCSVFromLists(delim1, delim2, summaryList, this.summaryFilepath);\n if(!success){\n logger.warning(\"Export failed\");\n throw new Exception(\"Failed to export data. See log for more information.\");\n }\n }", "private static CategoryDataset createDataset() throws SQLException, InterruptedException \n\t{ \n\t\t// creating dataset \n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\t\n\t\t//setting up the connexion\n\t\tConnection con = null;\n\t\tString conUrl = \"jdbc:sqlserver://\"+Login.Host+\"; databaseName=\"+Login.databaseName+\"; user=\"+Login.user+\"; password=\"+Login.password+\";\";\n\t\ttry \n\t\t{\n\t\t\tcon = DriverManager.getConnection(conUrl);\n\t\t} \n\t\tcatch (SQLException e1) \n\t\t{\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\t//this counter will allow me to run my while loop only once\n\t\tint cnt=0;\n\t\twhile(cnt<1)\n\t\t{ \n\t\t\t//check the query number at each call to the function in order to know which procedure must me executed\n\t\t\tif (queryNumber==0){\n\t\t\t\tcnt++;\n\t\t\t\tcstmt = con.prepareCall(\"{call avgMonthly(?,?,?,?)}\");\n\t\t\t\t\n\t\t\t\t//setting the procedures parameters with the one chosen by the user\n\t\t\t\tcstmt.setInt(1, Integer.parseInt(year));\n\t\t\t\tcstmt.setInt(2, Integer.parseInt(month));\n\t\t\t\tcstmt.setString(3, featureStringH);\t\n\t\t\t\tcstmt.setString(4, actionStringH);\t\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t// extracting the data of my query in order to plot it\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);//latency\n\t\t\t\t\t\tint dayAxisNum=aveTempAvg.getInt(2);//average\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//Adding the result of the query to the data set and setting y value to the average latency and x to the corresponding day\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(dayAxisNum));\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\tdataset.setValue(0, (\"series\" +\"\"+0), \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (queryNumber==1){\n\t\t\t\tcnt++;\n\t\t\t\tcstmt = con.prepareCall(\"{call avgDaily(?,?,?)}\");\t\n\t\t\t\t/*for the second query , the user will enter seperate year month and day \n\t\t\t\t so we wil have to concatenate the date into a string before setting the date value*/\n\t\t\t\tString newDate= year+\"-\"+month+\"-\"+day;\n\t\t\t\tcstmt.setString(1, newDate);\n\t\t\t\tcstmt.setString(2, featureStringH);\n\t\t\t\tcstmt.setString(3, actionStringH);\t\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t//extracting the data of the query\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\tint hour = 0;\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);\n\t\t\t\t\t\tint hour2=aveTempAvg.getInt(2);\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//setting y value to the average and the x is the corresponding hour\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(hour2));\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\t//I will add 0 if I don't have the corresponding value of the specified Hour\n\t\t\t\t\t\t\tdataset.setValue(0, (\"series\" +\"\"+hour), \"\");\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\telse if (queryNumber==2){\n\t\t\t\tcnt++;\n\t\t\t\t//Thread.sleep(100);\n\t\t\t\tcstmt = con.prepareCall(\"{call avgHour(?,?,?,?)}\");\t\n\t\t\t\tString newDate2= year+\"-\"+month+\"-\"+day;\n\t\t\t\t//same as for the daily query we have to set the parameters , we add to that the hour as last parameter\n\t\t\t\tcstmt.setString(1, newDate2);\n\t\t\t\tcstmt.setString(2, featureStringH);\n\t\t\t\tcstmt.setString(3, actionStringH);\n\t\t\t\tcstmt.setInt(4,Integer.parseInt(hourString));\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t//extract the data from the query\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);\n\t\t\t\t\t\tint min=aveTempAvg.getInt(2);\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//setting y value to the average and the x is the corresponding minute\n\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(min));\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\t//adding 0 if I don't have the corresponding minute\n\t\t\t\t\t\t\tdataset.setValue(0, (\"series\"+min),\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn dataset; \n\t}", "private void insertSportDataFromJson(String scoreJsonStr) throws JSONException {\n\n // These are the names of the JSON objects that need to be extracted.\n\n final String EVENT_DATE = \"events_date\";\n\n final String OSB_AWAY_TEAM = \"away_team\";\n\n final String OSB_HOME_TEAM = \"home_team\";\n\n final String AWAY_PERIOD_SCORES = \"away_period_scores\";\n\n final String HOME_PERIOD_SCORES = \"home_period_scores\";\n\n //final String TABLE_NAME = \"team\";\n final String OSB_TEAM_ID = \"team_id\";\n final String OSB_FIRST_NAME_TEAM = \"first_name\";\n final String OSB_LAST_NAME_TEAM = \"last_name\";\n final String OSB_ABBREVIATION = \"abbreviation\";\n final String OSB_SITE_NAME = \"site_name\";\n final String OSB_CITY = \"city\";\n final String OSB_STATE = \"state\";\n\n final String OSB_EVENT = \"event\";\n final String OSB_EVENT_ID = \"event_id\";\n final String OSB_EVENT_START_DATE = \"start_date_time\";\n final String OSB_EVENT_STATUS = \"event_status\";\n final String STATUS_COMPLETED = \"completed\";\n\n\n final String OSB_FULL_NAME = \"full_name\";\n final String OSB_AWAY_POINT_SCORED = \"away_points_scored\";\n final String OSB_HOME_POINT_SCORED = \"home_points_scored\";\n\n try {\n JSONObject scoreJson = new JSONObject(scoreJsonStr);\n\n JSONArray scoreArray = scoreJson.getJSONArray(OSB_EVENT);\n\n String eventDate = scoreJson.getString(EVENT_DATE);\n\n Vector<ContentValues> cVVector = new Vector<ContentValues>(scoreArray.length());\n\n // String[] resultStrs = new String[scoreArray.length()];\n for (int i = 0; i < scoreArray.length(); i++) {\n\n String awayTeam;\n String homeTeam;\n\n String teamId;\n String firstName;\n String lastName;\n String abbreviation;\n String city;\n String state;\n String siteName;\n\n String eventId;\n String eventStartDate;\n String eventStatus;\n\n int[] awayPeriodsArray = new int[4];\n int[] homePeriodsArray = new int[4];\n\n int awayPointScored;\n int homePointScored;\n\n JSONObject dayScoreboard = scoreArray.getJSONObject(i);\n\n eventId = dayScoreboard.getString(OSB_EVENT_ID);\n eventStartDate = dayScoreboard.getString(OSB_EVENT_START_DATE);\n eventStatus = dayScoreboard.getString(OSB_EVENT_STATUS);\n\n //final score\n awayPointScored = dayScoreboard.getInt(OSB_AWAY_POINT_SCORED);\n homePointScored = dayScoreboard.getInt(OSB_HOME_POINT_SCORED);\n\n JSONObject awayTeamObject = dayScoreboard.getJSONObject(OSB_AWAY_TEAM);\n\n if (eventStatus.equals(STATUS_COMPLETED)) {\n JSONArray awayScoresArray = dayScoreboard.getJSONArray(AWAY_PERIOD_SCORES);\n for (int j = 0; j < awayScoresArray.length(); j++) {\n awayPeriodsArray[j] = awayScoresArray.getInt(j);\n }\n\n JSONArray homeScoresArray = dayScoreboard.getJSONArray(HOME_PERIOD_SCORES);\n for (int k = 0; k < awayScoresArray.length(); k++) {\n homePeriodsArray[k] = homeScoresArray.getInt(k);\n }\n }\n teamId = awayTeamObject.getString(OSB_TEAM_ID);\n firstName = awayTeamObject.getString(OSB_FIRST_NAME_TEAM);\n lastName = awayTeamObject.getString(OSB_LAST_NAME_TEAM);\n abbreviation = awayTeamObject.getString(OSB_ABBREVIATION);\n city = awayTeamObject.getString(OSB_CITY);\n state = awayTeamObject.getString(OSB_STATE);\n siteName = awayTeamObject.getString(OSB_SITE_NAME);\n long IdTeamAway = addTeam(teamId, firstName, lastName, abbreviation, city, state, siteName);\n awayTeam = awayTeamObject.getString(OSB_FULL_NAME);\n\n ///-----------------------------------------------------\n JSONObject homeTeamObject = dayScoreboard.getJSONObject(OSB_HOME_TEAM);\n teamId = homeTeamObject.getString(OSB_TEAM_ID);\n firstName = homeTeamObject.getString(OSB_FIRST_NAME_TEAM);\n lastName = homeTeamObject.getString(OSB_LAST_NAME_TEAM);\n abbreviation = homeTeamObject.getString(OSB_ABBREVIATION);\n city = homeTeamObject.getString(OSB_CITY);\n state = homeTeamObject.getString(OSB_STATE);\n siteName = homeTeamObject.getString(OSB_SITE_NAME);\n long IdTeamHome = addTeam(teamId, firstName, lastName, abbreviation, city, state, siteName);\n homeTeam = homeTeamObject.getString(OSB_FULL_NAME);\n\n ContentValues eventValues = new ContentValues();\n\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_EVENT_ID, eventId);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_EVENT_DATE, ScoreUtil.getCurrentDate());\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_EVENT_STATUS, eventStatus);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_START_DATE_TIME, eventStartDate);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_AWAY_TEAM_ID_KEY, IdTeamAway);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_HOME_TEAM_ID_KEY, IdTeamHome);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_AWAY_PERIOD_FIRTS, awayPeriodsArray[0]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_AWAY_PERIOD_SECOND, awayPeriodsArray[1]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_AWAY_PERIOD_THIRD, awayPeriodsArray[2]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_AWAY_PERIOD_FOURTH, awayPeriodsArray[3]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_HOME_PERIOD_FIRTS, homePeriodsArray[0]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_HOME_PERIOD_SECOND, homePeriodsArray[1]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_HOME_PERIOD_THIRD, homePeriodsArray[2]);\n eventValues.put(ScoreboardContract.EventEntry.COLUMN_HOME_PERIOD_FOURTH, homePeriodsArray[3]);\n\n\n cVVector.add(eventValues);\n }\n int inserted = 0;\n // add to database\n if (cVVector.size() > 0) {\n ContentValues[] cvArray = new ContentValues[cVVector.size()];\n cVVector.toArray(cvArray);\n inserted = getContext().getContentResolver().bulkInsert(ScoreboardContract.EventEntry.CONTENT_URI, cvArray);\n }\n\n\n Log.d(LOG_TAG, \"FetchWeatherTask Complete. \" + inserted + \" Inserted\");\n\n }catch (JSONException e){\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n }\n }", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "public interface DataStats {\n \n // publicly accessible methods - replaces original properties\n \n /***************************************************************************\n * Gets the channel number for these stats\n *\n * @return the channel number\n **************************************************************************/\n public int GetChannel();\n \n /***************************************************************************\n * Sets the channel number for these stats\n *\n * @param channel The channel number\n **************************************************************************/\n public void SetChannel(int channel); \n \n /***************************************************************************\n * Gets the date for these stats\n *\n * @return the date\n **************************************************************************/ \n public Date GetDate();\n\n /***************************************************************************\n * Sets the date for these stats\n *\n * @param date The date\n **************************************************************************/ \n public void SetDate(Date date);\n \n /***************************************************************************\n * Gets time type\n *\n * @return time type - TRUE for hourly stats, FALSE for daily stats\n **************************************************************************/ \n public boolean GetHourly();\n \n /***************************************************************************\n * Sets time type \n *\n * @param hourly The time type - TRUE for hourly stats, FALSE for daily stats \n **************************************************************************/ \n public void SetHourly(boolean hourly); \n \n /***************************************************************************\n * Gets the number of points used to make these statistics\n *\n * @return the number of points\n **************************************************************************/ \n public int GetNPoints();\n \n /***************************************************************************\n * Sets the number of points used to make these statistics\n *\n * @param n_points The number of points\n **************************************************************************/ \n public void SetNPoints(int n_points);\n\n /***************************************************************************\n * Gets the number of points missing\n *\n * @return the number of points\n **************************************************************************/ \n public int GetNMissing();\n \n /***************************************************************************\n * Sets the number of points missing\n *\n * @param n_missing The number of points\n **************************************************************************/ \n public void SetNMissing(int n_missing);\n\n /***************************************************************************\n * Gets the minimum value \n *\n * @return the minimum value\n **************************************************************************/ \n public int GetMinVal();\n\n /***************************************************************************\n * Sets the minimum value\n *\n * @param min_val The minimum value\n **************************************************************************/ \n public void SetMinVal(int min_val);\n \n /***************************************************************************\n * Gets the maximum value\n *\n * @return the maximum value\n **************************************************************************/ \n public int GetMaxVal();\n\n /***************************************************************************\n * Sets the maximum value\n *\n * @param max_val The maximum value\n **************************************************************************/ \n public void SetMaxVal(int max_val);\n\n /***************************************************************************\n * Gets the average\n *\n * @return the average\n **************************************************************************/ \n public double GetAverage();\n\n /***************************************************************************\n * Sets the average\n *\n * @param average The average\n **************************************************************************/ \n public void SetAverage(double average);\n\n /***************************************************************************\n * Gets the standard deviation\n *\n * @return the standard deviation\n **************************************************************************/ \n public double GetStandardDev();\n\n /***************************************************************************\n * Sets the standard deviation\n *\n * @param standard_dev The standard deviation\n **************************************************************************/ \n public void SetStandardDev(double standard_dev);\n \n}", "private void initializeStatisticVariables(){\r\n\t\taverageFront9Score = 0;\r\n\t\taverageFront9PlusMinus = 0;\r\n\t\taverageBack9Score = 0;\r\n\t\taverageBack9PlusMinus = 0;\r\n fairways = 0;\r\n girs = 0;\r\n putts = 0;\r\n chips = 0;\r\n penalties = 0;\r\n\t\tnumberOfHoles = 0;\r\n\t\tnumberOfPar3Holes = 0;\r\n\t\tnumberOfPar4Holes = 0;\r\n\t\tnumberOfPar5Holes = 0;\r\n\t\talbatrossCount = 0;\r\n\t\teagleCount = 0;\r\n\t\tbirdieCount = 0;\r\n\t\tparCount = 0;\r\n\t\tbogeyCount = 0;\r\n\t\tdoubleBogeyCount = 0;\r\n\t\ttripleBogeyCount = 0;\r\n\t\tquadBogeyPlusCount = 0;\r\n par3Fairways = 0;\r\n par3Girs = 0;\r\n par3Putts = 0;\r\n par3Chips = 0;\r\n par3Penalties = 0;\r\n\t\tpar3EagleCount = 0;\r\n\t\tpar3BirdieCount = 0;\r\n\t\tpar3ParCount = 0;\r\n\t\tpar3BogeyCount = 0;\r\n\t\tpar3DoubleBogeyCount = 0;\r\n\t\tpar3TripleBogeyCount = 0;\r\n\t\tpar3QuadBogeyPlusCount = 0;\r\n par4Fairways = 0;\r\n par4Girs = 0;\r\n par4Putts = 0;\r\n par4Chips = 0;\r\n par4Penalties = 0;\r\n\t\tpar4AlbatrossCount = 0;\r\n\t\tpar4EagleCount = 0;\r\n\t\tpar4BirdieCount = 0;\r\n\t\tpar4ParCount = 0;\r\n\t\tpar4BogeyCount = 0;\r\n\t\tpar4DoubleBogeyCount = 0;\r\n\t\tpar4TripleBogeyCount = 0;\r\n\t\tpar4QuadBogeyPlusCount = 0;\r\n par5Fairways = 0;\r\n par5Girs = 0;\r\n par5Putts = 0;\r\n par5Chips = 0;\r\n par5Penalties = 0;\r\n\t\tpar5AlbatrossCount = 0;\r\n\t\tpar5EagleCount = 0;\r\n\t\tpar5BirdieCount = 0;\r\n\t\tpar5ParCount = 0;\r\n\t\tpar5BogeyCount = 0;\r\n\t\tpar5DoubleBogeyCount = 0;\r\n\t\tpar5TripleBogeyCount = 0;\r\n\t\tpar5QuadBogeyPlusCount = 0;\r\n clubs.clear();\r\n\t}", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "void initiateWork(String[] data) throws IOException {\n\n int choice = Integer.parseInt(data[0]);\n\n if (choice == 3) {\n String graph = data[1];\n String query = data[2];\n graph = \"/Users/shobhitgarg/Documents/GraphDB5/\" + graph;\n query = \"/Users/shobhitgarg/Downloads/Proteins/Proteins/query/\" + query;\n graphFile = new File(graph);\n readQueryGraph(true, new File(query), -1);\n findSearchOrder();\n findMatchings(true);\n findSearchOrder();\n System.out.println(\"Number of matchings: \" + numSubgraphs);\n }\n else if(choice == 2) {\n String graph = \"/Users/shobhitgarg/Documents/GraphDB5/yeastIgraph\";\n String query = \"/Users/shobhitgarg/Downloads/iGraph/yeast_q10.igraph\";\n int queryID = Integer.parseInt(data[1]);\n graphFile = new File(graph);\n readQueryGraph(false, new File(query), queryID);\n findSearchOrder();\n findMatchings(false);\n System.out.println(\"Number of matchings: \" + numSubgraphs);\n }\n else {\n // choice == 1\n String graph = \"/Users/shobhitgarg/Documents/GraphDB5/humanIgraph\";\n String query = \"/Users/shobhitgarg/Downloads/iGraph/human_q10.igraph\";\n int queryID = Integer.parseInt(data[1]);\n graphFile = new File(graph);\n readQueryGraph(false, new File(query), queryID);\n findSearchOrder();\n findMatchings(false);\n System.out.println(\"Number of matchings: \" + numSubgraphs);\n\n }\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\t\tdata = null;\t\t //clear the memory\r\n\t\t\t\tread(\"core_dataset.csv\");\t\t//read back the data\r\n\t\t\t\twrite(\"young_employee.csv\"); //write the data to another file\r\n\t\t\t}", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public IndexData generateIndexData(String orgId, String toolId, String projectId) {\n\n\t\tArrayList<ScoreCardDTO> scData = null;\n\t\tArrayList<IndexKPIData> kpiList = null;\n\t\tIndexKPIData kpiData = null;\n\n\t\tlogger.debug(\"generateIndexData: The input Parameters {\" + orgId + \",\" + toolId + \",\" + projectId + \"}\");\n\t\tIndexData indexData = new IndexData();\n\t\tindexData.setTitle(\"SST Brexit Index \");\n\t\tindexData.setType(\"Guage\");\n\t\tindexData.setDescription(\n\t\t\t\t\"SST Brexit Index (Combined Factor Score) is one of the Key Performance Indicator (KPI) expressed as a percentage score against the benchmark\");\n\n\t\t/*\n\t\t * ScoreCardDao scoreCardDao =\n\t\t * DataServiceFactory.getDaoFactoryInstance().getScoreCardDao(); //scData =\n\t\t * scoreCardDao.getSSTIndexKPIData(orgId, toolId, projectId); ScoreCardSearchDTO\n\t\t * srchData = populateSearchDataForKPIIndex(orgId, toolId, projectId); scData =\n\t\t * scoreCardDao.getScoreCardDetails(srchData);\n\t\t * \n\t\t * logger.debug(\" KPI Index Data from DB \" + scData.toString());\n\t\t * \n\t\t * kpiList = new ArrayList<>(); for (Iterator iterator = scData.iterator();\n\t\t * iterator.hasNext();) { ScoreCardDTO dbData = (ScoreCardDTO) iterator.next();\n\t\t * kpiData = new IndexKPIData(); if\n\t\t * (CommonConstants.RESPONSE_METRIC.equalsIgnoreCase(dbData.getDimensionType()))\n\t\t * { kpiData.setKpiName(dbData.getMetricName() + \" \" +\n\t\t * dbData.getResponseMetricData().getResponseMetricName()); } else {\n\t\t * kpiData.setKpiName(dbData.getMetricName()); }\n\t\t * kpiData.setKpiValue(dbData.getMetricValue());\n\t\t * kpiData.setKpiBenchmark(dbData.getBenchMark());\n\t\t * populateIndexStaticData(kpiData); kpiList.add(kpiData); }\n\t\t * \n\t\t * indexData.setKpiData(kpiList);\n\t\t */\n\n\t\tScoreCardSearchDTO searchdata = populateSearchDataForIndex(orgId, toolId, projectId);\n\t\tIndexKPIData indexStaticData = populateIndexStaticData();\n\t\tindexData = indexDashboardService.generateIndexData(searchdata, indexData, indexStaticData);\n\t\tlogger.debug(\"generateIndexData: Index data from the index service \" + indexData);\n\n\t\twriteToFileAndUpdateDashboard(indexData, orgId, toolId, projectId, CommonConstants.SSTBR_KPIINDEX_DASHBOARD_ID);\n\t\tlogger.debug(\"generateIndexData: Completed Writing the index json file for SST Brexit in the specified folder\");\n\n\t\treturn indexData;\n\t}", "public static void main(String[] args) {\n HoodieHiveConfiguration apiConfig =\n HoodieHiveConfiguration.newBuilder().hadoopConfiguration(new Configuration())\n .hivedb(\"tmp\").hiveJdbcUrl(\"jdbc:hive2://localhost:10010/\").jdbcUsername(\"hive\")\n .jdbcPassword(\"hive\").build();\n\n HoodieDatasetReference datasetReference =\n new HoodieDatasetReference(\"clickstream\", \"hdfs:///data/tables/user.clickstream\",\n \"raw\");\n\n // initialize the strategies\n PartitionStrategy partitionStrategy = new DayBasedPartitionStrategy();\n SchemaStrategy schemaStrategy = new ParseSchemaFromDataStrategy();\n\n // Creates a new dataset which reflects the state at the time of creation\n HoodieHiveDatasetSyncTask datasetSyncTask =\n HoodieHiveDatasetSyncTask.newBuilder().withReference(datasetReference)\n .withConfiguration(apiConfig).partitionStrategy(partitionStrategy)\n .schemaStrategy(schemaStrategy).build();\n\n // Sync dataset\n datasetSyncTask.sync();\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 void generateDemoData() {\n for (int values = 0; values < votersAmt.size(); values++) {\n int n = votersAmt.get(values),\n m = candidatesAmt.get(values);\n for (int game = 1; game <= 20; game++) {\n try {\n String gameContent = \"\";\n for (int i = 0; i < n; i++) {\n // Mapping values so that voters can vote each candidate strictly once.\n List<String> candidatesPerVoter = new ArrayList<String>();\n for (int j = 0; j < m; j++) {\n int x = ThreadLocalRandom.current().nextInt(1, m);\n while (candidatesPerVoter.contains(\"C\"+x)) x = ThreadLocalRandom.current().nextInt(1, m + 1);\n candidatesPerVoter.add(\"C\" + x);\n }\n for (String candidate : candidatesPerVoter) {\n gameContent += (candidate + \" \");\n }\n if (i < n - 1) gameContent += \"\\n\";\n }\n\n String writingPolicy = \"plurality\";\n PrintWriter pw1 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw1.write(writingPolicy + \"\\n\" + gameContent); pw1.flush(); pw1.close();\n\n writingPolicy = \"borda\";\n PrintWriter pw2 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw2.write(writingPolicy + \"\\n\" + gameContent); pw2.flush(); pw2.close();\n } catch (FileNotFoundException exc) {\n System.err.println(\"Error writing file to disk; please check relevant permissions.\");\n exc.printStackTrace();\n }\n }\n }\n }", "public ParticipationOutcomeData addParticipationOutcomeData(ParticipationOutcomeData outcome, Integer createdByUserPk) \n { \n Connection con = null;\n PreparedStatement ps1 = null;\n PreparedStatement ps2 = null;\n Integer outcomePk = null;\n \n try {\n\n con = DBUtil.getConnection();\n \n // DEBUG\n if (logger.isDebugEnabled())\n logger.debug(\"Insert statement: [\" + SQL_INSERT_PARTICIPATION_CD_OUTCOMES + \"] \");\n\n // insert into Participation_Cd_Outcomes\n ps1 = con.prepareStatement(SQL_INSERT_PARTICIPATION_CD_OUTCOMES);\n\n //set the values to insert\n ps1.setString(1, outcome.getOutcomeNm());\n DBUtil.setNullableVarchar(ps1, 2, outcome.getDescription());\n ps1.setInt(3, createdByUserPk.intValue());\n ps1.setInt(4, createdByUserPk.intValue()); \n outcomePk = DBUtil.insertAndGetIdentity(con, ps1);\n \n //if successful, set the pk\n outcome.setOutcomePk(outcomePk);\n \n // DEBUG\n if (logger.isDebugEnabled())\n logger.debug(\"Insert statement: [\" + SQL_INSERT_PARTICIPATION_DTL_OUTCOMES + \"] \");\n \n // insert the association of detail to outcome in the Participation_Dtl_Outcomes...\n ps2 = con.prepareStatement(SQL_INSERT_PARTICIPATION_DTL_OUTCOMES);\n ps2.setInt(1, outcome.getDetailPk().intValue());\n ps2.setInt(2, outcomePk.intValue());\n \n // insert into Participation_Dtl_Outcomes\n ps2.executeUpdate();\n \n } catch (SQLException e) {\n throw new EJBException(\"Error inserting participation outcomes in MaintainParticipationGroupsBean.addParticipationOutcomeData()\", e);\n } finally {\n DBUtil.cleanup(null, ps1, null);\n DBUtil.cleanup(con, ps2, null);\n }\n \n //return the outcome data with new PK\n return outcome;\n }", "private void populateTable() {\n Collections.sort(this.player.arr, new SortByLevel());\n achievementLabel.setText(player.toString() + \" at \" + new SimpleDateFormat(\"dd/MM/yy HH:mm:ss\").format(new Date()));\n for(int i = 0; i < this.player.arr.size(); i++) {\n Achievement temp = this.player.arr.get(i);\n resultsTable.addRow(new Object[] {temp.getDescription(), temp.getLevel(), temp.getOutOfPossible()});\n }\n }", "public Matchdata(Match match, long _matchID, String _summonerName, long _playerID)\n {\n matchID = _matchID;\n summonerName = _summonerName;\n playerID = _playerID;\n\n \n participantID = getIdentityFromSummonerID(match);\n totalGoldEachMinute = goldEachMinute(match, participantID);\n minutes = totalGoldEachMinute.length;\n \n individualGEM = new int[totalGoldEachMinute.length];\n for(int i = totalGoldEachMinute.length-1; i>0; i--)\n {\n individualGEM[i] = totalGoldEachMinute[i]-totalGoldEachMinute[i-1];\n }\n individualGEM[0] = totalGoldEachMinute[0];\n \n \n totalCreepsEachMinute = creepsEachMinute(match, participantID);\n \n individualCEM = new int[totalCreepsEachMinute.length];\n for(int i = totalCreepsEachMinute.length-1; i>0; i--)\n {\n individualCEM[i] = totalCreepsEachMinute[i]-totalCreepsEachMinute[i-1];\n }\n individualCEM[0] = totalCreepsEachMinute[0];\n \n \n \n gpm = totalGoldEachMinute[totalGoldEachMinute.length-1]/totalGoldEachMinute.length;\n cpm = totalCreepsEachMinute[totalCreepsEachMinute.length-1]/totalCreepsEachMinute.length;\n \n //get(participantID-1) might seem weird, but it's how getParticipants is stored.\n victory = match.getParticipants().get(participantID-1).getStats().getWinner();\n champion = match.getParticipants().get(participantID-1).getChampionID();\n time = match.getCreation().getTime();\n \n lane = match.getParticipants().get(participantID-1).getTimeline().getLane();\n role = match.getParticipants().get(participantID-1).getTimeline().getRole();\n \n roleSanity = sanityCheck(match);\n \n map = match.getMap();\n \n }", "@Test\n\tpublic void armarGananciasDeLosResultantes() {\n\t\t/*\n\t\t * me salieron 24 arboles, que me interesan los campos \n\t\t * NodeID_24 : para saber que hoja del arbol fue \n\t\t * PredictedProbability_2_24 : para saber que probabilidad de baja mas 2 fue \n\t\t * SampleAssignment_24 : para saber si fue tomado para test o train tengoq ue correr el script siguient para persistirlo en la DB\n\t\t * \n\t\t * los nombres de las variables van como anteriorlmente , el inicial no\n\t\t * tiene subindice, pero se lo cambi oy le pongo 0 cosa de que arranque\n\t\t * en 0\nIF (A_default_prob >= 0.025 AND clase_int=2) A_default_ganancia=7800. \nEXECUTE. \nRECODE A_default_ganancia (SYSMIS=-200). \nEXECUTE.\n\nSAVE TRANSLATE /TYPE=ODBC \n /CONNECT='DSN=dmkd-dmf;' \n /ENCRYPTED \n /MISSING=RECODE \n /SQL='CREATE TABLE historico_201503_default_tree_result (numero_de_cliente double , foto_mes double , A_default_node double , A_default_prob double, A_default_ganancia double )' \n /REPLACE \n /TABLE='SPSS_TEMP' \n /KEEP=numero_de_cliente, foto_mes, A_default_node, A_default_prob ,A_default_ganancia\n /SQL='INSERT INTO historico_201503_default_tree_result (numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia) SELECT numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia FROM SPSS_TEMP' \n /SQL='DROP TABLE SPSS_TEMP'. \nEXECUTE.\nDATASET CLOSE.\nEXECUTE.\n\n\nPredictedProbability_2_24\n\t\t * \n\t\t */\n\t\t// de 0 a 24\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tString outFolder = ArbolFileSources.userFolder + \"/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_2_dm_finanzas/entregable/historia/\";\n\t\tString timeStampFolder = UtilidadesGenerales.getTimeStamp(null, null);\n\t\tStringBuilder build = new StringBuilder();\n\t\tfor (int i = 0; i < 25; i++) {\n\t\t\t\n\t\t\tString nombreProba = \"PredictedProbability_2_\"+i;\n\t\t\tString nombreGanancia= \"ganancia_\"+i;\n\t\t\tString nombreNodo= \"NodeID_\"+i;\n\t\t\tString nombreTrain= \"SampleAssignment_\"+i;\n\t\t\tString nombreTabla = \"corridaCiega_\"+i;\n\t\t\t\n\t\t\t/* recode de ganancia */\n\t\t\tbuild.append(\"IF (PredictedProbability_2_\").append(i).append(\" >= 0.025 AND clase_int=2 ) ganancia_\").append(i).append(\"=7800.\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\tbuild.append(\"RECODE ganancia_\").append(i).append(\"(SYSMIS=-200).\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\t\n\t\t\t \n\t\t\t/* save sql */\n\t\t\tbuild.append(\"SAVE TRANSLATE /TYPE=ODBC\").append(separator);\n\t\t\tbuild.append(\"/CONNECT='DSN=dmkd-dmf;'\").append(separator);\n\t\t\tbuild.append(\"/ENCRYPTED \").append(separator);\n\t\t\tbuild.append(\"/MISSING=RECODE \").append(separator);\n\t\t\tbuild.append(\"/SQL='CREATE TABLE \").append(nombreTabla).append(\" (numero_de_cliente double , foto_mes double , '+\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" double ) '\").append(separator);\n\t\t\t\n \n\t\t\tbuild.append(\"/REPLACE \").append(separator);\n\t\t\tbuild.append(\"/TABLE='SPSS_TEMP' \").append(separator);\n\t\t\tbuild.append(\"/KEEP=numero_de_cliente, foto_mes, \").append(separator);\n\t\t\tbuild.append(nombreProba).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreGanancia).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreNodo).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreTrain).append(\" \").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='INSERT INTO \").append(nombreTabla).append(\" (numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' ) SELECT numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' FROM SPSS_TEMP'\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='DROP TABLE SPSS_TEMP'.\").append(separator); \n\t\t\tbuild.append(\"EXECUTE.\").append(separator).append(separator);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tUtilidadesGenerales.writeToFile(build.toString(), \"UTF-8\", outFolder + timeStampFolder + \"_syntax_corridaCiega_.txt\");\n\t}", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public MOData ( Individual program, int id ) {\n\n this.ID = id;\n this.program = program;\n\n int length = param.Parameters.FITNESS_FUNCTIONS.size();\n\n BufferedImage img = getImage();\n\n Response r = new Response(img);\n double fitn[];\n\n this.fitness = new double[length];\n this.raw = new double[length];\n this.ranks = new int[length];\n\n // Calculates fitnesses\n for ( int i = 0; i < length; i++ ) {\n FitnessFunction f =\n ((FitnessFunction)param.Parameters.FITNESS_FUNCTIONS.get(i));\n fitn = f.calculateFitness(r, img, param.Parameters.SOURCE);\n fitness[i] = fitn[0];\n raw[i] = fitn[1];\n }\n\n stats();\n \n }", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void experimenterAndPlotter() {\n\t\tfinal RewardFunction rf = new GoalBasedRF(this.goalCondition, 5., -0.1);\n\n\t\t/**\n\t\t * Create factories for Q-learning agent and SARSA agent to compare\n\t\t */\n\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\t@Override\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"Q-learning\";\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, rf, tf, 0.99, hashingFactory, 0.3,\n\t\t\t\t\t\t0.1);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory sarsaLearningFactory = new LearningAgentFactory() {\n\n\t\t\t@Override\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"SARSA\";\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new SarsaLam(domain, rf, tf, 0.99, hashingFactory, 0.0,\n\t\t\t\t\t\t0.1, 1.);\n\t\t\t}\n\t\t};\n\n\t\tStateGenerator sg = new ConstantStateGenerator(this.initialState);\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\t\t(SADomain) this.domain, rf, sg, 10, 100, qLearningFactory,\n\t\t\t\tsarsaLearningFactory);\n\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOSTRECENTANDAVERAGE,\n\t\t\t\tPerformanceMetric.CUMULATIVESTEPSPEREPISODE,\n\t\t\t\tPerformanceMetric.AVERAGEEPISODEREWARD);\n\n\t\texp.startExperiment();\n\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}" ]
[ "0.56398886", "0.5506892", "0.5467642", "0.54291594", "0.52089196", "0.5200063", "0.51492625", "0.51392215", "0.5138189", "0.5074356", "0.5073695", "0.50708395", "0.50635195", "0.5037151", "0.5029214", "0.4941646", "0.49386463", "0.49074188", "0.4899089", "0.48798686", "0.48673496", "0.4857735", "0.48456368", "0.48413128", "0.48247838", "0.47868133", "0.47812504", "0.47675347", "0.47667652", "0.47614747", "0.47530302", "0.4749638", "0.47382256", "0.47352302", "0.4732255", "0.4721871", "0.47145543", "0.47114334", "0.47107473", "0.4708243", "0.4706501", "0.46980634", "0.46936327", "0.46877727", "0.46855527", "0.46785045", "0.46707737", "0.4666226", "0.46539077", "0.4651987", "0.464494", "0.46433103", "0.46389338", "0.46328846", "0.463105", "0.46272478", "0.46267667", "0.46218905", "0.46190402", "0.46187967", "0.4618161", "0.4614475", "0.4610913", "0.46073633", "0.46069288", "0.4594246", "0.45913032", "0.45680884", "0.4563192", "0.45562592", "0.45526707", "0.45486575", "0.4548242", "0.4547594", "0.45392758", "0.4535412", "0.4534377", "0.45340183", "0.45323884", "0.4530431", "0.4523278", "0.45225108", "0.45205557", "0.45174146", "0.45162082", "0.4509755", "0.45087618", "0.45081535", "0.44965914", "0.44908014", "0.44896743", "0.44852453", "0.4477467", "0.44761094", "0.44739577", "0.4473054", "0.4472616", "0.44717643", "0.44673952", "0.44669616" ]
0.46850204
45
Main method that creates Application frame, centers it on the screen, and makes the chart visible. Main method is known to be the class' application entry point
public static void main(String[] args) { expNum = Integer.parseInt(args[0]); LineChart chart = new LineChart( "Line Graph of Agent Pay-Off vrs Tournament"); /** Title Modified from original code **/ chart.pack(); // resize the window to fit the graph RefineryUtilities.centerFrameOnScreen(chart); // display chart on screen chart.setVisible(true); // show the chart }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main (String args[]){\n\t\tJFrame application = new JFrame();\r\n\t\tapplication.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tPendulumDemo gui = new PendulumDemo();\r\n\r\n\t\tapplication.setLayout(new GridLayout(1,2));\r\n\t\tapplication.add(gui.scopePanel);\r\n\t\tapplication.add(gui.graphicsPanel);\r\n\t\tapplication.setSize (1200, 900); // (width, height)\r\n\t\tapplication.setVisible(true);\r\n\r\n\t\tAnimator animator = new Animator(gui);\r\n\t\tanimator.run();\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tBarcharPhone chart = new BarcharPhone(null);\r\n\t\tchart.renderBarChart();\r\n\t\tchart.pack( ); \r\n\t RefineryUtilities.centerFrameOnScreen( chart ); \r\n\t chart.setVisible( true ); \r\n\t}", "public static void main(String[] args) {\n\n OverlaidBarChartDemo demo = new OverlaidBarChartDemo(\"Overlaid Bar Chart Demo\");\n demo.pack();\n RefineryUtilities.centerFrameOnScreen(demo);\n demo.setVisible(true);\n\n }", "public static void main(String[] args) {\n\t\tJFrame frame = new JFrame();\n\t\t// TwinLineChartPanel twinLineChartPanel = new TwinLineChartPanel();\n\t\t// frame.add(twinLineChartPanel);\n\t\tframe.setSize(400, 500);\n\t\tframe.setVisible(true);\n\t}", "public static void main(String[]args){\n JFrame frame = new JFrame(\"Pie Chart\"); \n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n Pie chart1 = new Pie();\n frame.getContentPane().add (chart1);\n frame.pack();\n frame.setVisible(true);\n }", "public JFrame displayChart() {\n final JFrame frame = new JFrame(\"dds\");\n\n // Schedule a job for the event-dispatching thread:\n // creating and showing this application's GUI.\n try {\n javax.swing.SwingUtilities.invokeAndWait(new Runnable() {\n\n @Override\n public void run() {\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n // XChartPanel<XYChart> chartPanel = new XChartPanel<XYChart>(charts.get(0));\n //() chartPanels.add(chartPanel);\n // frame.add(chartPanel);\n\n // Display the window.\n frame.setName(\"Динаміка системи\");\n frame.pack();\n frame.setVisible(true);\n }\n });\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n\n return frame;\n }", "public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void start(){\n JmeFormatter formatter = new JmeFormatter();\n\n Handler consoleHandler = new ConsoleHandler();\n consoleHandler.setFormatter(formatter);\n\n Logger.getLogger(\"\").removeHandler(Logger.getLogger(\"\").getHandlers()[0]);\n Logger.getLogger(\"\").addHandler(consoleHandler);\n \n createCanvas(appClass);\n \n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n \n SwingUtilities.invokeLater(new Runnable(){\n public void run(){\n JPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\n createFrame();\n \n //currentPanel.add(canvas, BorderLayout.CENTER);\n mMainFrame.pack();\n startApp();\n mMainFrame.setLocationRelativeTo(null);\n mMainFrame.setVisible(true);\n }\n });\n \n \n }", "public static void main( String args[] )\n\t{\n\t\tmainFrame = getInstance();\n\t\tmainFrame.setVisible( true );\n\t\t\n\t}", "public Main(){\n \tsetSize(new Dimension(1024, 768));\n \t\n \t//setUndecorated(true); // borderless (fullscreen) window\n \tsetExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); // maximize window\n \t\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(\"Game\");\n setLocationRelativeTo(null); // center on screen\n\n \tContentLoader.LoadContent();\n init();\n start();\n }", "private void initialize() {\n\t\tfrmcCharts = new JFrame();\n\t\tfrmcCharts.setTitle(\"8C Charts\");\n\t\tfrmcCharts.setBounds(100, 100, 775, 487);\n\t\tfrmcCharts.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(SystemColor.activeCaption);\n\t\tfrmcCharts.getContentPane().add(panel, BorderLayout.CENTER);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJLabel lblWelcomeToc = new JLabel(\"Welcome to 8C Charts\");\n\t\tlblWelcomeToc.setFont(new Font(\"Tahoma\", Font.BOLD, 20));\n\t\tlblWelcomeToc.setBounds(239, 42, 242, 35);\n\t\tpanel.add(lblWelcomeToc);\n\t\t\n\t\tJButton btnWorkBreakdownTree = new JButton(\"Work Breakdown Tree\");\n\t\tbtnWorkBreakdownTree.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n//\t\t\t\tWBT.main(null);\n\t\t\t\tchartType = \"WBT\";\n//\t\t\t\tframe.dispose();\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnWorkBreakdownTree.setBounds(26, 119, 187, 45);\n\t\tpanel.add(btnWorkBreakdownTree);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"PERT Chart\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tchartType = \"PERT\";\n//\t\t\t\tframe.dispose();\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(26, 188, 187, 45);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJButton btnGanttChart = new JButton(\"GANTT Chart\");\n\t\tbtnGanttChart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tchartType = \"GANTT\";\n\t\t fileLoader.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnGanttChart.setBounds(26, 259, 187, 45);\n\t\tpanel.add(btnGanttChart);\n\t\t\n\t\tTextArea textArea = new TextArea();\n\t\ttextArea.setEditable(false);\n\t\ttextArea.setBounds(239, 88, 510, 309);\n\t\tpanel.add(textArea);\n\t\ttextArea.setText(\"Welcome to 8C Charts\\r\\n\\r\\n8C Charts can create the perfect charts for all you project planning or schedueling \\r\\nneeds.\\r\\n\\r\\nThis application will allow you to create the following charts:\\r\\n\\r\\nWork Breakdown Tree (WBT):\\r\\n\\t\\r\\nThis diagram is to shows the main tasks that needs to be done and the sub task of \\r\\neach of the main tasks. It will order the tasks in priority of what needs to be done \\r\\nbefore another.\\r\\n\\r\\nPERT Chart:\\r\\n\\r\\nThis chart will have a diagram with all the different task that needs to be done. \\r\\nNext to the task it will also have the start and end dates for which the task \\r\\nneeds to be completed. It will also show you what tasks can be done at the same\\r\\ntime as other tasks and what has to be done before certain task can be started.\\r\\n\\r\\nGANTT Chart:\\r\\n\\r\\nThis chart shows a time line length for different tasks and how long each task will\\r\\ntake. It will also have all the information that the PERT Chart has but includes lines\\r\\nshowing the lastest start and finish time of each task.\\r\\n\\r\\n\");\n\t\t\n\t\tJButton btnDonate = new JButton(\"Donate\");\n\t\tbtnDonate.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t donate.main(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDonate.setBounds(660, 414, 89, 23);\n\t\tpanel.add(btnDonate);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tmenuBar.setToolTipText(\"\");\n\t\tmenuBar.setBounds(0, 0, 759, 21);\n\t\tpanel.add(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\tJMenu mnWbt = new JMenu(\"WBT\");\n\t\tmenuBar.add(mnWbt);\n\t\t\n\t\tJMenu mnCreateNewFile = new JMenu(\"Create New File\");\n\t\tmnWbt.add(mnCreateNewFile);\n\t\t\n\t\tJMenu mnLoadExistingFile = new JMenu(\"Load Existing File\");\n\t\tmnWbt.add(mnLoadExistingFile);\n\t\t\n\t\tJMenu mnPert = new JMenu(\"PERT\");\n\t\tmenuBar.add(mnPert);\n\t\t\n\t\tJMenu mnCreateNewFile_1 = new JMenu(\"Create New File\");\n\t\tmnPert.add(mnCreateNewFile_1);\n\t\t\n\t\tJMenu mnLoadExistingFile_1 = new JMenu(\"Load Existing File\");\n\t\tmnPert.add(mnLoadExistingFile_1);\n\t\t\n\t\tJMenu mnGantt = new JMenu(\"GANTT\");\n\t\tmenuBar.add(mnGantt);\n\t\t\n\t\tJMenu mnCreateNewFile_2 = new JMenu(\"Create New File\");\n\t\tmnGantt.add(mnCreateNewFile_2);\n\t\t\n\t\tJMenu mnLoadExistingFile_2 = new JMenu(\"Load Existing File\");\n\t\tmnGantt.add(mnLoadExistingFile_2);\n\t\t\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tJMenu mnDonate = new JMenu(\"Donate\");\n\t\tmnHelp.add(mnDonate);\n\t\t\n\t\tJMenu mnUserGuide = new JMenu(\"User Guide\");\n\t\tmnHelp.add(mnUserGuide);\n\t}", "public Main(Dimension dim) {\n super(\"Price Watcher\");\n setSize(dim);\n configureUI();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setVisible(true);\n //setResizable(false);\n showMessage(\"Welcome!\");\n pack();\n }", "public static void main( String args[] )\r\n {\r\n\t\t// Create a new frame to hold the canvas and put it up.\r\n\t\tFrame fm = new Frame();\r\n\t\tAnimate b = new Animate();\r\n\r\n\t\t// Make it visible and set size\r\n\t\tb.setVisible(true);\r\n\t\tb.setSize(300, 300);\r\n\t\tSystem.out.println(\"Here we go\");\r\n\r\n\t\t// Add the canvas to the frame and make it show\r\n \t\tfm.add(\"Center\", b);\r\n\t\tfm.pack();\r\n\t\tfm.show();\r\n\r\n }", "public static void drawMain()\n {\n // Draws the title of the program\n UI.setColor(Color.black);\n UI.fillRect(55, 5, 485, 50);\n UI.setColor(Color.white);\n UI.setFontSize(50);\n UI.drawString(\"Movie Recommender\", 60, 50);\n }", "public static void main(String[] args) {\n WeatherApplication gui = new WeatherApplication( );\n \n // make window visible\n gui.setVisible( true );\n \n }", "public MainGUI() {\n\t\tString xmlpath = \"classpath:applicationContext.xml\";\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlpath);\n\t\t\n\t\tcenter = (CenterController)applicationContext.getBean(\"CenterController\");\n\t\t\n\t\tinitialize();\n\t\t\n\t}", "public ScoutingApp(){\n\t\tteamPanel.add(teamsListPanel);\n\t\t\n\t\tmatchPanel.add(matchesListPanel);\n\t\t\n\t\tadd(teamPanel, BorderLayout.WEST);\n\t\tadd(matchPanel, BorderLayout.EAST);\n\t\t\n\t\tsetTitle(\"Scouting Application\");\n\t\tsetSize(1000, 600);\n\t\tsetLocationRelativeTo(null);\n\t\t//setExtendedState(MAXIMIZED_BOTH);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t}", "public static void main(String[] args)\n {\n EventQueue.invokeLater(() ->\n {\n try\n {\n App app = new App();\n app.frame.setVisible(true);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n });\n }", "public static void main (String [] args) {\r\n Shapes2 application = new Shapes2 ();\r\n application.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\r\n }", "public static void main(String[] args) {\n // Start App\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() { new App(); }\n });\n }", "public static void main(String[] a) {\n JFrame frame = new JFrame();\n frame.setSize(400, 400);\n frame.add(new Canvas());\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n }", "public static void main(String[] args) {\r\n MinMaxCategoryPlotDemo1 demo = new MinMaxCategoryPlotDemo1(\r\n \"JFreeChart: MinMaxCategoryPlotDemo1.java\");\r\n demo.pack();\r\n RefineryUtilities.centerFrameOnScreen(demo);\r\n demo.setVisible(true);\r\n }", "public static void main(String[] args) {\n frame.setVisible(true);\n\n // Setting Dimensions\n frame.setSize(screen_width, screen_height);\n\n // Title of the Main Frame\n frame.setTitle(\"Clouds Binary\");\n\n // The close method\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // Adding game Panel into the frame\n frame.add(clouds);\n\n // Setting image Icon\n ImageIcon img_icon = new ImageIcon(\"src\\\\Cloud_Binary\\\\clouds.png\");\n\n // Getting the image preview from the ImageIcon and setting it up\n frame.setIconImage(img_icon.getImage());\n\n // Setting Window resizable to false\n\n }", "public ThongKeHD() {\n initComponents();\n initialization();\n performEvent();\n //drawChart(2021);\n }", "public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public void runCoursesApp() {\n frame = new JFrame(\"Courses\");\n frame.setFont(new Font(\"Proxima Nova\", Font.PLAIN, 13));\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.setForeground(myColor);\n frame.setBackground(myColor);\n frame.setLayout(new BorderLayout());\n\n frame.add(makeUpperPanel(), BorderLayout.NORTH);\n frame.add(makeLowerPanel(), BorderLayout.CENTER);\n\n frame.pack();\n frame.getContentPane().requestFocusInWindow();\n frame.setSize(800, 770);\n frame.setVisible(true);\n }", "public static void main(String[] args) {\n // creating a new window with specified window size\n new Acme.MainFrame(new ReflectingPond(), args, WINDOW_SIZE, WINDOW_SIZE);\n }", "public static void main( String[] args )\n {\n\n new Frame();\n new ThreeDiceApp();\n }", "public JFrameApp() {\n initComponents();\n }", "public Main() {\n initComponents();\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n }", "public MainFrame() {\n initComponents();\n\n mAlmondUI.addWindowWatcher(this);\n mAlmondUI.initoptions();\n\n initActions();\n init();\n\n if (IS_MAC) {\n initMac();\n }\n\n initMenus();\n mActionManager.setEnabledDocumentActions(false);\n }", "public static void main(String[] args)\n {\n JFrame frame = new JFrame();\n \n //create city frame\n frame.setSize(800, 600);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n // a frame contains a single component; create the Cityscape component and add it to the frame\n LogSpiralPanel spiral = new LogSpiralPanel();\n frame.add(spiral);\n \n // make the frame visible which will result in the paintComponent method being invoked on the\n // component.\n frame.setVisible(true);\n }", "public static void main (String[] args)\r\n {\r\n JFrame frame = new JFrame (\"ATM example\");\r\n frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\r\n\r\n MyATMPanel panel = new MyATMPanel ();\r\n \r\n frame.getContentPane().add(panel);\r\n //frame.pack();\r\n frame.setSize(400,400);\r\n frame.setVisible(true);\r\n }", "public static void main(String args []){\n JFrame frame = new JFrame();\n frame.add(new BondControl());\n frame.setVisible(true);\n frame.setSize(870,400);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(() -> {\n\t\t\tTreci jvdraw = new Treci();\n\t\t\tDimension d = jvdraw.getSize();\n\t\t\td.setSize(600, 400);\n\t\t\tjvdraw.setSize(d);\n\t\t\tjvdraw.setVisible(true);\n\t\t\t\n\t\t});\n\t}", "public static void main(String[] args) {\n HandleEvent frame = new HandleEvent();\n frame.setSize(300,300);\n frame.setPanel(frame.getWidth(), frame.getHeight());\n frame.setVisible(true);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);\n \n\t}", "public static void main(String[] args) {\n EventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcCalculadoraDolares window = new cCalculadoraDolares();\r\n\t\t\t\t\twindow.isVisible(true);\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\t\t\t}\r\n\t\t});\r\n }", "public mainGUI() {\n initComponents();\n setSize(Toolkit.getDefaultToolkit().getScreenSize());\n }", "public static void main(String[] args) {\n\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n CommonsHR.setEye(new Point3d(1.35, 1.35, 2.0));\n new CommonsHR.MyGUI(createScene(), \"HR's Lab3\");\n }\n });\n }", "public static void main(String[] args) {\n JFrame jFrame = new JFrame(\"Drawing\");\n jFrame.setSize(new Dimension(600, 600));\n jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n jFrame.add(new ImagePanel());\n jFrame.setLocationRelativeTo(null);\n jFrame.setVisible(true);\n }", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tprinc frame = new princ();\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t\tframe.setTitle(\"Storyteller\");\n\t\t\t\t\t//la ventana no se puede redimensionar\n\t\t\t\t\tframe.setResizable(false);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//falta hacer que la ventana aparezca en el centrode la pantalla\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static void main(String[] args) throws IOException {\r\n\r\n HistogramTest demo = new HistogramTest(\"Histogram Test\");\r\n demo.pack();\r\n //RefineryUtilities.centerFrameOnScreen(demo);\r\n demo.setVisible(true);\r\n\r\n }", "public void main() {\n /* Set the Windows look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Windows\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(FloorDetail.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(FloorDetail.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(FloorDetail.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(FloorDetail.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new FloorDetail(daily, lifetime).setVisible(true);\n }\n });\n }", "public static void main(String[] args){\n\t\tGrid.getInstance(); // Initialize the Grid\r\n\t\tSystem.out.println(\"Grid Created\");\r\n\t\tView view = new View();\r\n\t\tSystem.out.println(\"View Create\");\r\n\t\tview.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tview.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tview.setUndecorated(true);\r\n\t\tMouseController mouseController = \r\n\t\t\t\tnew MouseController();\r\n\t\tRepaintController repaintController = \r\n\t\t\t\tnew RepaintController(view);\r\n\t\t\r\n\t\t// repaint timer so that the window will update every 25 ms\r\n\t new Timer(25, repaintController).start();\r\n\t\t\r\n\t\t/* register other controllers as listeners */\r\n\t\tview.registerListeners(mouseController);\r\n\t\t\r\n\t\t/* start it up */\r\n\t\tview.setVisible(true);\r\n\t}", "public static void main(String[] args)\n {\n f = new JFrame();\n\n f.setTitle(\"STARVATION EVASION\");\n f.setPreferredSize(new Dimension(width, height));\n f.setSize(f.getPreferredSize());\n f.setLocation(0, 0);\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n PanelTester tester = new PanelTester();\n tester.show();\n }", "public static void main(String[] args){\n\t\tGUI_BorderLayout frame = new GUI_BorderLayout();\r\n\t\tframe.setTitle(\"EECS 1570\");\r\n\t\tframe.setSize(500,200);\r\n\t\tframe.setLocationRelativeTo(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setVisible(true);\r\n\t}", "public static void main(String[] args) {\n JFrame frame = new JFrame(\"App\");\n frame.setContentPane(new App().PanelMenu);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n }", "public static void main(String[] args) {\r\n\t\tmanager = new EventManager();\r\n\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tCalenderGui window = new CalenderGui();\r\n\t\t\t\t\twindow.frame.setVisible(true);\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\t\t\t}\r\n\t\t});\r\n\t}", "public MainApp() {\n initComponents();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Main() {\n initComponents();\n this.setLocationRelativeTo(null);\n \n \n }", "public static void main(String[] args){\r\n JFrame frame = new JFrame();\r\n frame.setTitle(\"3D Cube\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \t\r\n // Initializing our objects for the frame\r\n \tcube cb = new cube();\r\n\t\tSimpleCanvas myCanvas = new SimpleCanvas(cb);\r\n\t\txyzRotations xyzPanel = new xyzRotations(cb, myCanvas);\r\n\t\tarbRotation arbPanel = new arbRotation(cb, myCanvas, xyzPanel);\r\n\t\t\r\n\t\t// Setting up the frame.\r\n\t\tContainer cp = frame.getContentPane();\r\n\t\tcp.setLayout(new BorderLayout());\r\n\t\tcp.add(myCanvas, BorderLayout.CENTER);\r\n\t\tcp.add(xyzPanel, BorderLayout.SOUTH);\r\n\t\tcp.add(arbPanel, BorderLayout.EAST);\r\n\t\tframe.setTitle(\"Basic Draw\");\r\n\t\tframe.pack(); //resizes to preferred size for components.\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n }", "public static void main(String[] args) {\n GUIBase mainFrame = new GUIBase();\n mainFrame.DisplayGUI();\n GUIModel mainPanel = new GUIModel();\n mainPanel.addEventHandlers(mainFrame.getFrame());\n GUIHelper.SetDisplay(mainFrame.getFrame(), mainPanel.getContentPanel(), \"Cash For Metals Calculator\");\n }", "public static void main(String args[]) {\n // Container fuer die Anwendung\n JFrame frame = new JFrame(\"Draw2D\"); // mit entspr. Ueberschrift\n // Inhalt der Anwendung erstellen \n // und einhaengen\n frame.getContentPane().add(new Controller(), BorderLayout.CENTER);\n\n // Close-Operation festlegen\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack(); // Groesse der Komponenten bestimmen\n frame.setVisible(true); // Sichtbar machen\n }", "public static void main(String[] args) {\n Main application=new Main();\n application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public void main(String[] args) {\n // TODO code application logic here\n MF= new MainFrame();\n }", "public static void main(String[] args) {\n JFrame win = new JFrame(\"GraphicsDemo1\");\r\n win.setSize(800,600);\r\n win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n GraphicsDemo1 canvas = new GraphicsDemo1();\r\n win.add( canvas );\r\n win.setVisible(true);\r\n }", "public main() {\n initComponents();\n \n }", "public MainSwingApp() {\n \t\tsuper();\n \t\tContext.setState(State.NORMAL);\n \n \t\tthis.map = new JMapViewer();\n \t\tmap.addMouseListener(this);\n \t\tinitiateMainView();\n \t\tinitGUI();\n \t\tif (map.getMapMarkerList().isEmpty()) {\n \t\t\tmap.setDisplayPositionByLatLon(45.430262484682125, 4.3890380859375,\n \t\t\t\t\t11);\n \t\t} else {\n \t\t\tmap.setDisplayToFitMapMarkers();\n \t\t\tmap.setZoom(9);\n \t\t}\n \n \t\t// Sign in\n \t\t// new SignInDialog(this);\n \t}", "public static void main(String[] args) {\n star frame = new star();\n frame.setSize(1000, 1000);\n frame.createGUI();\n frame.setVisible(true);\n frame.setResizable(false);\n }", "public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}", "public void main(@Observes ContainerInitialized event) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n\n setTitle(\"Vier Gewinnt © Kevin Sapper\");\n setResizable(false);\n setPreferredSize(new Dimension(GameConstants.WIDTH, GameConstants.HEIGHT));\n setLayout(new CardLayout());\n // Center frame\n setLocationRelativeTo(null);\n\n initMenu();\n\n cards = getContentPane();\n initGameCard();\n initStartCard();\n\n switchToCard(startCard);\n\n setVisible(true);\n }", "public LeagueChampionApp() {\r\n init();\r\n\r\n main = new JFrame(\"League Champion App\");\r\n main.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n main.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n main.setPreferredSize(new Dimension(938, 950));\r\n main.setLocationRelativeTo(null); //centers in middle of screen\r\n main.getContentPane().setLayout(new BoxLayout(main.getContentPane(), BoxLayout.Y_AXIS));\r\n\r\n startUpMain();\r\n\r\n makeEarnButton();\r\n makePurchaseButton();\r\n makeAcquireButton();\r\n makeObtainButton();\r\n makeCheckBEButton();\r\n makeGetRPButton();\r\n makeReceiveButton();\r\n makeFavouriteButton();\r\n makePrintButton();\r\n makeSaveButton();\r\n makeLoadButton();\r\n\r\n main.pack();\r\n main.setVisible(true);\r\n }", "public static void main(String[] argv) {\r\n new BubbleGraphDemo(new BasicFrame(\"Bubble Graph Demo\"));\r\n }", "public static void main(String[] args) throws IOException, InterruptedException, BrutException {\n \n MainFrame fr = new MainFrame();\n fr.setVisible(true);\n \n }", "public static void main(String[] args) {\n\t \n\t\tJFrame window = new JFrame(\"Gravtity Simulation\");\n\t\t\twindow.setSize(1200, 800);\n\t\t\twindow.setLocationRelativeTo(null);\n\t\t\twindow.setContentPane(new Panel());\n\t\t\twindow.setVisible(true);\n\t\t\twindow.setResizable(false);\n\t\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\n\t}", "public static void main(String[] args) {\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n GUI window = new GUI();\n window.frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public JFrameMain() {\n initComponents();\n \n }", "public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tFrame app = new Frame(\"Santa on Christmas Eve\"); \n\t\t\t}\n\t\t}\n\t\t);\n\t}", "public void show(){\n frame.setContentPane(mainPanel); //puts all our buttons and other objects on the window\n frame.setSize(700, 500);\n frame.setLocationRelativeTo(null); //opens our window in the center of the screen\n frame.setResizable(false);\n frame.setVisible(true); //displays the window\n }", "public static void main(String[] args) {\n //Size of window\n int width = 1000;\n int height = 1100;\n Model m = new Model();\n View v = new View(m);\n Controller c = new Controller(m, v);\n v.setController(c);\n c.init(width, height);\n }", "public static void main(String[] args) {\n\t\t \n\t\tCalculator frame = new Calculator();\n\t\tframe.setVisible(true);\n\t\t\n\t\t\n\t}", "public MainFrame() {\n\t\tsuper(\"Contry Detail\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetPreferredSize(new Dimension(450, 300));\n\t\tsetResizable(false);\n\t\t\n\t\tinitComponents();\n\t\t\n\t\tcontroller = new Service(this);\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tJFrame frame = new JFrame(\"Solitaire\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tController control = new Controller();\r\n\t\tframe.getContentPane().add(new Panel(control));\r\n\t\tframe.pack();\r\n\t\tframe.setSize(1000,500);\r\n\t\t\r\n\t\tframe.setVisible(true);\r\n\t}", "public static void main(String[] args) {\r\n\t\tSwingUtilities.invokeLater(() -> {\r\n\t\t\tnew JVDraw().setVisible(true);\r\n\t\t});\r\n\t}", "public static void main(String[] args) {\n\t\t// Create the window and set its size.\n\t\tJFrame f = new JFrame();\n\t\tf.setSize(new Dimension(SCREEN_WIDTH, SCREEN_HEIGHT));\n\n\t\t// Exit the application when the user closes the frame.\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tSnowAnimation snowAnimation = new SnowAnimation(SCREEN_WIDTH, SCREEN_HEIGHT);\n\n\t\t// Add the snow panel to the center of the window\n\t\tContainer contentPane = f.getContentPane();\n\t\tcontentPane.add(snowAnimation, BorderLayout.CENTER);\n\n\t\t// Display the window.\n\t\tf.setVisible(true);\n\n\t\t// Start the animation\n\t\tsnowAnimation.start();\n\t}", "public static void main(String[] args) {\n EnergyData energyData = new EnergyData();\n GUIVerbrauchsdiagramm guiVerbrauchsdiagramm = new GUIVerbrauchsdiagramm(\n \"Stromzähler\", energyData);\n\n //guiVerbrauchsdiagramm.pack();\n UIUtils.centerFrameOnScreen(guiVerbrauchsdiagramm);\n guiVerbrauchsdiagramm.setVisible(true);\n\n }", "public MainFrame(){\n super(\"Across Madrid\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBounds(100,100,700,500);\n\n contentPane = new JPanel(new CardLayout());\n setContentPane(contentPane);\n \n fillContentPane();\n }", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new KassaFrame(new Controller()));\n }", "public static void main (String[] args){\n\n\t JFrame frame = new JFrame (\"LAWN ZOMBIES\");\n\t frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t Screen screen = new Screen();\n\t screen.setLayout(new FlowLayout()); //sets a split layout\n\t frame.setLocation(500, 0);\n\t // screen.setLayout(new BorderLayout()); //sets non-split layout\n\t frame.setSize(w,h);\n\t screen.setSize(w,h);\n\t frame.add(screen);\n\t //frame.pack();\n\t frame.setVisible(true);\n\t }", "public static void main(String argv[]) {\r\n\t\tJFrame frame = new JFrame();\r\n\t\tframe.setSize(300, 300);\r\n\r\n\t\tframe.getContentPane().setLayout(new FlowLayout());\r\n\t\tframe.getContentPane().add(new JDatePicker());\r\n\r\n\t\tframe.setVisible(true);\r\n\t}", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "public RunFrame(MainFrame mainFrame) {\n\tthis.mainFrame = mainFrame;\n\tmainFrame.addScriptEventListener(scrEvtLis);\n\tsetAlwaysOnTop(true);\n setFocusable(false);\n setLocationByPlatform(true);\n\tsetLayout(new GridBagLayout());\n\tsetUndecorated(true);\n\tsetTitle(\"JUltima Toolbar\");\n\n\taddMouseListener(this);\n\taddMouseMotionListener(this);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"FEEx v. \"+VERSION);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Main p = new Main();\n p.addComponentToPane(frame.getContentPane());\n\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n \tstopPolling();\n \tstopMPP();\n p.port.close();\n Utils.storeSizeAndPosition(frame);\n }\n });\n \n //Display the window.\n frame.pack();\n Utils.restoreSizeAndPosition(frame);\n frame.setVisible(true);\n }", "public static void main (String[] args)\n\t{\n\t\t// DO NOT MODIFY THIS CODE.\n\t\tJFrame frame = new JFrame (\"Traffic Animation\");\n\t\tframe.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().add(new TrafficAnimation());\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}", "public static void main(String[] args) {\n\t\tAppFrame mf = new AppFrame();\n\t}", "public static void main(String[] args) {\n JFrame frame = new JFrame(\"Cpat_gui\");\n frame.setContentPane(new Cpat_gui().panel1);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n // Grote ingesteld en er wordt gezorgd dat je het frame niet kan veranderen.\n frame.setPreferredSize(new Dimension(700, 600));\n frame.setResizable(false);\n frame.pack();\n frame.setVisible(true);\n }", "public static void runAsApplication (final TurtleWorld applet, \n final String name) \n {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() // this is Java's thread run() method, \n { // not TurtleWorld's!\n // enable window decorations. \n JFrame.setDefaultLookAndFeelDecorated(true); \n JFrame frame = new JFrame(name); // create and set up the window.\n\n frame.setSize(frameSize, frameSize); // Default frame size\n \n // Using EXIT_ON_CLOSE empirically exits all instances\n // of an application.\n // Use DISPOSE_ON_CLOSE to get rid of just one. \n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); \n \n // Need to add to frame and make visible *before* init \n // so that attempts to reset dimensions will work. \n frame.add(applet, BorderLayout.CENTER); // add applet to window\n frame.setVisible(true); // display the window.\n applet.init(); // initialize the applet\n // Need to make visible again *after* init in case\n // something like setDimensions is not called in init. \n frame.setVisible(true); // display the window.\n }\n });\n }", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public static void main(String args[]){\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tnew MainFrame();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MainClass()\r\n\t{\r\n\t\tthis.setPreferredSize(new Dimension(width - 300, height));// This sets the dimensions of the graphic space where cam is drawn\r\n\t\tpanel = new ControlPanel(); // Initialization of various objects incorporated into the main class\r\n\t\twindow = new Window(this, panel);\t\t\t\t//\r\n\t\tdisp = new DispAngleDiagram(stroke);\t\t\t//\r\n\t\trcp = new RenderCamProfile(disp, panel);\t\t//\r\n\t\tinput = new InputHandler(disp);\t\t\t\t\t//\r\n\t\t\r\n\t\tthis.addMouseListener(input);\t\t\t\t\t\r\n\t\tthis.addMouseMotionListener(input);\r\n\t}", "public MainScreen()\n {\n initComponents();\n \n //Load the tables of the application with data from database\n loadClientTable();\n loadSupplierTable();\n loadStorageTable();\n loadPurchaseTable();\n loadSellTable();\n loadDeskPane();\n \n // Set window's location to the center of the screen\n setLocationRelativeTo(null);\n }", "public CalendarFrame()\n\t{\n\t\tmodel = new Model();\n\t\tcontroller = new ControllerPanel(model);\n\t\tview = new MonthlyView(model);\n\t\tmodel.attach(view);\n\n\t\tthis.setSize(1500, 700);\n\t\tadd(controller, BorderLayout.NORTH);\n\t\tadd(view, BorderLayout.CENTER);\n\t\tsetBackground(Color.WHITE);\n\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t// pack();\n\t\tsetVisible(true);\n\t}", "public cinema_main_form() {\n \t\t\n \t\tmain_frame = new JFrame();//main frame\n\t\tmain_panel = new JPanel();//kedriko panel\n\t\t\n\t\t// Add the panel to the frame.\n\t\tmain_frame.getContentPane().add(main_panel, BorderLayout.CENTER);\n \t\n initComponents();\n\t\n\t\t// Exit when the window is closed.\n\t\tmain_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "@Override\r\n public void start(Stage primaryStage) {\r\n \r\n \r\n // StackPane root = new StackPane(); \r\n Scene scene = new Scene(root, 900, 900); //set up a window with these propotions\r\n \r\n primaryStage.setTitle(\"Keep it Clean simulator\"); //window title\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n \r\n setLayout();\r\n \r\n drawUI.Draw(dataInput, tileMin, tileMax);\r\n }", "public static void main(String[] args)\n\t{\n\t\tgo = new GUI();\n\t\tgo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tgo.setExtendedState(JFrame.MAXIMIZED_BOTH); // Method to make auto-full screen\n\n\t\tgo.setVisible(true); // Basic frame stuff\n\t\tgo.init();\n\t\tr = new Runner();\n\t}", "public static void main(String... args){\n EventQueue.invokeLater(() -> {\n MyGridLayoutFrame frame = new MyGridLayoutFrame();\n frame.setVisible(true);\n } );\n }", "public void run() \n {\n final JFrame frame = new JFrame(); \n frame.setMinimumSize(new Dimension(640, 480)); \n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n \n // Add the Swing JPanel and make visible\n frame.getContentPane().add(new SwingFX2()); \n frame.setVisible(true); \n }" ]
[ "0.69493777", "0.6884753", "0.68533444", "0.6831618", "0.68229777", "0.67546177", "0.6741745", "0.6587888", "0.6518756", "0.6507685", "0.6505441", "0.6481261", "0.6423553", "0.64229566", "0.6415556", "0.63525796", "0.6352127", "0.6326704", "0.6288356", "0.6274303", "0.62739104", "0.62466305", "0.62410814", "0.62369746", "0.62291145", "0.6225546", "0.6212593", "0.6207024", "0.61809784", "0.6174816", "0.61375415", "0.61130166", "0.61102784", "0.6106309", "0.61059356", "0.6096067", "0.60935706", "0.6089801", "0.60890573", "0.6075612", "0.6066032", "0.60656786", "0.60651016", "0.6063861", "0.60617214", "0.6060255", "0.6060102", "0.6053472", "0.6053426", "0.6050454", "0.60460275", "0.6045222", "0.6044757", "0.604261", "0.6041622", "0.6039672", "0.6032411", "0.60256135", "0.60222816", "0.60207915", "0.60121", "0.6005823", "0.6005249", "0.6002542", "0.5995771", "0.59936106", "0.59886795", "0.59877485", "0.5987318", "0.5986608", "0.598442", "0.59765756", "0.59764963", "0.59705716", "0.59684104", "0.59651226", "0.5961199", "0.59565645", "0.5943021", "0.5942742", "0.59413064", "0.59354264", "0.5933907", "0.5932955", "0.5930938", "0.5930262", "0.5928283", "0.5927319", "0.5926769", "0.59256375", "0.59239537", "0.59227", "0.5922581", "0.5921598", "0.5920175", "0.59109324", "0.5908694", "0.59085137", "0.5907494", "0.59048635" ]
0.62012446
28
Define a bitmap with the same size as the view
public static Bitmap getBitmapFromView(View view) { Bitmap returnedBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); //Bind a canvas to it Canvas canvas = new Canvas(returnedBitmap); //Get the view's background Drawable bgDrawable = view.getBackground(); if (bgDrawable != null) //has background drawable, then draw it on the canvas bgDrawable.draw(canvas); else //does not have background drawable, then draw white background on the canvas canvas.drawColor(Color.WHITE); // draw the view on the canvas view.draw(canvas); //return the bitmap return returnedBitmap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Bitmap generate(@NonNull View view) {\n int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);\n view.measure(measureSpec, measureSpec);\n\n int measuredWidth = view.getMeasuredWidth();\n int measuredHeight = view.getMeasuredHeight();\n\n view.layout(0, 0, measuredWidth, measuredHeight);\n Bitmap bitmap = Bitmap.createBitmap(measuredWidth, measuredHeight, Bitmap.Config.ARGB_8888);\n bitmap.eraseColor(Color.TRANSPARENT);\n Canvas canvas = new Canvas(bitmap);\n view.draw(canvas);\n return bitmap;\n }", "public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds) {\n Bitmap bitmap = null;\n int bitmapWidth = Math.round(bounds.width());\n int bitmapHeight = Math.round(bounds.height());\n if (bitmapWidth > 0 && bitmapHeight > 0) {\n float scale = Math.min(1f, ((float)MAX_IMAGE_SIZE) / (bitmapWidth * bitmapHeight));\n bitmapWidth *= scale;\n bitmapHeight *= scale;\n matrix.postTranslate(-bounds.left, -bounds.top);\n matrix.postScale(scale, scale);\n bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n canvas.concat(matrix);\n view.draw(canvas);\n }\n return bitmap;\n }", "private Bitmap getBitmapFromView(View view, int height, int width) {\n Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n Drawable bgDrawable = view.getBackground();\n if (bgDrawable != null)\n bgDrawable.draw(canvas);\n else\n canvas.drawColor(Color.WHITE);\n view.draw(canvas);\n return bitmap;\n }", "private void setBitmapViewFull(Bitmap bitmap) {\n\n\t\t\tmCanvas.drawBitmap(bitmap, 0, 0, null);\n\t\t\tmCanvas.drawBitmap(bitmap, null, screenRect, null);\n\n\t\t\tif (DEBUG) {\n\t\t\t\tmCanvas.drawRect(recordRect, mRectPaint);\n\t\t\t\tmCanvas.drawRect(playRect, mRectPaint);\n\t\t\t}\n\t\t\tinvalidate();\n\t\t}", "public static Bitmap getBitmapFromView(View view) {\n Bitmap returnedBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(),Bitmap.Config.ARGB_8888);\n //Bind a canvas to it\n Canvas canvas = new Canvas(returnedBitmap);\n //Get the view's background\n Drawable bgDrawable =view.getBackground();\n if (bgDrawable!=null)\n //has background drawable, then draw it on the canvas\n bgDrawable.draw(canvas);\n else\n //does not have background drawable, then draw white background on the canvas\n canvas.drawColor(Color.WHITE);\n // draw the view on the canvas\n view.draw(canvas);\n //return the bitmap\n return returnedBitmap;\n }", "private BitmapDrawable getBitmapDrawableFromView(View v) {\r\n Bitmap bitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888);\r\n Canvas canvas = new Canvas(bitmap);\r\n v.draw(canvas);\r\n return new BitmapDrawable(getResources(), bitmap);\r\n }", "private Bitmap getMarkerBitmapFromView(View view) {\n view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);\n view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());\n Bitmap returnedBitmap = Bitmap.createBitmap(view.getMeasuredWidth(), view.getMeasuredHeight(),\n Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(returnedBitmap);\n canvas.drawColor(Color.WHITE, PorterDuff.Mode.SRC_IN);\n Drawable drawable = view.getBackground();\n if (drawable != null)\n drawable.draw(canvas);\n view.draw(canvas);\n return returnedBitmap;\n }", "@Override\n\t\t\tprotected void onDraw(Canvas canvas) {\n\t\t\t\t\n\t\t\t\tcanvas.drawColor(0xffff9900); // Orange\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// this gets us the view size relative to the bitmap\n\t\t\t\t// getWidth and getHeight() return int so we case denom to float\n\t\t\t\t\n\t\t\t\tfloat scaleX = this.getWidth() / ((float) mBitmap.getWidth());\n\t\t\t\tfloat scaleY = this.getHeight() / ((float) mBitmap.getHeight());\n\t\t\t\t// Log.d(\"MainActivity\",\"Scale:\"+scaleX+\",\"+scaleY);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// we can scale the canvas. \n\t\t\t\t// think about changes the rulers to the external \n\t\t\t\t// \n\t\t\t\t// this would double the bitmap size two times \n\t\t\t\t// \n\t\t\t\t// canvas.scale(2,2)\n\t\t\t\t// canvas.scale(2,2)\n\t\t\t\t\n\t\t\t\t// with canvas its possible to remember the settings using canvas.save(); \n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcanvas.save();\n\t\t\t\tcanvas.scale(scaleX, scaleY);\n\t\t\t\t\n\t\t\t\t// Here we try to add the bitmap to the canvas\n\t\t\t\t// canvas.drawBitmap(b,0,0,null)\n\t\t\t\t// Note: here b is a local variable declared above\n\t\t\t\t// if we try to use local variables that were declared outside of the anonymous inner class\n\t\t\t\t// we have 2 ways to make that work \n\t\t\t\t// 1. we can make the declaration final. e.g. \n\t\t\t\t// \n\t\t\t\t// final Bitmap b = Bitmap.createBitmap(4,4,Bitmap.Config.ARGB_8888); \n\t\t\t\t// \n\t\t\t\t// for pointers that means that means that b is fated to always point to the \n\t\t\t\t// same java object. \n\t // \n\t\t\t\t// The other thing we can do is make the bitmap an instance variable\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// For Android 4.x we also need to pass a paint\n\t\t\t\t// to turn off filtering -\n\t\t\t\tmPaint.setFilterBitmap(false); // Experiment with false vs true\n\t\t\t\tcanvas.drawBitmap(mBitmap, 0, 0, mPaint);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// canvas.restore() works in concert with canvas.save() \n\t\t\t\t// restores the prior settings\n\t\t\t\tcanvas.restore();\n\n\t\t\t\t// this draws a circle around our penguin\n\t\t\t\t// the circle has to be drawn before we draw the penguin otherwise\n\t\t\t\t// the penguin will be hidden behind the circle\n\t\t\t\t\n\t\t\t\tmPaint.setColor(0x80ffffff); \t\t\t\t\t// White\n\t\t\t\tmPaint.setStyle(Style.FILL_AND_STROKE);\n\n\t\t\t\t\n\t\t\t\t// here we're drawing the penguin\n\t\t\t\t// initially the penguin wasn't visible because the scale was too large\n\t\t\t\t// one fix is to reverse the scale\n\t\t\t\t// \n\t\t\t\t// $ canvas.scale(1/scaleX, 1/scaleY); \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// canvas allows us to rotate. We do this in degrees. \n\t\t\t\t// by default the canvas rotates around 0,0\n\t\t\t\t\n\t\t\t\t// we use this calculation to determine how much to rotate the penguin\n\t\t\t\t// SystemClock.uptimeMillis() does not include time asleep\n\t\t\t\t// good clock to use if you want to count how long a user has seen something\n\t\t\t\t// \n\t\t\t\t// we take the SystemClock divided / 10.0f \n\t\t\t\t\n\t\t\t\t// Note: instead of moving the penguin, we first translate the canvas and then \n\t\t\t\t// rotate the penguin relative to the canvas\n\t\t\t\t\n\t\t\t\tfloat angle = SystemClock.uptimeMillis() / 10.0f;\n\t\t\t\tcanvas.translate(x,y); \n\t\t\t\n\t\t\t\n\n\t\t\t\t// move the circle to be drawn after we translate the canvas\n\t\t\t\tcanvas.drawBitmap(mPenguin, 0, 0, null);\n\t\t\t\t\n\t\t\t\t// here we add movement\n\t\t\t\t// we're adding gravity. \n\t\t\t\t// we check to see if the penguin is too low, and if he is \n\t\t\t\t// then we change the sign of 'gravity'\n\t\t\t\t\n\t\t\t\t// want to bounce on bottom of screen\n\t\t\t\t// canvas.getHeight doesn't work \n\t\t\t\t// Log.d(\"TAG\", \"Canvas: \" + canvas.getHeight()) + \" View: \" + this.getHeight())\n\t\t\t\t// the canvas is not as large as the view because things like status bars take up \n\t\t\t\t// part of the view\n\t\t\t\t// \n\t\t\t\t// the penguin is drawn from the topleft corner. To get the bottom corner we have to \n\t\t\t\t// add 2*mPHheight\n\t\t\t\t\n\t\t\t\tif(y + 2*mPHheight + vy+1 >= this.getHeight()){ \n\t\t\t\t\tvy = -0.8f * vy; //make sure I stay with float 0 \n\t\t\t\t} else { \n\t\t\t\t\t// only accelerate if not bouncing\n\t\t\t\t\tvy = vy + 2; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tx = x + vx; \n\t\t\t\ty = y + vy; \n\t\t\t\t\n\t\t\t\t// we use postInvalidate to animate the penguin\n\t\t\t\t// postInvalidate means 'please redraw me' \n\t\t\t\t// you can call this method from anywhere\n\t\t\t\t// for example if you have a thread where you get a new sensor measurement, \n\t\t\t\t// you can call post invalidate on your view\n\t\t\t\n\t\t\t\t\n\t\t\t\t// In 20ms (1/50th second) this view will need to be redrawn\n\t\t\t\tpostInvalidateDelayed(20);\n\t\t\t}", "public static Bitmap getBitmapFromView(View v) {\n //Define a bitmap with the same size as the view\n Bitmap returnedBitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(),Bitmap.Config.ARGB_8888);\n //Bind a canvas to it\n Canvas palit = new Canvas(returnedBitmap);\n //Get the view's background\n Drawable bgDrawable =v.getBackground();\n if (bgDrawable!=null)\n //has background drawable, then draw it on the canvas\n bgDrawable.draw(palit);\n else\n //does not have background drawable, then draw white background on the canvas\n palit.drawColor(Color.WHITE);\n // draw the view on the canvas\n v.draw(palit);\n //return the bitmap\n return returnedBitmap;\n }", "Bitmap m7900a(Bitmap bitmap);", "private void setPic() {\n int targetW = imageView.getMaxWidth();\n int targetH = imageView.getMaxHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n bitmap = Bitmap.createScaledBitmap(bitmap, 1280, 960,false);\n Log.d(\"demo\", \"setPic: \"+ bitmap.getWidth()+\" \"+bitmap.getHeight());\n Log.d(\"demo\", \"setPic: \"+ bitmap.getByteCount()/1000);\n imageView.setImageBitmap(bitmap);\n }", "Baby(int centerX, int centerY, Resources res) {\n paint = new Paint();\n babyImg = BitmapFactory.decodeResource(res, R.drawable.baby);\n\n // width and height needs to be changed to dynamically scaled depending on holder width/height\n babyImg = Bitmap.createScaledBitmap(babyImg, 640, 1280, false);\n width = babyImg.getWidth();\n height = babyImg.getHeight();\n x = centerX - (width / 2);\n y = centerY - (height / 2);\n }", "public abstract void setUpBitmap(Context context);", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n mBitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n // 8888 means that color is stored suing 8 bits (1 byte) for alpha, red, green, blue\n mCanvas = new Canvas(mBitmap);\n mBitmap.eraseColor(Color.WHITE);\n }", "private static Bitmap a(View view, Matrix matrix, RectF rectF, ViewGroup viewGroup) {\n boolean z;\n boolean z2;\n ViewGroup viewGroup2;\n int round;\n int round2;\n int i2 = 0;\n if (f2836a) {\n z2 = !view.isAttachedToWindow();\n if (viewGroup != null) {\n z = viewGroup.isAttachedToWindow();\n Bitmap bitmap = null;\n if (f2837b || !z2) {\n viewGroup2 = null;\n } else if (!z) {\n return null;\n } else {\n ViewGroup viewGroup3 = (ViewGroup) view.getParent();\n int indexOfChild = viewGroup3.indexOfChild(view);\n viewGroup.getOverlay().add(view);\n int i3 = indexOfChild;\n viewGroup2 = viewGroup3;\n i2 = i3;\n }\n round = Math.round(rectF.width());\n round2 = Math.round(rectF.height());\n if (round > 0 && round2 > 0) {\n float min = Math.min(1.0f, 1048576.0f / ((float) (round * round2)));\n int round3 = Math.round(((float) round) * min);\n int round4 = Math.round(((float) round2) * min);\n matrix.postTranslate(-rectF.left, -rectF.top);\n matrix.postScale(min, min);\n if (!f2838c) {\n Picture picture = new Picture();\n Canvas beginRecording = picture.beginRecording(round3, round4);\n beginRecording.concat(matrix);\n view.draw(beginRecording);\n picture.endRecording();\n bitmap = Bitmap.createBitmap(picture);\n } else {\n bitmap = Bitmap.createBitmap(round3, round4, Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n canvas.concat(matrix);\n view.draw(canvas);\n }\n }\n if (f2837b && z2) {\n viewGroup.getOverlay().remove(view);\n viewGroup2.addView(view, i2);\n }\n return bitmap;\n }\n } else {\n z2 = false;\n }\n z = false;\n Bitmap bitmap2 = null;\n if (f2837b) {\n }\n viewGroup2 = null;\n round = Math.round(rectF.width());\n round2 = Math.round(rectF.height());\n float min2 = Math.min(1.0f, 1048576.0f / ((float) (round * round2)));\n int round32 = Math.round(((float) round) * min2);\n int round42 = Math.round(((float) round2) * min2);\n matrix.postTranslate(-rectF.left, -rectF.top);\n matrix.postScale(min2, min2);\n if (!f2838c) {\n }\n viewGroup.getOverlay().remove(view);\n viewGroup2.addView(view, i2);\n return bitmap2;\n }", "Drawable createDrawable(Context context, Bitmap b);", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n drawCanvas = new Canvas(canvasBitmap);\n }", "void mo12205a(Bitmap bitmap);", "private Bitmap getMemberLocationBitmapFromView(View view) {\n view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);\n view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());\n Bitmap returnedBitmap = Bitmap.createBitmap(view.getMeasuredWidth(), view.getMeasuredHeight(),\n Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(returnedBitmap);\n canvas.drawColor(Color.WHITE, PorterDuff.Mode.SRC_IN);\n Drawable drawable = view.getBackground();\n if (drawable != null)\n drawable.draw(canvas);\n view.draw(canvas);\n return returnedBitmap;\n }", "private Bitmap createBitmap(Bitmap bitmap, int w, int h, float scale) {\n\n Matrix matrix = new Matrix();\n matrix.setScale(scale, scale);\n //matrix.postTranslate(-bitmap.getWidth() / 2, -bitmap.getHeight() / 2);\n matrix.postRotate(orientation);\n /*if (orientation == 90 || orientation == 270) {\n matrix.postTranslate(bitmap.getHeight() / 2, bitmap.getWidth() / 2);\n } else {\n matrix.postTranslate(bitmap.getWidth() / 2, bitmap.getHeight() / 2);\n }*/\n //canvas.drawBitmap(bitmap, matrix, paint);\n //try {\n // canvas.setBitmap(null);\n //} catch (Exception e) {\n //don't promt, this will crash on 2.x\n //}\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n\n //return result;\n }", "void setImage(Bitmap bitmap);", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n //initialize canvas background\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(canvasBitmap);\n }", "private void setPic() {\n int targetW = imageView.getWidth();\n int targetH = imageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageView.setImageBitmap(bitmap);\n imageView.invalidate();\n }", "public void setImageBitmapInto(Bitmap bitmap, View view) {\n ((ImageView) view).setImageBitmap(bitmap);\n }", "public void setBitmap(Bitmap bitmap) {\n\t\t\n\t}", "public void showbitmap4() {\n \n \t}", "private void setPic() {\n int targetW =20;// mImageView.getWidth();\n int targetH =20;// mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;//设置仅加载位图边界信息(相当于位图的信息,但没有加载位图)\n\n //返回为NULL,即不会返回bitmap,但可以返回bitmap的横像素和纵像素还有图片类型\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "public Bitmap snap() {\n\t\t\tBitmap bitmap = Bitmap.createBitmap(this.view.getWidth(),\n\t\t\t\t\tthis.view.getHeight(), Config.ARGB_8888);\n\t\t\tCanvas canvas = new Canvas(bitmap);\n\t\t\tview.draw(canvas);\n\t\t\treturn bitmap;\n\t\t}", "private void recreateBitmap() {\n if (sprite != null) {\n sprite.recycle();\n }\n sprite = Bitmap.createBitmap(specState.targetWidth,\n specState.targetHeight,\n Bitmap.Config.ARGB_8888);\n spriteDrawable = new BitmapDrawable(getResources(), sprite);\n spriteDrawable.getPaint().setFilterBitmap(false);\n preview.setImageDrawable(spriteDrawable);\n }", "public void setBitmap(Bitmap bitmap){\n this.bitmap = Bitmap.createScaledBitmap(bitmap,(int)(bitmap.getWidth()*bitmapScale),(int)(bitmap.getHeight()*bitmapScale),false);\n //TODO:Update hitBox to scale to new bitmap\n }", "private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }", "public static Bitmap loadPicture(View v, String photoPath) {\n int targetW,targetH;\n if (v != null) {\n targetW = v.getWidth();\n targetH = v.getHeight();\n } else {\n WindowManager wm = (WindowManager) SketchesApp.globalContext.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n DisplayMetrics metrics=new DisplayMetrics();\n display.getMetrics(metrics);\n targetW = metrics.widthPixels;\n targetH = metrics.heightPixels;\n }\n if (targetH==0 || targetW==0)\n return null;\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n //bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(photoPath, bmOptions);\n if (v!=null) {\n if (v instanceof ImageView) {\n ImageView iv = (ImageView) v;\n iv.setImageBitmap(bitmap);\n } else {\n BitmapDrawable bd = new BitmapDrawable(v.getResources(), bitmap);\n v.setBackground(bd);\n }\n }\n return bitmap;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\t setContentView(R.layout.mask_activity);\n\t \n\t Display display = getWindowManager().getDefaultDisplay();\n\t Point size = new Point();\n\t display.getSize(size);\n\t width = size.x;\n\t height = size.y;\n\t Log.i(\"x\",\"y\");\n\t wMask = (int) (width*widthMaskConst);\n\t Log.i(\"wMask\",\"\"+wMask);\n\t \n\t \n\t LinearLayout ll = (LinearLayout) findViewById(R.id.ll);\n\t final DrawingView dv= new DrawingView(this);\n\t ll.addView(dv);\n\t \n\t saveButton = (Button) findViewById(R.id.save_button);\n\t \n\t saveButton.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t//Toast.makeText(getBaseContext(), \"reaching\", Toast.LENGTH_SHORT).show();\n\t \t\n\t \tclass ToSaveCropped{\n\t \t\t\n\t \t\tfloat x=finalx;\n\t \t\tfloat y=finaly;\n\n\t\t\t\t\tprivate byte[] data = MainActivity.getbitmapData();\n\t\t\t Bitmap mImage = BitmapFactory.decodeByteArray(data, 0, data.length);\n\t\t\t \n\t\t\t Drawable myMask = getResources().getDrawable(R.drawable.mask);\n\t\t\t Bitmap mMask = ((BitmapDrawable) myMask).getBitmap();\n\t\t\t Bitmap mmImage = dv.bitmapRotate(mImage);\n\t\t\t \n\t\t\t Bitmap mmmImage = dv.getResizedBitmap(mmImage,height,width);\n\t\t\t \n\t\t\t Bitmap mmMask = dv.getResizedBitmap(mMask,wMask,wMask);\n\t\t\t\t\t\n\t\t\t\t\tpublic void onDraw(){\n\t\t\t\t\t\tCanvas canvas; \t\t\t\n\t \t\t\tint w = mmMask.getWidth(), h = mmMask.getHeight();\n\t \t\t\tBitmap.Config conf = Bitmap.Config.ARGB_8888; // see other conf types\n\t \t\t\tcroppedBitmap = Bitmap.createBitmap(w, h, conf); // this creates a MUTABLE bitmap\n\t \t\t\tcanvas = new Canvas(croppedBitmap);\n\t \t\t\t\n\t \t\t\tPaint maskPaint = new Paint();\n\t \t\t\tmaskPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n\n\t Paint imagePaint = new Paint();\n\t imagePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OVER));\n\t \t\t\t//Log.i(\"\"+x,\"\"+y);\n\t \t//canvas.drawBitmap(mMask,x,y,maskPaint);\n\t \tcanvas.drawBitmap(mmmImage,-x,-y,imagePaint);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t \t}\t \t\n\t \tToSaveCropped tsc = new ToSaveCropped();\n\t \ttsc.onDraw();\n\t \tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\t \tcroppedBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n\t \tbitData = stream.toByteArray();\n\t\t\t\t\n\t\t\t\tSaveFile sv = new SaveFile();\n\t\t\t\tsv.save();\n\t\t\t\t\n\t\t\t\tMediaStore.Images.Media.insertImage(getContentResolver(), croppedBitmap, \"\", \"\");\n\t\t\t\t\n\t\t\t}\n\t\t}); \n\t \n\t}", "@Override\r\n\tpublic void setImageBitmap(Bitmap source) {\n//\r\n//\t\tMatrix matrix = new Matrix();\r\n//\t\tmatrix.postScale(ratio, ratio);\r\n//\t\tsource = Bitmap.createBitmap(source, 0, 0, width, height, matrix, true);\r\n//\r\n//\t\twidth = source.getWidth();\r\n//\t\theight = source.getHeight();\r\n//\r\n//\t\tx = (width - ConfigSize.SIZE_THUMB) / 2;\r\n//\t\ty = (height - ConfigSize.SIZE_THUMB) / 2;\r\n//\r\n//\t\tsource = Bitmap.createBitmap(source, x, y, ConfigSize.SIZE_THUMB,\r\n//\t\t\t\tConfigSize.SIZE_THUMB);\r\n\r\n\t\tsuper.setImageBitmap(source);\r\n\t}", "private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }", "public static Bitmap createDrawableBitmap(Drawable drawable) {\n int width = drawable.getIntrinsicWidth();\n int height = drawable.getIntrinsicHeight();\n if (width <= 0 || height <= 0) {\n return null;\n }\n float scale = Math.min(1f, ((float)MAX_IMAGE_SIZE) / (width * height));\n if (drawable instanceof BitmapDrawable && scale == 1f) {\n // return same bitmap if scale down not needed\n return ((BitmapDrawable) drawable).getBitmap();\n }\n int bitmapWidth = (int) (width * scale);\n int bitmapHeight = (int) (height * scale);\n Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n Rect existingBounds = drawable.getBounds();\n int left = existingBounds.left;\n int top = existingBounds.top;\n int right = existingBounds.right;\n int bottom = existingBounds.bottom;\n drawable.setBounds(0, 0, bitmapWidth, bitmapHeight);\n drawable.draw(canvas);\n drawable.setBounds(left, top, right, bottom);\n return bitmap;\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "private void setPic() {\n int targetW = 210;\n int targetH = 320;\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n bitmap = RotateBitmap(bitmap,270);\n preview.setImageBitmap(bitmap);\n }", "private void setPic() {\n int targetW = img_clip.getWidth();\n int targetH = img_clip.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n img_clip.setImageBitmap(bitmap);\n }", "@Override\n public void setupInnerViewElements(ViewGroup parent, View viewImage) {\n if (viewImage != null) {\n if (parent != null && parent.getResources() != null) {\n DisplayMetrics metrics = parent.getResources().getDisplayMetrics();\n\n int base = 64;\n\n if (metrics != null) {\n viewImage.getLayoutParams().width = (int) (base * metrics.density);\n viewImage.getLayoutParams().height = (int) (base * metrics.density);\n } else {\n viewImage.getLayoutParams().width = 196;\n viewImage.getLayoutParams().height = 196;\n }\n }\n }\n\n }", "public Bitmap getBitmap(){\n return bitmap;\n }", "private static Bitmap drawableToBitmap(Drawable drawable) {\n if (drawable == null) {\n return null;\n } else if (drawable instanceof BitmapDrawable) {\n return ((BitmapDrawable) drawable).getBitmap();\n }\n\n //Avoid Color Drawable special case\n int width = drawable.getIntrinsicWidth();\n width = width > 0 ? width : 1;\n int height = drawable.getIntrinsicHeight();\n height = height > 0 ? height : 1;\n\n Bitmap bitmap;\n try {\n bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n } catch (OutOfMemoryError e) {\n Log.e(\"PolygonImageView\", \"OutOfMemory during bitmap creation\");\n return null;\n }\n\n Canvas canvas = new Canvas(bitmap);\n drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());\n drawable.draw(canvas);\n\n return bitmap;\n }", "public CanvasElement(int width, int height, WatchViewStub stub){\n this.width = width;\n this.height = height;\n this.stub = stub;\n paint = new Paint();\n fillStyle = \"rgb(0,0,0)\";\n parseColors(fillStyle);\n\n lastX = 0;\n lastY = 0;\n\n bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(bitmap);\n canvas.drawColor(0xffffffff);\n\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n//\t\tcanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);\r\n\t\tcanvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\r\n\t\tdrawCanvas = new Canvas(canvasBitmap);\r\n\t}", "@Override\n void draw(Canvas canvas) {\n canvas.drawBitmap(appearance, getX(), getY(), null);\n }", "@Override\n public void onClick(View v) {\n Bitmap zoomedBitmap= Bitmap.createScaledBitmap(bmp, photoView.getWidth(), photoView.getHeight(), true);\n SaveImage(zoomedBitmap);\n }", "public void setSignatureBitmap(final Bitmap signature) {\n if (ViewCompat.isLaidOut(this)) {\n clear();\n ensureSignatureBitmap();\n\n RectF tempSrc = new RectF();\n RectF tempDst = new RectF();\n\n int dWidth = signature.getWidth();\n int dHeight = signature.getHeight();\n int vWidth = getWidth();\n int vHeight = getHeight();\n\n // Generate the required transform.\n tempSrc.set(0, 0, dWidth, dHeight);\n tempDst.set(0, 0, vWidth, vHeight);\n\n Matrix drawMatrix = new Matrix();\n drawMatrix.setRectToRect(tempSrc, tempDst, Matrix.ScaleToFit.CENTER);\n\n Canvas canvas = new Canvas(mSignatureBitmap);\n canvas.drawBitmap(signature, drawMatrix, null);\n setIsEmpty(false);\n invalidate();\n }\n // View not laid out yet e.g. called from onCreate(), onRestoreInstanceState()...\n else {\n getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n // Remove layout listener...\n ViewTreeObserverCompat.removeOnGlobalLayoutListener(getViewTreeObserver(), this);\n\n // Signature bitmap...\n setSignatureBitmap(signature);\n }\n });\n }\n }", "public void showbitmap3() {\n \n \t}", "static Bitmap snapshotView(final View view) {\n // Save the content of the view into a bitmap.\n final Bitmap viewBitmap = Bitmap.createBitmap(view.getWidth(),\n view.getHeight(), Bitmap.Config.ARGB_8888);\n // Strip the view of its background when taking a snapshot so that things like touch\n // feedback don't get accidentally snapshotted.\n final Drawable viewBackground = view.getBackground();\n ImageUtils.setBackgroundDrawableOnView(view, null);\n view.draw(new Canvas(viewBitmap));\n ImageUtils.setBackgroundDrawableOnView(view, viewBackground);\n return viewBitmap;\n }", "public Bitmap(int w, int h)\n {\n width = w;\n height = h;\n m_components = new byte[width * height * 4];\n }", "private Bitmap getBitmap(int drawableRes) {\n Drawable drawable = ResourcesCompat.getDrawable(getResources(), drawableRes, null);\n Canvas canvas = new Canvas();\n Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);\n canvas.setBitmap(bitmap);\n drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());\n drawable.draw(canvas);\n\n return bitmap;\n }", "private Bitmap setPic() {\n int targetH = 0; //mImageView.getHeight();\n int targetW = 0; //mImageView.getWidth();\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n if( photoH > photoW ){\n /*Se definen las dimensiones de la imagen que se desea generar*/\n targetH = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.heigh; // 640;\n targetW = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.width; //480;\n }else{\n targetH = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.heigh; //480;\n targetW = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.width; //640;\n }\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 0;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n return bitmap;\n }", "public Surface(Bitmap bitmap) {\n this(CreateBitmapInstance(bitmap));\n }", "public interface IBitmapFactory {\n public Bitmap decodeResource(Resources resources, int resId);\n public Bitmap createBitmap(int width, int height, Bitmap.Config config);\n}", "public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {}", "@Override\n protected void appSize(int width, int height, Bitmap.Config config) {\n // Do nothing if already set.\n if (width == screenWidth && height == screenHeight && config == screenConfig)\n return;\n \n screenWidth = width;\n screenHeight = height;\n screenConfig = config;\n \n if (eyeCandy != null)\n eyeCandy.setConfiguration(screenWidth, screenHeight, screenConfig);\n }", "void setInitialImageBoundsFillScreen() {\n\t\tif (mImage != null) {\n\t\t\tif (mViewWidth > 0) {\n\t\t\t\tboolean resize=false;\n\t\t\t\t\n\t\t\t\tint newWidth=mImageWidth;\n\t\t\t\tint newHeight=mImageHeight;\n\t\t\t\n\t\t\t\t// The setting of these max sizes is very arbitrary\n\t\t\t\t// Need to find a better way to determine max size\n\t\t\t\t// to avoid attempts too big a bitmap and throw OOM\n\t\t\t\tif (mMinWidth==-1) { \n\t\t\t\t\t// set minimums so that the largest\n\t\t\t\t\t// direction we always filled (no empty view space)\n\t\t\t\t\t// this maintains initial aspect ratio\n\t\t\t\t\tif (mViewWidth > mViewHeight) {\n\t\t\t\t\t\tmMinWidth = mViewWidth;\n\t\t\t\t\t\tmMinHeight = (int)(mMinWidth/mAspect);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmMinHeight = mViewHeight;\n\t\t\t\t\t\tmMinWidth = (int)(mAspect*mViewHeight);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tmMaxWidth = (int)(mMinWidth * 1.5f);\n\t\t\t\t\tmMaxHeight = (int)(mMinHeight * 1.5f);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif (newWidth < mMinWidth) {\n\t\t\t\t\tnewWidth = mMinWidth;\n\t\t\t\t\tnewHeight = (int) (((float) mMinWidth / mImageWidth) * mImageHeight);\n\t\t\t\t\tresize = true;\n\t\t\t\t}\n\t\t\t\tif (newHeight < mMinHeight) {\n\t\t\t\t\tnewHeight = mMinHeight;\n\t\t\t\t\tnewWidth = (int) (((float) mMinHeight / mImageHeight) * mImageWidth);\n\t\t\t\t\tresize = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmScrollTop = 0;\n\t\t\t\tmScrollLeft = 0;\n\t\t\t\t\n\t\t\t\t// scale the bitmap\n\t\t\t\tif (resize) {\n\t\t\t\t\tscaleBitmap(newWidth, newHeight);\n\t\t\t\t} else {\n\t\t\t\t\tmExpandWidth=newWidth;\n\t\t\t\t\tmExpandHeight=newHeight;\t\t\t\t\t\n\t\t\t\t\tmResizeFactorX = ((float) newWidth / mImageWidth);\n\t\t\t\t\tmResizeFactorY = ((float) newHeight / mImageHeight);\n\t\t\t\t\tmRightBound = 0 - (mExpandWidth - mViewWidth);\n\t\t\t\t\tmBottomBound = 0 - (mExpandHeight - mViewHeight);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void createImageView() {\n /**\n * We use @{@link AdjustableImageView} so that we can have behaviour like setAdjustViewBounds(true)\n * for Android below API 18\n */\n viewsToBeInflated.add(new AdjustableImageView(getActivityContext()));\n }", "@Override\r\npublic void showImagetoUI(Bitmap bitmap) {\n\t\r\n}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\n\t\tcanvas.drawBitmap(bitmap_new, 0, 0, paint);\n\t}", "public MyView(Context context) {\r\n\t\tsuper(context);\r\n\t\tpaint = new Paint(paint.ANTI_ALIAS_FLAG);\r\n\t}", "public ArrayList<Bitmap> createBitmap(CanvasView src, CanvasView dst, ArrayList<Difference> difference) {\n Bitmap blank;\n Drawable view1Immutable = src.getBackground(); //get both backgrounds\n Bitmap view1Background = ((BitmapDrawable) view1Immutable).getBitmap();\n ArrayList<Bitmap> frames = new ArrayList<>();\n\n view1Background = Bitmap.createScaledBitmap(view1Background, 400, 400, false);\n double newX, newY;\n int width = view1.getWidth();\n int height = view1.getHeight();\n for (int i = 1; i <= frameCount; i++) { //for each frame\n ArrayList<Line> temp = new ArrayList();\n blank = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);\n for (int q = 0; q < view1.lines.size(); q++) {\n Line srcLine = dst.lines.get(q);\n Difference d = difference.get(q);\n Line l = new Line(srcLine.startX - Math.round(d.X1 * i), srcLine.startY - Math.round(d.Y1 * i), srcLine.stopX - Math.round(d.X2 * i), srcLine.stopY - Math.round(d.Y2 * i));\n temp.add(l);\n }\n\n for (int x = 0; x < width; x++) { //for each x pixel\n for (int y = 0; y < height; y++) { //for each y pixel\n double totalWeight = 0;\n double xDisplacement = 0;\n double yDisplacement = 0;\n for (int l = 0; l < view1.lines.size(); l++) { //for each line\n Line dest = view2.lines.get(l);\n Line srcLine = temp.get(l);\n double ptx = dest.startX - x;\n double pty = dest.startY - y;\n double nx = dest.yLength * -1;\n double ny = dest.xLength;\n\n double d = ((nx * ptx) + (ny * pty)) / ((Math.sqrt(nx * nx + ny * ny)));\n double fp = ((dest.xLength * (ptx * -1)) + (dest.yLength * (pty * -1)));\n fp = fp / (Math.sqrt(dest.xLength * dest.xLength + dest.yLength * dest.yLength));\n fp = fp / (Math.sqrt(dest.xLength * dest.xLength + dest.yLength * dest.yLength));\n\n nx = srcLine.yLength * -1;\n ny = srcLine.xLength;\n\n newX = ((srcLine.startX) + (fp * srcLine.xLength)) - ((d * nx / (Math.sqrt(nx * nx + ny * ny))));\n newY = ((srcLine.startY) + (fp * srcLine.yLength)) - ((d * ny / (Math.sqrt(nx * nx + ny * ny))));\n\n double weight = (1 / (0.01 + Math.abs(d)));\n totalWeight += weight;\n xDisplacement += (newX - x) * weight;\n yDisplacement += (newY - y) * weight;\n }\n\n newX = x + (xDisplacement / totalWeight);\n newY = y + (yDisplacement / totalWeight);\n\n if (xDisplacement == x - newX)\n newX = x - xDisplacement;\n\n if (yDisplacement == y - newY)\n newY = y - yDisplacement;\n\n if (newX < 0)\n newX = 0;\n if (newY < 0)\n newY = 0;\n if (newY >= 400)\n newY = 399;\n if (newX >= 400)\n newX = 399;\n blank.setPixel(x, y, view1Background.getPixel((int) Math.abs(newX), (int) Math.abs(newY)));\n }\n }\n frames.add(blank);\n }\n return frames;\n }", "public void configure(T aView) { aView.setPrefSize(110,20); }", "private void setPic() {\n\t\tint targetW = Constant.sRealWidth;\n\t\tint targetH = Constant.sRealHeight;\n\n\t\t/* Get the size of the image */\n\t\tBitmapFactory.Options bmOptions = new BitmapFactory.Options();\n\t\tbmOptions.inJustDecodeBounds = true;\n\t\tBitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\tint photoW = bmOptions.outWidth;\n\t\tint photoH = bmOptions.outHeight;\n\t\t\n\t\t/* Figure out which way needs to be reduced less */\n\t\tint scaleFactor = 1;\n\t\tif ((targetW > 0) || (targetH > 0)) {\n\t\t\tscaleFactor = Math.min(photoW/targetW, photoH/targetH);\t\n\t\t}\n\n\t\t/* Set bitmap options to scale the image decode target */\n\t\tbmOptions.inJustDecodeBounds = false;\n\t\tbmOptions.inSampleSize = scaleFactor;\n\t\tbmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n\t\tBitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\t\n\t\tint rotate = ViewUtils.handleRotateBitmap(mCurrentPhotoPath);\n\t\tif (rotate != 0) {\n\t\t\tbitmap = ViewUtils.rotaingBitmap(\n\t\t\t\t\trotate, bitmap);\n\t\t}\n\t\t/* Associate the Bitmap to the ImageView */\n\t\tmPictureView.setImageBitmap(bitmap);\n\t}", "private void setImage(Bitmap image) {\n }", "private Bitmap getScreenshotBitmap() {\n if (!hasEnoughHeapMemoryForScreenshot()) return null;\n\n if (getWidth() <= 0 || getHeight() <= 0) return null;\n\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n draw(new Canvas(bitmap));\n return bitmap;\n }", "Bitmap mo6659a(Context context, String str, C1492a aVar);", "public Bitmap saveBitmap(int sampleSize, int radius, int strokeWidth) {\n\r\n try {\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n options.inJustDecodeBounds = true; //Chỉ đọc thông tin ảnh, không đọc dữ liwwuj\r\n BitmapFactory.decodeFile(pathImage, options); //Đọc thông tin ảnh\r\n options.inSampleSize = sampleSize; //Scale bitmap xuống 1 lần\r\n options.inJustDecodeBounds = false; //Cho phép đọc dữ liệu ảnh ảnh\r\n Bitmap originalSizeBitmap = BitmapFactory.decodeFile(pathImage, options);\r\n\r\n Bitmap mutableBitmap = originalSizeBitmap.copy(Bitmap.Config.ARGB_8888, true);\r\n RectF originalRect =\r\n new RectF(0, 0, mutableBitmap.getWidth(), mutableBitmap.getHeight());\r\n\r\n originalSizeBitmap.recycle();\r\n originalSizeBitmap = null;\r\n System.gc();\r\n\r\n Canvas canvas = new Canvas(mutableBitmap);\r\n\r\n float[] originXy = getOriginalPoint(originalRect);\r\n circlePaint.setStrokeWidth(strokeWidth);\r\n canvas.drawCircle(originXy[0], originXy[1], radius, circlePaint);\r\n return mutableBitmap;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n Toast.makeText(getContext(), \"can not draw original bitmap\", Toast.LENGTH_SHORT)\r\n .show();\r\n return getBitmapScreenShot();\r\n }\r\n }", "public byte[] bitmap();", "private Bitmap getScaledBitmap(ImageView imageView) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n\n int scaleFactor = Math.min(\n options.outWidth / imageView.getWidth(),\n options.outHeight / imageView.getHeight()\n );\n options.inJustDecodeBounds = false;\n options.inSampleSize = scaleFactor;\n options.inPurgeable = true;\n return BitmapFactory.decodeFile(currentImagePath, options);\n }", "private static native void setImagesize_0(long nativeObj, int W, int H);", "private Bitmap decodeMapBitmap() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = false;\n options.inScaled = false;\n options.outWidth = 2048;\n options.outHeight = 2048;\n\n return BitmapFactory.decodeResource(getResources(), R.drawable.map, options);\n }", "@Override\n\tpublic void render(Bitmap map) {\n\t\t\n\t}", "private void draw() {\n\tSurfaceHolder holder = getSurfaceHolder();\n\tCanvas canvas = null;\n\ttry {\n\t\tcanvas = holder.lockCanvas();\n\t\tif (canvas != null) {\n\t\t\tif (bitmap == null) {\n\t\t\t\tbitmap = iniBitmap(canvas.getWidth(), canvas.getHeight());\n\t\t\t}\n\t\t\tcanvas.drawBitmap(bitmap.getBitmap(), 0, 0, paint);\n\t\t}\n\t} finally {\n\t\tif (canvas != null) holder.unlockCanvasAndPost(canvas);\n\t}\n}", "public static Bitmap m24663a(Bitmap bitmap) {\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n Matrix matrix = new Matrix();\n matrix.postScale(0.7f, 0.7f);\n return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);\n }", "@Override\n\t\t\t\t\tprotected int sizeOf(BareJID key, Bitmap bitmap) {\n\t\t\t\t\t\treturn bitmap == mPlaceHolderBitmap ? 0 : (bitmap.getRowBytes() * bitmap.getHeight());\n\t\t\t\t\t}", "public void\r NewPixmap(CType display_context, int width, int height,\r ILPix_t image, ILPix_t mask);", "@Override\n\t\t\t\tpublic void onObtainBitmap(Bitmap bitmap, ImageView imageView) {\n\t\t\t\t\timageView.setImageBitmap(bitmap);\n\t\t\t\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tRect destination = new Rect(0,0,(int) (canvas.getWidth()-10*(AllResources.targetWidth/480.0f)),(int) (canvas.getHeight()-10*(AllResources.targetHeight/800.0f)));\n\t\tcanvas.drawBitmap(gameOver, null, destination,null);\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.main);\n\t\tgestureScanner = new GestureDetector(this);\n paint = new Paint();\n display = getWindowManager().getDefaultDisplay();\n res = getResources();\n bmp = BitmapFactory.decodeResource(Resources.getSystem(), R.drawable.sample_0);\n adapt = Bitmap.createBitmap(bmp);\n \n main = new MyView(this); \n setContentView(main,new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));\n\t}", "@Override\n public View onCreateSnapshotView(Context context, Parcelable snapshot) {\n View view = new View(context);\n final Bitmap snapshotBitmap = getSnapshot(snapshot);\n if (snapshotBitmap != null) {\n view.setBackground(new BitmapDrawable(context.getResources(), snapshotBitmap));\n }\n return view;\n }", "@Override\r\n\tpublic View makeView() {\n\t\tImageView image = new ImageView(this);\r\n\t\t// cente会让居中显示并缩放\r\n\t\timage.setScaleType(ScaleType.FIT_CENTER);\r\n\t\treturn image;\r\n\t}", "private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }", "private void drawOnProjectedBitMap(ImageView iv, Bitmap bm,\n float x0, float y0, float x, float y){\n if(x<0 || y<0 || x > iv.getWidth() || y > iv.getHeight()){\n //outside ImageView\n return;\n }else{\n\n float ratioWidth = (float)bm.getWidth()/(float)iv.getWidth();\n float ratioHeight = (float)bm.getHeight()/(float)iv.getHeight();\n\n mCanvas.drawLine(\n x0 * ratioWidth,\n y0 * ratioHeight,\n x * ratioWidth,\n y * ratioHeight,\n mPaint);\n mPhotoView.invalidate();\n }\n }", "@org.jetbrains.annotations.NotNull()\n public static final android.graphics.Bitmap screenshot(@org.jetbrains.annotations.NotNull()\n android.view.View $this$screenshot) {\n return null;\n }", "public static Bitmap createBitmap(int width, int height) {\n Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n bitmap.setHasAlpha(true);\n return bitmap;\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n // draw the keyboard on the bitmap\n drawOnBitmap();\n // draw the bitmap to the real canvas c\n canvas.drawBitmap(pianoBitmap, 0, 0, null);\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tBitmap b = null;\n\t\tfor (int i = 0; i < mViewNum; i++) {\n\t\t\tif (i == mCurrSelectIndex) {\n\t\t\t\tb = BitmapFactory.decodeResource(getResources(), R.mipmap.pic_select_point);\n\t\t\t} else {\n\t\t\t\tb = BitmapFactory.decodeResource(getResources(), R.mipmap.pic_noselect_point);\n\t\t\t}\n\t\t\tfloat vl = (float) getMeasuredWidth() / 2 - (float) (mViewNum * b.getWidth() + (mViewNum - 1) * b.getWidth()) / 2;\n\t\t\tvl = vl + (float) i * 2 * b.getWidth();\n\t\t\tcanvas.drawBitmap(b, vl, getMeasuredHeight() - 2 * b.getHeight(), null);\n\t\t}\n\t}", "public static Bitmap tomarScreenShot(Activity actividad) {\n View rootView = actividad.getWindow().getDecorView().findViewById(android.R.id.content);\n View screenView = rootView.getRootView();\n Bitmap bitmap = Bitmap.createBitmap(screenView.getWidth(), screenView.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n Drawable bgDrawable = screenView.getBackground();\n if (bgDrawable != null) {\n bgDrawable.draw(canvas);\n } else {\n canvas.drawColor(Color.WHITE);\n }\n screenView.draw(canvas);\n return bitmap;\n }", "private android.graphics.Bitmap getMaskBitmap() {\n /*\n r20 = this;\n r0 = r20;\n r1 = r0.f5066b;\n if (r1 == 0) goto L_0x0009;\n L_0x0006:\n r1 = r0.f5066b;\n return r1;\n L_0x0009:\n r1 = r0.f5069f;\n r2 = r20.getWidth();\n r1 = r1.m6537a(r2);\n r2 = r0.f5069f;\n r3 = r20.getHeight();\n r2 = r2.m6539b(r3);\n r3 = m6543a(r1, r2);\n r0.f5066b = r3;\n r4 = new android.graphics.Canvas;\n r3 = r0.f5066b;\n r4.<init>(r3);\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5049a;\n r5 = r0.f5069f;\n r5 = r5.f5059i;\n r5 = r5.ordinal();\n r3 = r3[r5];\n r5 = 4611686018427387904; // 0x4000000000000000 float:0.0 double:2.0;\n r7 = 2;\n if (r3 == r7) goto L_0x0074;\n L_0x003b:\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5050b;\n r8 = r0.f5069f;\n r8 = r8.f5051a;\n r8 = r8.ordinal();\n r3 = r3[r8];\n r8 = 0;\n switch(r3) {\n case 2: goto L_0x0055;\n case 3: goto L_0x0051;\n case 4: goto L_0x004f;\n default: goto L_0x004b;\n };\n L_0x004b:\n r9 = r1;\n r3 = 0;\n L_0x004d:\n r10 = 0;\n goto L_0x0058;\n L_0x004f:\n r3 = r2;\n goto L_0x0053;\n L_0x0051:\n r8 = r1;\n r3 = 0;\n L_0x0053:\n r9 = 0;\n goto L_0x004d;\n L_0x0055:\n r10 = r2;\n r3 = 0;\n r9 = 0;\n L_0x0058:\n r19 = new android.graphics.LinearGradient;\n r12 = (float) r8;\n r13 = (float) r3;\n r14 = (float) r9;\n r15 = (float) r10;\n r3 = r0.f5069f;\n r16 = r3.m6538a();\n r3 = r0.f5069f;\n r17 = r3.m6540b();\n r18 = android.graphics.Shader.TileMode.REPEAT;\n r11 = r19;\n r11.<init>(r12, r13, r14, r15, r16, r17, r18);\n r3 = r19;\n goto L_0x009c;\n L_0x0074:\n r3 = r1 / 2;\n r8 = r2 / 2;\n r16 = new android.graphics.RadialGradient;\n r10 = (float) r3;\n r11 = (float) r8;\n r3 = java.lang.Math.max(r1, r2);\n r8 = (double) r3;\n r12 = java.lang.Math.sqrt(r5);\n r8 = r8 / r12;\n r12 = (float) r8;\n r3 = r0.f5069f;\n r13 = r3.m6538a();\n r3 = r0.f5069f;\n r14 = r3.m6540b();\n r15 = android.graphics.Shader.TileMode.REPEAT;\n r9 = r16;\n r9.<init>(r10, r11, r12, r13, r14, r15);\n r3 = r16;\n L_0x009c:\n r8 = r0.f5069f;\n r8 = r8.f5052b;\n r9 = r1 / 2;\n r9 = (float) r9;\n r10 = r2 / 2;\n r10 = (float) r10;\n r4.rotate(r8, r9, r10);\n r9 = new android.graphics.Paint;\n r9.<init>();\n r9.setShader(r3);\n r5 = java.lang.Math.sqrt(r5);\n r3 = java.lang.Math.max(r1, r2);\n r10 = (double) r3;\n r5 = r5 * r10;\n r3 = (int) r5;\n r3 = r3 / r7;\n r5 = -r3;\n r6 = (float) r5;\n r1 = r1 + r3;\n r7 = (float) r1;\n r2 = r2 + r3;\n r8 = (float) r2;\n r5 = r6;\n r4.drawRect(r5, r6, r7, r8, r9);\n r1 = r0.f5066b;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.getMaskBitmap():android.graphics.Bitmap\");\n }", "@Override\r\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\r\n\t\tcanvas.drawBitmap(mStarting, 0, 0, null);\r\n\t}", "private void setPic() {\n int targetW =200;\n int targetH = 300;\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n bitmap1 = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n Log.e(\"bitmap\", \"\" + bitmap1);\n mAdapter = new MyAdapter(Goonlineactivity2.this,TITLES,ICONS,NAME,EMAIL,PROFILE); // Creating the Adapter of MyAdapter class(which we are going to see in a bit)\n // And passing the titles,icons,header view name, header view email,\n // and header view profile picture\n\n mRecyclerView.setAdapter(mAdapter);\n //profile11.setImageBitmap(bitmap1);\n\n \t\t/* Associate the Bitmap to the ImageView */\n\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tint count = canvas.saveLayer(0, 0, this.getWidth(), this.getHeight(), null, Canvas.ALL_SAVE_FLAG);\n\t\tcanvas.translate(0, original_view.getBottom() + reflection_spacing);\n\t\tif (!missing) {\n\t\t\tcanvas.save();\n\t\t\tcanvas.translate(original_view.getLeft(), original_view.getHeight());\n\t\t\tMatrix matrix = new Matrix();\n\t\t\tmatrix.postScale(scale, scale);\n\t\t\tmatrix.postScale(1, -1, -1, 1);\n\t\t\tcanvas.drawBitmap(original_bitmap, matrix, null);\n\t\t\tcanvas.restore();\n\t\t\tPaint paint = new Paint();\n\t\t\tpaint.setAntiAlias(false);\n\t\t\tfloat line_scale = large ? 1f / anim_scale : 1f;\n\t\t\tLinearGradient shader = new LinearGradient(0, 0, 0, original_view.getHeight() * reflection_scale\n\t\t\t\t\t* line_scale, 0x70ffffff, 0x00ffffff, TileMode.MIRROR);\n\t\t\t// 设置阴影\n\t\t\tpaint.setShader(shader);\n\t\t\tpaint.setXfermode(new PorterDuffXfermode(android.graphics.PorterDuff.Mode.DST_IN));\n\t\t\t// 用已经定义好的画笔构建一个矩形阴影渐变效果\n\t\t\tcanvas.drawRect(original_view.getLeft(), original_view.getTop(),\n\t\t\t\t\toriginal_view.getWidth(), original_view.getHeight()\n\t\t\t\t\t\t\t* reflection_scale, paint);\n\t\t}\n\t\tcanvas.restoreToCount(count);\n\t}", "public void mo8098a(Bitmap bitmap, Bitmap bitmap2) {\n if (bitmap2 != null) {\n C2342x.m9083a((View) this, (Drawable) new BitmapDrawable(getContext().getResources(), bitmap2));\n } else {\n C2342x.m9082a((View) this, 0);\n }\n if (bitmap != null) {\n this.f6228b = bitmap.getWidth();\n this.f6229c = bitmap.getHeight();\n this.f6227a.setImageBitmap(Bitmap.createBitmap(bitmap));\n return;\n }\n this.f6227a.setImageDrawable(null);\n }", "private Drawable rezizedDrawable() {\n Drawable logo = getResources().getDrawable(R.drawable.logo_compact);\n Bitmap mp = ((BitmapDrawable) logo).getBitmap();\n\n return new BitmapDrawable(getResources(), Bitmap.createScaledBitmap(mp, 100, 100, true));\n }", "private void setImage(int w, int h){\r\n l1= new BufferedImage(w,h,BufferedImage.TYPE_INT_ARGB);\r\n l1.createGraphics();\r\n g=(Graphics2D)l1.getGraphics (); \r\n }", "@Override\n protected void processLogic() {\n mBitmap = Bitmap.createBitmap(SystemUtils.getScreenWidth(), SystemUtils.getScreenHeight(), Config.ARGB_8888);\n mCanvas = new Canvas(mBitmap);\n mCanvas.drawColor(Color.WHITE);\n ivGraffit.setImageBitmap(mBitmap);\n mPaint = new Paint();\n mPaint.setColor(Color.GREEN);\n // 设置线宽\n mPaint.setStrokeWidth(15);\n mPaint.setAntiAlias(true);\n\n }", "public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }", "public Bitmap rotaingImageView(int angle , Bitmap bitmap) {\n Matrix matrix = new Matrix();\n matrix.postRotate(angle);\n // Create a new image\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }" ]
[ "0.72141975", "0.6963204", "0.66714835", "0.66495675", "0.64781123", "0.64500976", "0.6448667", "0.63981974", "0.6369302", "0.6281309", "0.6252411", "0.61738855", "0.6119207", "0.61021954", "0.6099651", "0.6028686", "0.6018211", "0.5973584", "0.5973299", "0.596183", "0.5931767", "0.59191436", "0.5882992", "0.5879262", "0.58788216", "0.57991177", "0.5728429", "0.5706332", "0.5701979", "0.56904554", "0.5686248", "0.5674799", "0.5660158", "0.5659911", "0.56576717", "0.56455094", "0.5632373", "0.5625424", "0.5624076", "0.5597324", "0.5583155", "0.55812794", "0.55780673", "0.5573795", "0.556238", "0.55420613", "0.55420357", "0.5528501", "0.55231756", "0.55230975", "0.5512914", "0.55070466", "0.5504729", "0.54961824", "0.5488088", "0.54801154", "0.54751414", "0.54744226", "0.5471479", "0.5462881", "0.5461827", "0.5455084", "0.5443505", "0.5439802", "0.54361016", "0.543065", "0.54293716", "0.5423615", "0.54211473", "0.54096746", "0.54007727", "0.53992903", "0.5392842", "0.5392111", "0.5389565", "0.53836876", "0.53728586", "0.53650033", "0.5356697", "0.53526855", "0.53525805", "0.53521085", "0.535012", "0.5346876", "0.5346397", "0.5337482", "0.5328973", "0.532666", "0.53242594", "0.53080153", "0.5305562", "0.5299293", "0.5287591", "0.52705735", "0.5259354", "0.525697", "0.52488315", "0.52464366", "0.524347", "0.5243054" ]
0.6473999
5
Serializes an object and saves it to a file
public static boolean exportNotes(ExportModel model, String fileName) { try { FileOutputStream fileOutputStream = new FileOutputStream(new File(getBackupDirectory() + "/" + fileName + fileSuffix)); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(model); objectOutputStream.close(); fileOutputStream.close(); return true; } catch (IOException e) { e.printStackTrace(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(object);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void save(final String filename, final Serializable object)\r\n throws IOException {\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n\r\n fos = new FileOutputStream(filename);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(object);\r\n out.close();\r\n }", "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\n }", "private void writeObject(String filePath, Object obj) throws IOException {\n OutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n output.writeObject(obj);\n output.close();\n }", "void writeObject(OutputSerializer out) throws java.io.IOException;", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "public static void saveObj(Object obj, File file)\n {\n try(ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)))\n {\n oos.writeObject(obj);\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to save file: \" + e.getMessage());\n }\n }", "void serialize(Object obj, OutputStream stream) throws IOException;", "public static void writeObjectToDisk(Object obj, String name) throws IOException {\r\n\t\t// Create file output stream\r\n\t\tFileOutputStream fileOutStr = new FileOutputStream(name);\r\n\t\t// Create object output stream and write object\r\n\t\tObjectOutputStream objOutStr = new ObjectOutputStream(fileOutStr);\r\n\t\tobjOutStr.writeObject(obj);\r\n\t\t// Close all streams\r\n\t\tobjOutStr.close();\r\n\t\tfileOutStr.close();\r\n\t\tSystem.out.printf(\"Serialized data is saved in a file - \" + name); // Printing message and file name which is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// saved\r\n\t}", "public void writeObject(Object obj) throws IOException;", "public void writeObject(Object obj, String path)throws IOException{\n FileOutputStream fos = new FileOutputStream(path);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n\n oos.writeObject(obj);\n oos.close();\n }", "@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer\n protected static void serializeObject(Serializable object, Path outputFile) {\n try {\n try (Closer closer = Closer.create()) {\n OutputStream out = closer.register(Files.newOutputStream(outputFile));\n BufferedOutputStream bout = closer.register(new BufferedOutputStream(out));\n serializeToLz4Data(object, bout);\n }\n } catch (Exception e) {\n throw new BatfishException(\"Failed to serialize object to output file: \" + outputFile, e);\n }\n }", "public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }", "public static void serialize(Object obj, String fileName) throws IOException {\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\toos.writeObject(obj);\n\n\t\tfos.close();\n\t}", "public abstract void serialize(OutputStream stream, T object) throws IOException;", "public static void writeObjectToFile(Serializable object, String fileName) throws IOException {\n try (FileOutputStream fos = new FileOutputStream(fileName);\n ObjectOutputStream oos = new ObjectOutputStream(fos);) {\n oos.writeObject(object);\n }\n }", "private void serialize(String file_name) {\n\t\t//Saving of object in a file\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(file_name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(file);\n\t\t\t// Method for serialization of object\n\t\t\tout.writeObject(this.GA);\n\n\t\t\tout.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has benn serialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,Object didnt save.\");\n\t\t}\n\t}", "public abstract <T> SerializationStream writeObject(T t);", "public static void save(Object o, String filename) {\n\t\ttry\n\t {\n\t\t\tfilename = \"save\" + File.separator + filename + \".hsc\";\n\t\t\tcreateSaveDirIfNotExisting();\n\t\t\tprepareSaveFile(filename);\n\t FileOutputStream fileOut = new FileOutputStream(filename);\n\t ObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t out.writeObject(o.getClass().cast(o));\n\t out.close();\n\t fileOut.close();\n\t //System.out.println(\"Serialized object is saved in \" + filename);\n\t }catch(NotSerializableException e) {\n\t \t System.out.println(\"Object to be saved does not implement java.io.Serializable!\");\n\t \t e.printStackTrace();\n\t }\n\t\tcatch(IOException i)\n\t {\n\t i.printStackTrace();\n\t } \n\t}", "public static final void serializeToFile(Object object,String filename)\n\t{\n\t\t// Define local constants.\n\n\t\tString METHOD_NAME = \"serializeToFile\";\n\n\t\t// Check the parameters received and throw the appropriate\n\t\t// exception if necessary.\n\n\t\tif ((null == object) || (null == filename))\n\t\t{\n\t\t\tthrow new NullPointerException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.NULL_PARAMETER_MSG));\n\t\t}\n\n\t\tif (0 == filename.length())\n\t\t{\n\t\t\tthrow new IllegalArgumentException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.ZERO_LENGTH_PARAMETER_MSG));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tObjectOutputStream objectOutputStream =\n\t\t\t\tnew ObjectOutputStream(new FileOutputStream(filename));\n\t\t\tobjectOutputStream.writeObject(object);\n\t\t\tobjectOutputStream.close();\n\t\t}\n\n\t\tcatch (IOException exception)\n\t\t{\n\t\t\tSystem.out.println(\"Caught: \" + exception);\n\t\t}\n\t}", "public static void saveObjToFile(Object obj, String filePath) throws IOException {\n // create the enclosing folders if it doesn't exist\n createDir(filePath);\n\n FileOutputStream file = new FileOutputStream(filePath);\n ObjectOutputStream out = new ObjectOutputStream(file);\n out.writeObject(obj);\n out.close();\n }", "private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }", "public void writeObject ();", "public boolean writeObject(Serializable object){\n try {\n FileOutputStream fileOut = new FileOutputStream(name);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(object);\n out.close();\n fileOut.close();\n System.out.println(\"Serialized data is saved in: \" + name);\n return true;\n } \n catch (IOException i) {\n System.out.println(\"Failed to load!\");\n return false;\n }\n }", "public void saveAsSerialization() {\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(new File(\"saves/data.dat\")))){\n os.writeObject(this);\n } catch (FileNotFoundException e){\n System.out.println(\"Could not create file: \" + e.getMessage());\n } catch (IOException e){\n System.out.println(\"IO exception occurred: \" + e.getMessage());\n }\n\n }", "public static void writeObject(Activity activity, Object object, String filename) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = activity.openFileOutput(filename, Context.MODE_PRIVATE);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(object);\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n closeOutputStream(fos);\n closeOutputStream(oos);\n }\n }", "String objectWrite();", "public void writeToFile(Object obj) throws FileNotFoundException, IOException\n {\n ObjectOutputStream writeToFile = null;\n\n try\n {\n FileOutputStream fileOutStream = new FileOutputStream(FILE_NAME);\n writeToFile = new ObjectOutputStream(fileOutStream);\n\n writeToFile.writeObject(obj);\n }\n finally\n {\n if (writeToFile != null)\n {\n try\n {\n writeToFile.close();\n }\n catch (IOException e)\n {\n displayErrorMessage(\"IO File error on\", FILE_NAME);\n }\n }\n }\n }", "private static void LessonSerialization() {\n PersonDAO personDAO = new PersonDAOImpl();\n Person person = personDAO.getPersonById(1);\n\n // serialize to a text file\n try {\n FileOutputStream fileOut = new FileOutputStream(\"./newfile.txt\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(person);\n out.close();\n fileOut.close();\n System.out.println(\"Person Object serialized and written to file: newfile.txt\");\n System.out.println(\"Serialized Object: \" + person.ToString());\n } catch(IOException ioEx) {\n System.out.println(ioEx);\n }\n }", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "private void writeObject(final ObjectOutputStream out) throws IOException {\n try {\n if (location == null) location = IOHelper.serializeData(object);\n IOHelper.writeData(location, new StreamOutputDestination(out));\n } catch (final IOException e) {\n throw e;\n } catch (final Exception e) {\n throw new IOException(e);\n }\n }", "private byte[] serialize(RealDecisionTree object){\n try{\n // Serialize data object to a file\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"MyObject.ser\"));\n out.writeObject(object);\n out.close();\n\n // Serialize data object to a byte array\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n out = new ObjectOutputStream(bos) ;\n out.writeObject(object);\n out.close();\n\n // Get the bytes of the serialized object\n byte[] buf = bos.toByteArray();\n return buf;\n } catch (IOException e) {\n System.exit(1);\n }\n\n return null;\n }", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;", "public static void storeObject(Object object, String filename) throws IOException\n {\n storeObject(object, new File(filename));\n }", "synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }", "private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}", "public static void serialize(Object object, String resourceDir, String filename) {\n\t\ttry\r\n\t\t{\r\n\t\t\tFileOutputStream fileOut;\r\n\t\t\tObjectOutputStream objectOut;\r\n\t\r\n\t\t\tfileOut = new FileOutputStream(resourceDir + filename);\r\n\t\t\tobjectOut = new ObjectOutputStream(fileOut);\r\n\t\t\tobjectOut.writeObject(object);\r\n\t\t\tobjectOut.close();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (IOException i) {\r\n\t\t\t//TODO fail test here?\r\n\t\t\tUtil.printInfo(\"IOException occurred while serializing object: \" + i.getMessage());\r\n\t\t\ti.printStackTrace();\r\n\t\t}\r\n\t}", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "void saveObject(DataObject sdo, XMLStreamWriter writer) throws XMLStreamException;", "public static void save(DSAGraph objToSave, String filename)\n {\n FileOutputStream fileStrm;\n ObjectOutputStream objStrm;\n\n try\n {\n fileStrm = new FileOutputStream(filename); //Underlying stream\n objStrm = new ObjectOutputStream(fileStrm); //Object serialization stream\n objStrm.writeObject(objToSave); //Serialize and save to filename\n objStrm.close();//Clean up\n }\n catch (Exception e)\n { //should do more here\n throw new IllegalArgumentException(\"Unable to save object to file: \" + e);\n }\n }", "public static boolean writeObjectToFile(Object obj, File f) {\r\n try {\r\n FileOutputStream fout = new FileOutputStream(f);\r\n ObjectOutputStream oos = new ObjectOutputStream(fout);\r\n oos.writeObject(obj);\r\n oos.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error writing Object to file: \"\r\n + e.getMessage());\r\n return false;\r\n }\r\n return true;\r\n }", "public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }", "public String getSerializedObj() {\r\n String serializedObject = null;\r\n // serialize the object\r\n // format = file content,size,name\r\n File f = this.fileObject;\r\n serializedObject = f.getBody()+\",\"+f.getFileSize()+\",\"+f.getName();\r\n return serializedObject;\r\n }", "public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;", "@Override\n\tpublic void write(Object obj, File file) throws IJunitException {\n\t\t\n\t}", "public <T> void serialize(T obj, Class<T> type, OutputStream os) throws SerializationException;", "public void writeObject(Object obj) throws IOException\n\t{\n\t\tif (obj == null) {\n\t\t\twriteMark(Ion.NULL);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBinary) {\n\t\t\tfinal IonBinary iObj = (IonBinary) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\tiObj.save(this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBundled) {\n\t\t\tfinal IonBundled iObj = (IonBundled) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tiObj.save(bundle);\n\t\t\twriteBundle(bundle);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBundled(obj)) {\n\t\t\tfinal IonizerBundled<?> ionizer = Ion.getIonizerBundledForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tionizer._save(obj, bundle);\n\t\t\twriteBundle(bundle);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBinary(obj)) {\n\t\t\tfinal IonizerBinary<?> ionizer = Ion.getIonizerBinaryForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tionizer._save(obj, this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Map) {\n\t\t\twriteMark(Ion.MAP);\n\t\t\twriteMap((Map<?, ?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Collection) {\n\t\t\twriteMark(Ion.SEQUENCE);\n\t\t\twriteSequence((Collection<?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Boolean) {\n\t\t\twriteMark(Ion.BOOLEAN);\n\t\t\twriteBoolean((Boolean) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Byte) {\n\t\t\twriteMark(Ion.BYTE);\n\t\t\twriteByte((Byte) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Character) {\n\t\t\twriteMark(Ion.CHAR);\n\t\t\twriteChar((Character) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Short) {\n\t\t\twriteMark(Ion.SHORT);\n\t\t\twriteShort((Short) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Integer) {\n\t\t\twriteMark(Ion.INT);\n\t\t\twriteInt((Integer) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Long) {\n\t\t\twriteMark(Ion.LONG);\n\t\t\twriteLong((Long) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Float) {\n\t\t\twriteMark(Ion.FLOAT);\n\t\t\twriteFloat((Float) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Double) {\n\t\t\twriteMark(Ion.DOUBLE);\n\t\t\twriteDouble((Double) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String) {\n\t\t\twriteMark(Ion.STRING);\n\t\t\twriteString((String) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof boolean[]) {\n\t\t\twriteMark(Ion.BOOLEAN_ARRAY);\n\t\t\twriteBooleans((boolean[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof byte[]) {\n\t\t\twriteMark(Ion.BYTE_ARRAY);\n\t\t\twriteBytes((byte[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof char[]) {\n\t\t\twriteMark(Ion.CHAR_ARRAY);\n\t\t\twriteChars((char[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof short[]) {\n\t\t\twriteMark(Ion.SHORT_ARRAY);\n\t\t\twriteShorts((short[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof int[]) {\n\t\t\twriteMark(Ion.INT_ARRAY);\n\t\t\twriteInts((int[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof long[]) {\n\t\t\twriteMark(Ion.LONG_ARRAY);\n\t\t\twriteLongs((long[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof float[]) {\n\t\t\twriteMark(Ion.FLOAT_ARRAY);\n\t\t\twriteFloats((float[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof double[]) {\n\t\t\twriteMark(Ion.DOUBLE_ARRAY);\n\t\t\twriteDoubles((double[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String[]) {\n\t\t\twriteMark(Ion.STRING_ARRAY);\n\t\t\twriteStrings((String[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Object[]) {\n\t\t\twriteMark(Ion.OBJECT_ARRAY);\n\t\t\twriteObjects((Object[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new IOException(\"Object \" + obj + \" could not be be written to stream.\");\n\t}", "private void writeObject(\n \t\t ObjectOutputStream aOutputStream\n\t\t ) throws IOException {\n\t\t //perform the default serialization for all non-transient, non-static fields\n \t\t aOutputStream.defaultWriteObject();\n \t}", "public void saveToStream(OutputStream stream, Model model);", "public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "private void writeObject(ObjectOutputStream out) throws IOException\r\n\t{\r\n\t\tthis.serialize(out);\r\n\t}", "@Override\n public void serializeObject(Object o, int hashCode, String destDir) {\n // throw new NotImplementedException();\n }", "public static File writeObjectToTempFile(Serializable o, String filename)\n/* */ throws IOException\n/* */ {\n/* 76 */ File file = File.createTempFile(filename, \".tmp\");\n/* 77 */ file.deleteOnExit();\n/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 79 */ oos.writeObject(o);\n/* 80 */ oos.close();\n/* 81 */ return file;\n/* */ }", "public void serialize(T t) throws IOException {\n FileOutputStream fileOutputStream = new FileOutputStream(this.mFile);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n DataOutputStream dataOutputStream = new DataOutputStream(bufferedOutputStream);\n this.mCodec.serialize(t, dataOutputStream);\n dataOutputStream.flush();\n $closeResource(null, dataOutputStream);\n $closeResource(null, bufferedOutputStream);\n $closeResource(null, fileOutputStream);\n }", "public void saveObject(@NonNull final FileOutputStream fos) throws IOException {\n\t\tObjectOutputStream out = null;\n\t\t\n\t\ttry {\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(this);\n\t\t} finally {\n\t\t\tif(null != out)\n\t\t\t\tout.close();\n\n\t\t\tfos.close();\n\t\t}\n\t}", "public void save(File filename) throws IOException {\n FileOutputStream fos = new FileOutputStream(filename);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.close();\n }", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n //perform the default serialization for all non-transient, non-static fields\n aOutputStream.defaultWriteObject();\n }", "public static void main(String[] args) throws IOException {\nPerson p=new Person(101,\"reya\");\nFileOutputStream fo=new FileOutputStream(\"something.txt\");\nObjectOutputStream os=new ObjectOutputStream (fo);\nos.writeObject(p);\nSystem.out.println(\"Serialization Success\");//should implemet serializable concept\n\t}", "public void Serializar(){\n try {\n FileOutputStream archivo = new FileOutputStream(\"SerializacionEdificios\");\n ObjectOutputStream salida = new ObjectOutputStream(archivo);\n salida.writeObject(edificios);\n archivo = new FileOutputStream(\"SerializacionEstudiantes\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(estudiantes);\n archivo = new FileOutputStream(\"SerializacionProfesores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(profesores);\n archivo = new FileOutputStream(\"SerializacionAdministradores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(administradores);\n salida.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "OutputStream serialize(OutputStream toSerialize);", "public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "@Override\r\n public boolean save(Object object, String fileName)\r\n throws FileAlreadyExistsException, IOException, JAXBException {\n File outputFile = new File(fileName);\r\n FileWriter fstream = new FileWriter(outputFile);\r\n BufferedWriter xmlOutputWriter = new BufferedWriter(fstream);\r\n \r\n if(!this.enableOverwrite && outputFile.exists()) {\r\n throw new FileAlreadyExistsException(fileName);\r\n }\r\n \r\n try {\r\n this.jaxbObjectToXML(object, xmlOutputWriter);\r\n } finally {\r\n xmlOutputWriter.close();\r\n } \r\n \r\n return (outputFile.length() > 0);\r\n }", "private void saveToDir(String name, Object obj) {\n\t\tFileOutputStream fileOut = null;\n\t\ttry {\n\t\t\tfileOut = new FileOutputStream(this.dir + \"/\" + name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t\t\tout.writeObject(obj);\n\t\t\tout.close();\n\t\t\tfileOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while saving the index file: \" + name);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Override\n public boolean save(String file) {\n boolean ans = false;\n ObjectOutputStream oos;\n try {\n FileOutputStream fileOut = new FileOutputStream(file, true);\n oos = new ObjectOutputStream(fileOut);\n oos.writeObject(this);\n ans= true;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace(); }\n catch (IOException e) {e.printStackTrace();}\n return ans;\n }", "public static void serialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n List<Object> toSave = new ArrayList<>();\n toSave.add(models);\n if (userData != null) {\n toSave.add(userData);\n }\n\n try {\n FileOutputStream fos = new FileOutputStream(filePath, false);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(toSave);\n\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void Serialization() {\n\t\tGitlet myGitlet = new Gitlet(1);\n\t\tmyGitlet.myBranch = this.myBranch;\n\t\tmyGitlet.myCommit = this.myCommit;\n\t\tmyGitlet.messageMap = this.messageMap;\n\t\tmyGitlet.myHead = this.myHead;\n\t\tmyGitlet.stagedFiles = this.stagedFiles;\n\t\tmyGitlet.tracked = this.tracked;\n\t\tmyGitlet.stagePath = this.stagePath;\n\t\tmyGitlet.ID = this.ID;\n\t\tmyGitlet.currentBranch = this.currentBranch;\n\t\tmyGitlet.untrackedFiles = this.untrackedFiles;\n\t\tmyGitlet.conflictState = this.conflictState;\n\t\ttry {\n\t\t\tFileOutputStream fileOut = new FileOutputStream(\n\t\t\t\t\t\".gitlet/Serialization.ser\");\n\t\t\tObjectOutputStream outStream = new ObjectOutputStream(fileOut);\n\t\t\toutStream.writeObject(myGitlet);\n\t\t\toutStream.close();\n\t\t\tfileOut.close();\n\n\t\t} catch (IOException i) {\n\t\t\ti.printStackTrace();\n\t\t}\n\n\t}", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static File writeObjectToFileNoExceptions(Serializable o, String filename)\n/* */ {\n/* 47 */ file = null;\n/* 48 */ ObjectOutputStream oos = null;\n/* */ try {\n/* 50 */ file = new File(filename);\n/* */ \n/* 52 */ oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 53 */ oos.writeObject(o);\n/* 54 */ oos.close();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 65 */ return file;\n/* */ }\n/* */ catch (Exception e)\n/* */ {\n/* 56 */ e.printStackTrace();\n/* */ } finally {\n/* 58 */ if (oos != null) {\n/* */ try {\n/* 60 */ oos.close();\n/* */ }\n/* */ catch (Exception ioe) {}\n/* */ }\n/* */ }\n/* */ }", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n\t java.io.IOException\n {\n s.defaultWriteObject();\n }", "public abstract Object marshal(Object objO, File objF);", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n java.io.IOException\n {\n s.defaultWriteObject();\n }", "private void serializeToFile(File file) {\n\t\ttry {\n FileOutputStream outputStream = new FileOutputStream(file); // a file stream for writing the serialized objects two.\n ObjectOutputStream byteStream = new ObjectOutputStream(outputStream); // connect the byte stream to the file stream\n byteStream.writeObject(myProjects); // write objects to a byte stream for putting in a file\n byteStream.close(); \n outputStream.close();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: file could not be read.\");\n\t\t}\n\t}", "public void serialize() {\n\t\t\n\t}", "public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;", "@Override\r\n public byte[] toBinary(Object obj) {\r\n return JSON.toJSONBytes(obj, SerializerFeature.WriteClassName);\r\n }", "public static boolean saveToFile(Object o, String fileName) {\n FileOutputStream fos = null;\n BufferedOutputStream bos = null;\n ObjectOutputStream oos = null;\n File objectFile = null;\n\n objectFile = new File(fileName);\n try {\n fos = new FileOutputStream(objectFile);\n bos = new BufferedOutputStream(fos);\n oos = new ObjectOutputStream(bos);\n oos.writeObject(o);\n oos.close();\n bos.close();\n fos.close();\n } catch (FileNotFoundException e) {\n return false;\n } catch (IOException e) {\n return false;\n }\n return true;\n }", "public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }", "private boolean saveObjectToFile(String filename,Object object) {\n //engine.logMessage(\"Saving new cache data to: \"+filename);\n ObjectOutputStream outputStream = null;\n try { \n File file=new File(filename);\n File directory=file.getParentFile();\n if (directory==null) throw new IOException(\"Cache directory error\");\n synchronized(this) { // synchronize this because the mkdirs will return false if the directory has been created by another Thread in the meantime\n if (!directory.exists()) {\n if (!directory.mkdirs()) throw new IOException(\"Unable to create cache directory: \"+directory.getAbsolutePath());\n }\n }\n outputStream = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n outputStream.writeObject(object);\n outputStream.close(); \n } catch (Exception e) {\n engine.logMessage(\"WARNING: Unable to store data in cache: \"+e.getMessage());\n return false;\n } finally {\n try {if (outputStream!=null) outputStream.close();} catch (Exception x) {engine.logMessage(\"SYSTEM WARNING: Unable to close ObjectOutputStream in cache: \"+x.getMessage());}\n } \n return true; \n }", "public void save(OutputStream out) throws IOException {\n\t\ttry (GZIPOutputStream zipOut = new GZIPOutputStream(out)) {\n\t\t\ttry (ObjectOutputStream objOut = new ObjectOutputStream(zipOut)) {\n\t\t\t\tobjOut.writeObject(this);\n\t\t\t}\n\t\t}\n\t}", "public static void writeJsonObjectFile(JsonEntity objectToWrite, String filePath) \n\t{\n\t\tGson gsonParser = new Gson();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFiles.write(gsonParser.toJson(objectToWrite).getBytes(), new File(filePath));\n\t\t}\n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.err.println(\"Can't write to the json file\" + e.getMessage());\n\t\t}\n\t}", "public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }", "private void writeObject(ObjectOutputStream oos) throws IOException {\n oos.defaultWriteObject();\n /*if(serializeEverything) {\n //The cast to Serializable is necessary to avoid Sonar bug issues because List does not implement Serializable but all implementations of List (such as ArrayList) in effect implements Serializable\n //oos.writeObject((Serializable)cardPower);\n oos.writeObject((Serializable)weapons);\n oos.writeInt(points);\n }\n serializeEverything = false;*/\n }", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public boolean SerializeObject(Object object, String sFilePath) {\n boolean bRetVal = false;\n File f = null;\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n f = new File(sFilePath);\n\n if (f.exists()) {\n f.delete();\n }\n\n File dir = new File(f.getParent());\n dir.mkdirs();\n f.createNewFile();\n\n fos = new FileOutputStream(f);\n oos = new ObjectOutputStream(fos);\n\n } catch (Exception e) {\n } finally {\n try {\n oos.writeObject(object);\n } catch (Exception e) {\n }\n try {\n oos.close();\n } catch (Exception e) {\n }\n try {\n fos.close();\n } catch (Exception e) {\n }\n f = null;\n return bRetVal;\n }\n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public void writeObject(ZObjectOutputStream out) throws IOException {\n }", "private static <T extends Serializable> byte[] pickle(T obj)\n throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(baos);\n oos.writeObject(obj);\n oos.close();\n return baos.toByteArray();\n }", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "byte[] serialize(Serializable object);", "static void WriteEmployeeObjectIntoFile(Employee emp,String filename)\n\t{\n\t\t\n\t try\n\t {\n\t FileOutputStream fileOut =\n\t new FileOutputStream(filename);\n\t ObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t //Main write method\n\t out.writeObject(emp);\n\t out.close();\n\t fileOut.close();\n\t System.out.printf(\"Serialized data is saved in \" + filename);\n\t }catch(IOException i)\n\t {\n\t i.printStackTrace();\n\t }\n\t}", "public static void storeObject(Object data, File file) throws IOException\n {\n FileOutputStream stream = null;\n try\n {\n stream = new FileOutputStream(file);\n stream.write(toPlist(data).getBytes());\n }\n finally\n {\n silentlyClose(stream);\n }\n }", "public void serializeObject(String fileName, Automobile automobile) {\n try {\n String path = System.getProperty(\"user.dir\");\n String fileNameWithPath = path + File.separator + fileName;\n if(DEBUG) {\n System.out.printf(\" File Name with Path : %s\", fileNameWithPath);\n }\n FileOutputStream fileOut = new FileOutputStream(fileNameWithPath);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(automobile);\n out.close();\n fileOut.close();\n System.out.printf(\"Serialized data is saved in automotive.ser %s%n\", fileName);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "public static File writeObjectToTempFileNoExceptions(Serializable o, String filename)\n/* */ {\n/* */ try\n/* */ {\n/* 93 */ return writeObjectToTempFile(o, filename);\n/* */ } catch (Exception e) {\n/* 95 */ System.err.println(\"Error writing object to file \" + filename);\n/* 96 */ e.printStackTrace(); }\n/* 97 */ return null;\n/* */ }", "public void save(OutputStream os) throws IOException;", "private final void writeObject(ObjectOutputStream out) throws java.io.IOException {\n\t\tthrow new java.io.IOException(\"Object cannot be serialized\");\n\t}", "public static byte[] save(Object obj) {\r\n byte[] bytes = null;\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n ObjectOutputStream oos = null;\r\n try {\r\n oos = new ObjectOutputStream(baos);\r\n oos.writeObject(obj);\r\n oos.flush();\r\n bytes = baos.toByteArray();\r\n } catch (IOException e) {\r\n e.printStackTrace(); //To change body of catch statement use Options | File Templates.\r\n }\r\n return bytes;\r\n }", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "@Override\r\n public void serializar() throws IOException {\n File fich=new File(\"datos.bin\");\r\n FileOutputStream fos = new FileOutputStream(fich);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(gestor);\r\n oos.close();\r\n }", "@Override\n\tpublic void doSaveAs() {\n\t}" ]
[ "0.77212346", "0.7623706", "0.7617733", "0.75681823", "0.75676817", "0.7521736", "0.74823153", "0.74705005", "0.7336172", "0.7228282", "0.7201881", "0.7194811", "0.7144011", "0.70967287", "0.709617", "0.70916516", "0.7089801", "0.70729506", "0.70715433", "0.7065625", "0.7050601", "0.7046993", "0.70447236", "0.70381546", "0.7035969", "0.7019105", "0.7014576", "0.6981097", "0.69777685", "0.6940851", "0.6939282", "0.6918398", "0.6913316", "0.68960506", "0.6881028", "0.6851902", "0.68378466", "0.6825794", "0.6779217", "0.6760995", "0.67572135", "0.6732348", "0.6678255", "0.66761255", "0.6664715", "0.66484386", "0.66472155", "0.663451", "0.66312164", "0.66234016", "0.66197", "0.6587862", "0.6559923", "0.655542", "0.653689", "0.65355384", "0.6531117", "0.652841", "0.65222603", "0.6508834", "0.6499139", "0.64945686", "0.64638984", "0.6429757", "0.64179534", "0.6416688", "0.63967687", "0.6393298", "0.63806075", "0.6377605", "0.637737", "0.6368958", "0.63612765", "0.63590205", "0.63581175", "0.6357723", "0.6354682", "0.63494563", "0.6343061", "0.6340662", "0.6322247", "0.63183135", "0.6315951", "0.6315252", "0.630994", "0.63080263", "0.6307181", "0.629429", "0.6291676", "0.62916535", "0.62892956", "0.62847155", "0.6280472", "0.6280193", "0.62746435", "0.6269738", "0.6263709", "0.62506264", "0.6245294", "0.6243541", "0.6243357" ]
0.0
-1
Returns all RemoteDocuments to initiate the view's table
@Override protected DocumentCollection getInitialDocuments() { return Core.getInstance().getRemoteDocuments(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FindIterable<Document> getAllDocuments() {\n\t\tMongoDatabase db = mongoClient.getDatabase(MongoActions.props.getDBName());\n\t\tMongoCollection<Document> table = db.getCollection(MongoActions.props.getCollectionName());\n\t\tFindIterable<Document> iterable = table.find();\n\n\t\treturn iterable;\n\t}", "public List<FileServer> viewAllFileServer() {\n\t\tList<FileServer> fileservers=getHibernateTemplate().find(\"from FileServer\");\r\n\t\t//另外一种方法\r\n\t\t/*Session session=getHibernateTemplate().getSessionFactory().openSession();\r\n\t\tTransaction ts=session.beginTransaction();\r\n\t\tQuery query=session.createQuery(\"from FileServer\");\r\n\t\t\r\n\t\tList<FileServer> fileservers=query.list();\r\n\t\t\r\n\t\tts.commit();\r\n\t\tsession.close();\r\n\t\tsession=null;*/\r\n\t\treturn fileservers;\r\n\t}", "Collection<Document> getDocuments();", "public ArrayList<SaleDocumentPO> displayAll() throws RemoteException {\n\t\r\n\t\treturn saleDocumentPOs;\r\n\t}", "@GET\r\n @Produces({MediaType.APPLICATION_XML})\r\n public Set<Document> findAll() throws InternalServerErrorException{\r\n LOGGER.info(\"Peticion de todos los documentos\");\r\n Set<Document> collection = null;\r\n try {\r\n collection = ejb.getDocumentList();\r\n } catch (GetCollectionException ex) {\r\n LOGGER.warning(\"ERROR en la obtencion de la lista de documentos\");\r\n throw new InternalServerErrorException();\r\n }\r\n LOGGER.info(\"Respuesta de obtencion de lista de documentos\");\r\n return collection;\r\n }", "@Transactional\n\t@Override\n\tpublic List<Documents> getShareDocuments() {\n\t\treturn documentsDao.getShareDocuments();\n\t}", "public DocumentListFeed getAllDocuments() throws MalformedURLException, IOException, ServiceException;", "public DocumentList getDocuments() {\n return documents;\n }", "@SuppressWarnings(\"unchecked\")\n protected List<File> getAllDocuments() {\n\n return (List<File>)stage.getProperties().get(GlobalConstants.ALL_DOCUMENTS_PROPERTY_KEY);\n }", "public List<DBDoc> getAllObjects() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<SubstageDocument> getAll() throws Exception {\n\t\treturn null;\r\n\t}", "public Collection<JsonDocument> getDocuments() {\n return this.cache.values();\n }", "public final void getSaleDocList() {\n showLoadingIndicator(true);\n SaleDocListViewModel saleDocListViewModel = this.viewModel;\n if (saleDocListViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n String authString = getAuthString();\n String deviceId = AppUtils.getDeviceId(this);\n Intrinsics.checkExpressionValueIsNotNull(deviceId, \"AppUtils.getDeviceId(this)\");\n saleDocListViewModel.getSaleDocList(authString, deviceId, \"android\", String.valueOf(BuildConfig.VERSION_CODE), getRequestBody());\n }", "public Collection<BaseDocument> getAllDocuments() {\n\t\tVector<BaseDocument> ret = new Vector<BaseDocument>();\n\n\t\tret.add(this);\n\t\tret.add(theStructures);\n\n\t\treturn ret;\n\t}", "@Override\n\tpublic List<TypeDocument> findAll() {\n\t\treturn typeDocumentRepository.findAll();\n\t}", "@Override\n\tpublic List<Document> findDocument() {\n\t\treturn null;\n\t}", "public abstract List<ClinicalDocument> findAllClinicalDocuments();", "public Set<Document> getDocuments() {\n return documents;\n }", "public ArrayList<Document> getDocumentList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<Document> list = new ArrayList<Document>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblDocument.class);\n\t\t\tcr.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);\n\t\t\tList<TblDocument> documents = cr.list();\n\t\t\tif (documents.size() > 0){\n\t\t\t\tfor (Iterator<TblDocument> iterator = documents.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblDocument tbldocument = iterator.next();\n\t\t\t\t\tDocument document = new Document();\n\t\t\t\t\tdocument.convertFromTable(tbldocument);\n\t\t\t\t\tlist.add(document);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Logbook> viewRecords() {\n\t\treturn user.viewRecords();\r\n\t}", "int[] allDocs();", "public List<IDoc> getDocs();", "public List<IDoc> getDocs();", "public ArrayList<Document> getDocs() {\n return documents;\n }", "public List<DocumentVO> getDocumentsByEntity(Object ownerId) throws DataServiceException {\r\n\t\tList<DocumentVO> toReturn;\r\n\t\ttry {\r\n\t\t\tHashMap<String, String> map = new HashMap<String, String>();\r\n\t\t\tString soId = (String)ownerId;\r\n\t map.put(\"so_id\", soId);\r\n\t map.put(\"file_name\", Constants.ThumbNail.THUMBNAIL_SUFFIX);\r\n\t\t\ttoReturn = queryForList(\"so.document.query_by_so_id\", map);\r\n\t\t\ttoReturn = documentService.retrieveDocumentsFromDBOrFS(toReturn);\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\tthrow new DocumentRetrievalException(\"Unable to retrieve documents for: \" + ownerId,e);\r\n\t\t}\r\n\t\tif (null == toReturn) {\r\n\t\t\ttoReturn = new ArrayList<DocumentVO>();\r\n\t\t}\r\n\t\treturn toReturn;\r\n\t}", "private void getLive() {\n DocumentModelList lives = ToutaticeEsQueryHelper.unrestrictedQuery(this.session, String.format(ToutaticeWebIdHelper.LIVE_WEB_ID_QUERY, this.webId), 1);\n if (CollectionUtils.isNotEmpty(lives) && lives.size() == 1) {\n this.documents.add(lives.get(0));\n }\n }", "public List<DocDownloadForm> allDocList(DataSource dataSource) \r\n\t{\n\t\treturn impl.allDocList(dataSource);\r\n\t}", "@RequestMapping(path = \"documentos\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Documento> listaDocumentos() {\n\t\ttry {\n\t\t\treturn documentoServicio.listar();\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"=====\\nError Ctrl:(listaDocumentos):\\n\" + ex.getMessage()+\"\\n\");\n\t\t\treturn null;\n\t\t}\n\t}", "public static ArrayList<Document> getDocumentList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_DOCUMENTS;\n\t\tReceiveContent rp1 = sendReceive(rp);\n\t\tArrayList<Document> doc = (ArrayList<Document>) rp1.parameters[0];\n\t\treturn doc;\n\t}", "@Transactional\n\n\t@Override\n\tpublic Collection<FileModel> getAll() {\n\t\treturn fm.findAll();\n\t}", "public List<ModelObject> readAll();", "public java.util.List<SceneDocument> getDocuments() {\n return documents;\n }", "@Transactional\n\t@Override\n\tpublic List<Documents> findDocuments(int userId) {\n\t\treturn documentsDao.findDocuments(userId);\n\t}", "public ArrayList<Reponce> getAllReponces() {\n\t\tArrayList<Reponce> listReponces = new ArrayList<Reponce>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t// start a transaction\n\t\t//Transaction transaction = session.beginTransaction();\n\t\tQuery en = session.createQuery(\"FROM Reponce\", Reponce.class);\n\t\tlistReponces = (ArrayList<Reponce>) en.getResultList();\n\t\treturn listReponces;\n\t}", "public List<Documentacion> getDocumentaciones() {\r\n\r\n\t\tList<Documentacion> lista = LatidoFacade.getInstance().getFindAllList(Documentacion.class.getName());\r\n\t\treturn lista;\r\n\t}", "public String[] allDocs() {\r\n\t\t\r\n\t\tFile folderNames = new File(folderName);\r\n int i=0;\r\n File[] files = folderNames.listFiles();\r\n String[] documents = new String[files.length];\r\n for (File file: files)\r\n {\r\n \tdocuments[i] = file.getName();\r\n i++;\r\n }\r\n return documents;\t\r\n\t}", "@Override\r\n\tpublic List<Libro> readAll() {\n\t\treturn libroRepository.findAll();\r\n\t}", "@Override\n\tpublic List<File> getAll() {\n\t\t return getSession().\n\t createQuery(\"from File f\", File.class).\n\t getResultList();\n\t}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public DocumentListFeed getAllTrashedObjects() throws MalformedURLException, IOException, ServiceException;", "public RealmResults<PhotoGalleryModel> getPhotos( ) {\n return realm.where(PhotoGalleryModel.class).findAll();\n\n }", "@Override\n @Transactional(readOnly = true)\n public List<FileDTO> findAll() {\n log.debug(\"Request to get all Files\");\n return fileRepository.findAll().stream().map(FileMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public synchronized List<MTDDocument> getDocumentos(Collection<Integer> ids){\r\n\t\tArrayList<MTDDocument> listaRetorno = new ArrayList<MTDDocument>();\r\n\t\tDirectoryReader reader;\r\n\t\ttry {\r\n\t\t\treader = DirectoryReader.open(getCopiaDiretorioMemoria());\r\n\t\tIndexSearcher searcher = new IndexSearcher(reader);\t\t\r\n\t for(Integer docId: ids){\r\n \t\tDocument documento = searcher.doc(docId.intValue());\r\n \t\tif(documento != null){\r\n \t\tMTDDocument doc = new MTDDocumentBuilder().buildDocument(documento).build();\r\n \t\tdoc.setDocId(docId.intValue());\r\n \t\tlistaRetorno.add(doc);\r\n \t\t}else\r\n \t\t{System.out.println(\"Document with docId \"+docId.intValue()+\" not found.\");}\r\n\t }\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\t\treturn listaRetorno;\r\n\t}", "@Override\n\tpublic List<TiposDocumentos> findAllTipoDocumento() {\n\t\treturn documentoLogic.findAll();\n\t}", "@OneToMany(mappedBy = \"folder\")\n public List<CharmsDocument> getDocuments() {\n return documents;\n }", "@Override\r\n\tpublic List<AsxDataVO> findAll() {\n\t\treturn mongoTemplate.find(new Query(), AsxDataVO.class);\r\n\t}", "public static String getAllRecords() {\n Log.i(CLASS_NAME, \"getAllRecords\");\n final String apiString = \"_search?pretty=true&q=*:*\";\n return ElasticRestClient.get(getIndex(), getType(), apiString, \"{ \\\"size\\\" : \\\"1000\\\"}\");\n }", "@Override\n @Transactional\n public List<Contacts> findAll() {\n Session currentSession = entiyManager.unwrap(Session.class);\n\n //create the query\n\n Query<Contacts> theQuery = currentSession.createQuery(\"from Contacts\", Contacts.class);\n\n //execute query and get result list\n\n List<Contacts> contacts = theQuery.getResultList();\n\n //return the results\n\n return contacts;\n }", "public DBCursor getFileList() {\n\treturn getFileList(new BasicDBObject());\n }", "List<NewsFile> selectAll();", "DataSources retrieveDataSources() throws RepoxException;", "@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}", "private List<BdmDocument> getDocumentList() {\n\t\tList<BdmDocument> documents = new ArrayList<>(1);\n\t\tdocuments.add(new BdmDocument(this.getTestBdm()));\n\t\treturn documents;\n\t}", "@Override\n\tpublic List<Libro> readAll() {\n\t\treturn libroDao.readAll();\n\t}", "@Override\n public List<Clip> findAll() {\n return fillList(logsCollection.find());\n }", "public List<Pagos> findAll(){\n return pagoMongoRepository.findAll();\n }", "public List<Document> execute(){\n if(!advancedQuery)\n return convertToDocumentsList(executeRegularQuery());\n else\n return convertToDocumentsList(executeAdvancedQuery());\n }", "Collection<Book> getAll();", "public static List<FoundObject> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "@Override\n Flux<CentreRegroupement> findAll();", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "public List findAll() {\n\t\treturn dao.findAll();\r\n\t}", "public Collection<Document> getAllVersions() {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic List<Customer> findall() {\n\t\treturn (List<Customer>) h.find(\"from Customer\");\n\t}", "public Collection findAll() {\n\t\treturn null;\r\n\t}", "public void index() {\n\t\t\n\t\tList<Filme> preferencias = new ArrayList<Filme>();\n\t\tfor( Map.Entry<Key, Integer> entry : session.getUsuario().getPreferencias().entrySet()){\n\t\t\tFilme tmp = filmeDao.getById(entry.getKey());\n\t\t\ttmp.setVotos(entry.getValue());\n\t\t\tpreferencias.add(tmp);\n\t\t}\n\t\t\n\t\t// passando todos os filmes, o usuário e as preferencias dele\n\t\tresult.include(\"filmes\", filmeDao.getAllInOrder() );\n\t\tresult.include(\"usuario\", session.getUsuario() );\n\t\tresult.include(\"preferencias\", preferencias);\n\t}", "public List<TermSpanRecord> getResults()\n {\n String whereClause = \"owner = ?\";\n List<TermSpanRecord> results = TermSpanRecord.find(TermSpanRecord.class, whereClause, new String[]{String.valueOf(getId())});\n return results;\n }", "public List<MCRContent> getAll() throws IOException, JDOMException, SAXException {\n\t\tList<MCRContent> resultsSet = new ArrayList<>();\n\t\t// build basic part of API URL\n\t\tString baseQueryURL = API_URL + \"/affiliation/AFFILIATION_ID:\" + AFFIL_ID + \"?apikey=\" + API_KEY\n\t\t\t\t+ \"&view=DOCUMENTS\";\n\n\t\t// divide API request in blocks a XXX documents (in final version 200\n\t\t// documents per block, number of blocks determined by total number of\n\t\t// documents)\n\t\t// int numberOfPublications = getNumberOfPublications(baseQueryURL);\n\t\t// at the moment only testing, two blocks a 10 documents\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tint start = 10 * i;\n\t\t\tint count = 10;\n\n\t\t\t// build API URL\n\t\t\tString queryURL = baseQueryURL + \"&start=\" + start + \"&count=\" + count + \"&view=DOCUMENTS\";\n\n\t\t\t// add block to list of blocks\n\t\t\tresultsSet.add(getResponse(queryURL));\n\t\t}\n\t\t// return API-response\n\t\treturn resultsSet;\n\t}", "public List<InvoiceViewModel> getAllInvoices(){\n\n try{\n return invoiceService.getAllInvoices();\n }catch (RuntimeException e){\n throw new InvoiceNotFoundException(\"The database is empty!!! No Invoice(s) found in the Database\");\n }\n }", "public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);", "@Override\n\tpublic Iterable<Flight> viewAllFlight() {\n\t\treturn flightDao.findAll();\n\t}", "@Override\n public List<Revue> getAll() {\n return null;\n }", "@Override\r\n\tpublic List<Invoice> findAll() {\n\t\treturn null;\r\n\t}", "@View(name = \"all\", map = \"function(doc) { if (doc.metadata && doc.signingKey && doc.encryptionKey \"\n + \"&& (doc.appliesTo==null || doc.appliesTo=='CAS' || doc.appliesTo=='')) { emit(doc._id, doc) } }\")\n public CouchDbSamlIdPMetadataDocument getForAll() {\n val view = createQuery(\"all\").limit(1);\n return db.queryView(view, CouchDbSamlIdPMetadataDocument.class).stream().findFirst().orElse(null);\n }", "public ClsNodeDocument[] GetDocuments (String transID, String dataFlow);", "public ArrayList<ServerClient> displayAll() throws SQLException\n\t{\n\t\tString SQL_P = \"SELECT * FROM Clients\";\n\t\tResultSet rs;\n\n\t\tArrayList<ServerClient> array = new ArrayList<>();\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\trs = stmt.executeQuery(SQL_P);\n\t\t\twhile (rs.next())\n\t\t\t{\n\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "public List<ViajeroEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos\");\n TypedQuery<ViajeroEntity> query = em.createQuery(\"select u from ViajeroEntity u\", ViajeroEntity.class);\n return query.getResultList();\n }", "public List<FileServer> viewAllFileServer(int pageNow,int pageSize) {\n\t\tSession session=getHibernateTemplate().getSessionFactory().openSession();\r\n\t\tTransaction ts=session.beginTransaction();\r\n\t\tQuery query=session.createQuery(\"from FileServer\");\r\n\t\tint firstResult=(pageNow-1)*pageSize;\r\n\t\tquery.setFirstResult(firstResult);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\tList<FileServer> fileservers=query.list();\r\n\t\tts.commit();\r\n\t\tsession.close();\r\n\t\tsession=null;\r\n\t\treturn fileservers;\r\n\t}", "public List findAll() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<Object> findAll() {\n\t\treturn null;\r\n\t}", "private void getAllMovements(ServerRequest request,\n ServerResponse response) {\n\n MediaType contentType = MediaType.APPLICATION_JSON;\n \n myResult = \"[\";\n \n collection.find().forEach(buildJSONAllDocuments);\n myResult = myResult.substring(0, myResult.length() - 1);\n myResult = myResult + \"]\";\n response.headers().contentType(contentType);\n response.headers().add(\"Access-Control-Allow-Origin\",\"*\");\n response.headers().add(\"Cache-Control\",\"max-age=120\");\n response.status(Http.Status.OK_200).send(myResult);\n }", "public ArrayList<VtbObject> findAll() throws MappingException {\n\t\treturn null;\n\t}", "public List<T> showAllClients();", "public List<Page> searchAll() {\n return mysqlDao.searchAll();\n }", "private void findPlantsList() {\n try {\n\n RemoteMongoCollection<Document> plants = mongoDbSetup.getCollection(getString(R.string.eye_plant_plants));\n RemoteMongoIterable<Document> plantIterator = plants.find();\n\n final ArrayList<Document> docsToUser = new ArrayList<>();\n\n plantIterator\n .forEach(document -> {\n docsToUser.add(document);\n setPlantList(docsToUser);\n })\n .addOnFailureListener(e -> Log.e(TAG, \"Error\" + e.getCause()))\n\n .addOnCompleteListener(task -> {\n\n if (getPlantList().size() == docsToUser.size() && getPlantList().size() != 0) {\n setUpRecyclerView();\n }\n });\n } catch (Throwable e) {\n Log.e(TAG, \"NullPointerException: \" + e.getMessage());\n }\n }", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchByUrl(String... values) {\n return fetch(Document.DOCUMENT.URL, values);\n }", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }", "public java.util.Collection allRetrieveAETs() \n throws javax.ejb.FinderException;", "@RequestMapping(method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\t@Transactional(readOnly = true)\r\n\tpublic Collection<Model> list() {\r\n\t\treturn getService().list();\r\n\t}", "@Override\n\tpublic List<Dispositivo> getAll() {\n\t\treturn (List<Dispositivo>) dispositivoDao.findAll();\n\t}", "public List<T> list()\n\t{\n\t\tfinal List<T> list = this.dao.findAll();\n\t\treturn list;\n\t}", "@GetMapping(\"/document-entities\")\n public ResponseEntity<List<DocumentEntityDTO>> getAllDocumentEntities(Pageable pageable) {\n log.debug(\"REST request to get a page of DocumentEntities\");\n Page<DocumentEntityDTO> page = documentEntityService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/document-entities\");\n return ResponseEntity.ok().headers(headers).body(page.getContent());\n }", "public CompletableFuture<Iterable<T>> findAll() {\n\t\treturn this.getAll().thenApply((ts) -> (Iterable<T>) ts);\n\t}", "List<Report> selectAll();", "@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}", "private void collect() {\n\n System.out.println(\"Getting IndexReader...\");\n final IndexReader reader = index.reader();\n\n System.out.println(\"Calling forEachDocument()...\");\n index.forEachDocument(new DocTask() {\n\n int docsDone = 0;\n\n final int totalDocs = reader.maxDoc() - reader.numDeletedDocs();\n\n @Override\n public void perform(BlackLabIndex index, int docId) {\n Map<String, String> metadata = new HashMap<>();\n Document luceneDoc = index.luceneDoc(docId);\n for (IndexableField f: luceneDoc.getFields()) {\n // If this is a regular metadata field, not a control field\n if (!f.name().contains(\"#\")) {\n fieldNames.add(f.name());\n if (f.stringValue() != null)\n metadata.put(f.name(), f.stringValue());\n else if (f.numericValue() != null)\n metadata.put(f.name(), f.numericValue().toString());\n }\n }\n values.add(metadata);\n docsDone++;\n if (docsDone % 100 == 0) {\n int perc = docsDone * 100 / totalDocs;\n System.out.println(docsDone + \" docs exported (\" + perc + \"%)...\");\n }\n }\n });\n }", "@RequestMapping(value = \"\", method = RequestMethod.GET)\n public ArrayList<Invoice> getAllInvoice() {\n return DatabaseInvoicePostgre.getAllInvoice();\n }", "List<Office> findAll();", "public List<TipoDocumento> listar() throws SQLException{\n ArrayList<TipoDocumento> tipodocumentos = new ArrayList();\n TipoDocumento tipodocumento;\n ResultSet resultado;\n String sentenciaSQL = \"SELECT documentoid, descripcion FROM tipodocumento;\";\n \n resultado = gestorJDBC.ejecutarConsulta(sentenciaSQL);\n while(resultado.next()){ \n //para hacer \"new Genero\" necesito tener un Construtor vacio.\n tipodocumento = new TipoDocumento();\n tipodocumento.setTipodocumentoid(resultado.getInt(\"documentoid\"));\n tipodocumento.setDescripcion(resultado.getString(\"descripcion\"));\n tipodocumentos.add(tipodocumento);\n }\n resultado.close();\n return tipodocumentos; \n }" ]
[ "0.6495842", "0.6308081", "0.626024", "0.6183256", "0.6146862", "0.6136674", "0.6091485", "0.60824466", "0.5950546", "0.59498066", "0.5905608", "0.58881176", "0.58710605", "0.57885796", "0.57844025", "0.5741484", "0.5736811", "0.56978506", "0.5674922", "0.5642113", "0.56366265", "0.5635573", "0.5635573", "0.5605512", "0.5558856", "0.5525212", "0.55057627", "0.5503347", "0.54847443", "0.5470617", "0.5470502", "0.5456373", "0.54548687", "0.5443797", "0.5441663", "0.54394144", "0.5435524", "0.5434544", "0.5407083", "0.5364804", "0.53405946", "0.5339155", "0.5318665", "0.5317241", "0.5313839", "0.5301817", "0.5293641", "0.5288706", "0.52823347", "0.5282021", "0.5278124", "0.5277611", "0.5276092", "0.52713245", "0.5268996", "0.5265593", "0.5261378", "0.52489614", "0.52483565", "0.5245147", "0.5221627", "0.5221569", "0.5220874", "0.5218252", "0.52130175", "0.52115154", "0.5203349", "0.51971984", "0.51948506", "0.51943207", "0.5194091", "0.519406", "0.5188296", "0.51857924", "0.5184406", "0.5183854", "0.5183258", "0.5176541", "0.51651573", "0.51637644", "0.51535976", "0.5143899", "0.5141892", "0.51385075", "0.51329815", "0.5131261", "0.51277125", "0.51224804", "0.5109143", "0.51087", "0.5091042", "0.50840515", "0.50818473", "0.5079262", "0.5073694", "0.5073416", "0.5072785", "0.5072461", "0.50722027", "0.50718004" ]
0.6779241
0
Adds a button to add new remote documents
@Override protected void afterCreation(final Composite parent) { unshareButton.setText("Disconnect selection"); addRemoteDocumentButton = new Action() { @Override public void run() { UserActionController uac = Core.getInstance().getUserActionController(); uac.executeAddRemoteDocument(null); } }; addRemoteDocumentButton.setText("Connect to remote document"); addRemoteDocumentButton.setImageDescriptor(Core .getImageDescriptor("icons/add_remote.png")); addRemoteDocumentButton.setEnabled(true); IActionBars bars = getViewSite().getActionBars(); bars.getToolBarManager().add(addRemoteDocumentButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickAddButton() {\n\t\tfilePicker.fileManButton(locAddButton);\n\t}", "public void addButton()\n\t{\n\t\tdriver.findElement(By.xpath(\"//input[@name='Insert']\")).click();\n\t}", "public void add(PhotonDoc doc);", "public boolean addReceivedExternalDocument(AddReceivedExternalDocumentsCommand aCommand);", "private JButton createAddResourceButton() {\n\n JButton addBtn = new JButton(\"Add\");\n addBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n\n List<Resource> resourcesList = controller.getResoucesList();\n\n for (Resource resource : controller.getDemonstration().getResourcesList()) {\n resourcesList.remove(resource);\n }\n\n if (resourcesList.isEmpty()) {\n throw new IllegalArgumentException();\n }\n\n DialogSelectable dialogoNewResource = new DialogSelectable(CreateDemonstrationUI.this, resourcesList, \"Select Resource from list:\");\n Resource selectedResource = (Resource) dialogoNewResource.getSelectedItem();\n if (selectedResource == null) {\n throw new NullPointerException();\n }\n\n if (controller.addResource(selectedResource)) {\n updateResourcesList();\n String successMessage = \"Resource added successfully!\";\n String successTitle = \"Resource added.\";\n\n JOptionPane.showMessageDialog(rootPane, successMessage, successTitle, JOptionPane.INFORMATION_MESSAGE);\n }\n } catch (NullPointerException ex) {\n\n } catch (IllegalArgumentException ex) {\n\n String warningMessage = \"There is no more resources to add\";\n String warningTitle = \"No more resources in system\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n\n } catch (Exception ex) {\n\n String warningMessage = \"Something wen't wrong please try again.\";\n String warningTitle = \"ERROR 404\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n }\n\n }\n });\n return addBtn;\n }", "void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }", "private void setupAddToReviewButton() {\n\t\tImageIcon addreview_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"addtoreview.png\");\n\t\tJButton add_to_review = new JButton(\"\", addreview_button_image);\n\t\tadd_to_review.setBounds(374, 598, 177, 100);\n\t\tadd_to_review.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twords_to_add_to_review.add(words_to_spell.get(current_word_number));\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tadd_to_review.addMouseListener(new VoxMouseAdapter(add_to_review,null));\n\t\tadd(add_to_review);\n\t}", "private void setUpAddBookButton()\n {\n setComponentAlignment(addBookButton, Alignment.BOTTOM_LEFT);\n addBookButton.setCaption(\"Add\");\n addBookButton.addClickListener(new Button.ClickListener() {\n public void buttonClick(Button.ClickEvent event)\n {\n Object id = bookTable.getValue();\n int book_id = (int)bookTable.getContainerProperty(id,\"id\").getValue();\n basket.add(allBooksBean.getIdByIndex(book_id-1));\n //basket.add(allBooks.get(book_id-1));\n errorLabel.setCaption(\"Successfully added book to Basket\");\n }\n });\n }", "public VBox addButton(ObservableList<Song> searchResults, ObservableList<Song> playlist) {\r\n\t \t\tVBox vbox = new VBox();\r\n\t \t\tsearchResults = searchResults;\r\n\t \t\tplaylist = playlist;\r\n\t \t\tvbox.setPadding(new Insets(350, 100, 350, 10));\r\n\t \t\tButton addSongBtn = new Button();\r\n\t \t\taddSongBtn.setText(\"Add Song\");\r\n\t \t\taddSongBtn.setPrefSize(25.0, 15);\r\n\t \t\taddSongBtn.setAlignment(Pos.CENTER_LEFT);\r\n\t \t\t\r\n\t \t\tvbox.getChildren().addAll(addSongBtn);\r\n\t \t\t\r\n\t \t\treturn vbox;\r\n\t \t}", "public void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\r\n\t\t\t\t\t\tvenObjectsByPack.init(\"NEW\");\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(venObjectsByPack);\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}", "private void actionAdd() {\n\t\tURL verifiedUrl = verifyUrl(addTextField.getText());\n\t\tif (verifiedUrl != null) {\n\t\t\ttableModel.addDownload(new Download(verifiedUrl));\n\t\t\taddTextField.setText(\"\"); // reset add text field\n\t\t} else {\n\t\t\ttf.dispose();\n\t\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\"Invalid Download URL\", \"Error\",\n\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "protected void renderAddNewDataButton () {\n\t\tnew Timer() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tdataGrid.appendButton(I18Utilities.getInstance().getInternalitionalizeText(getAddDataIconCaptionI18nCode(), getAddDataIconDefaultCaption()), \"ui-icon-document\", new Command() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tshoAddNewDataEditor();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t}.schedule(100);\n\t}", "private void addButton()\n {\n JButton button = new JButton();\n button.setSize(200, 30);\n button.setName(\"login\");\n button.setAction(new CreateUserAction());\n add(button);\n button.setText(\"Login\");\n }", "public RequestedDocument addRequestedDocument(AddRequestedDocumentCommand aCommand);", "private JButton getCmdAddT() {\r\n\t\tif (cmdAddT == null) {\r\n\t\t\tcmdAddT = new JButton();\r\n\t\t\tcmdAddT.setText(\"\");\r\n\t\t\tcmdAddT.setActionCommand(\"LoadF\");\r\n\t\t\tcmdAddT.setToolTipText(\"Import proxy list from file. The list should be ip:port or ip port.\");\r\n\t\t\tcmdAddT.setIcon(new ImageIcon(getClass().getResource(\"/Import-48.png\")));\r\n\t\t\tcmdAddT.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\tString filename = getFilename();\r\n\r\n\t\t\t\t\tif (filename != null)\r\n\t\t\t\t\t\taddRows( p.getProxyFromFile(filename) );\r\n\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdAddT;\r\n\t}", "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tvenEditarPacks.init(\"NEW\",null);\r\n\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\t\t\r\n\t\t\t}", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "private JButton getCmdAdd() {\r\n\t\tif (cmdAdd == null) {\r\n\t\t\tcmdAdd = new JButton();\r\n\t\t\tcmdAdd.setText(\"\");\r\n\t\t\tcmdAdd.setToolTipText(\"Add single proxy\");\r\n\t\t\tcmdAdd.setIcon(new ImageIcon(getClass().getResource(\"/add.png\")));\r\n\t\t\tcmdAdd.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\taddProxy = getJDialog();\r\n\t\t\t\t\taddProxy.pack();\r\n\t\t\t\t\taddProxy.setSize(new Dimension(231, 144));\r\n\t\t\t\t\taddProxy.setLocationRelativeTo(jContentPane);\r\n\t\t\t\t\taddProxy.setVisible(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t\treturn cmdAdd;\r\n\t}", "private void addButtonActionPerformed() {//GEN-FIRST:event_addButtonActionPerformed\r\n this.controller.OnAddPhoto();\r\n }", "protected JButton createAddButton() {\n JButton butAdd = new JButton();\n butAdd.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/add.jpg\")));\n butAdd.setToolTipText(\"Add a new item\");\n butAdd.addActionListener(new AddItemListener());\n return butAdd;\n }", "@FXML\n private void copyAdd() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(ADD_MESSAGE);\n clipboard.setContent(url);\n }", "private void addUniqueToViewNodes() {\n\t\taddFilterButton();\n\t\t\n\t\t/* Button Initialization */\n\t\t//This Button Creates a Report\n\t\tcreateReportBtn = new Button(\"Create Report\");\n\t\tcreateReportBtn.getStyleClass().add(\"GreenButton\");\n\t\tcreateReportBtn.setOnAction(e -> {\n\t\t\tCreateReportPopup crPopup = new CreateReportPopup(\"Create Report\");\n\t\t\tcrPopup.show();\n\t\t});\n\t\t\n\t\t// This Button views the currently selected report in more detail\n\t\treportDetailsBtn = new Button(\"Report Details\");\n\t\treportDetailsBtn.getStyleClass().add(\"GreenButton\");\n\t\t\n\t\t/* Assembly */\n\t\tactionButtons.getChildren().addAll(createReportBtn, reportDetailsBtn);\n\t\t\n\t\tactionButtons.setPrefHeight(Values.ACTION_BUTTONS_PREF_WIDTH);\n\t}", "public void setAddButton(UIComponent addButton) {\r\n this.addButton = addButton;\r\n }", "public DynaForm addButton(Button button) {\n\t\treturn null;\r\n\t}", "void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }", "HasClickHandlers getCreateNewButton();", "private Button constructCreationLinkButton(UUID creationID){\n\n CreationControllable cc = (CreationControllable) builder.getControllers()[1];\n if (!cc.containsCreation(creationID)){\n return null;\n }\n\n String[] creationInfo = cc.viewCreationSummary(creationID, viewer);\n Button b = new Button(creationInfo[0] + \" ( \" + creationInfo[1] + \" ) By: \"+ creationInfo[2]);\n\n b.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n stage.close();\n CreationViewController controller = getCreationBrowserController();\n if (controller == null){\n return;\n }\n controller.linkCreationCallback(creationID);\n stage.show();\n }\n });\n\n return b;\n }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "private JButton addButton(String name) {\n JButton button = new JButton(name);\n button.setActionCommand(name);\n buttonsPanel.add(button);\n return button;\n }", "public void addVehicleSaveButton() {\r\n\t\tsafeJavaScriptClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-col-24 button.ant-btn.ant-btn-primary\"));\r\n\t}", "stockFilePT102.StockFileDocument.StockFile addNewStockFile();", "private JButton createButton(final Box addTo, final String label) {\n JButton button = new JButton(label);\n button.setActionCommand(label);\n button.addActionListener(this);\n addTo.add(button);\n return button;\n }", "private JButton createButtonAddKeyword() {\n\n JButton btn = new JButton(\"Add Keyword\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (newKeyword(JOptionPane.showInputDialog(\"Insert a Keyword\"))) {\n JOptionPane.showMessageDialog(rootPane, \"Keyword inserted sucessfully!\", \"Sucess\", JOptionPane.PLAIN_MESSAGE);\n }\n\n }\n });\n\n return btn;\n }", "@FXML\r\n private void onBtnAddReview(ActionEvent event) {\n reviewRecordsList.add(new ReviewRecords(reviewRecordsList.size()));\r\n }", "private void uploadLocalDocument(){\t\t\n\t\tif(getFileChooser(JFileChooser.FILES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tNode node = null;\n\t\t\ttry {\n\t\t\t\tnode = alfrescoDocumentClient.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t\t//Node node = alfrescoManager.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\t\t\n\t\t\tif(node!=null){\n\t\t\t\tgetDynamicTreePanel().getChildFiles(getTreeSelectedDefaultMutableNode());\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha subido correctamente.\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al subir el documento.\");\n\t\t}\n\t\t//el boton solo esta activo si un directorio esta seleccionado en el arbol directorios\n\t\t//se abre un filechooser y se elije un documento\n\t\t//solo se sube a alfresco, no se asocia automaticamente\n\t\t//se enviara la instancia de File() con el fichero seleccionado\n\t\t//se crea el fichero en alfresco, se recupera el nodo y se añade a la tabla actual (se hace de nuevo la peticion a getChildFiles())\n\t}", "public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }", "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}", "@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }", "public void addButton(HtmlSubmitButton b) {\r\n\t\t_buttons.add(b);\r\n\t\tadd(b, TYPE_COMP);\r\n\t}", "void onAddClicked();", "private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add User\");\n addButton.setIcon(PortalLookAndFeel.getAddIcon());\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addUser();\n }\n });\n }\n return addButton;\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "@OnClick(R.id.documents_button)\n protected void onPickFromDocumentsClicked() {\n EasyImage.openDocuments(this);\n }", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "private JButton getCmdAddProxy() {\r\n\t\tif (cmdAddProxy == null) {\r\n\t\t\tcmdAddProxy = new JButton();\r\n\t\t\tcmdAddProxy.setBounds(new Rectangle(85, 79, 57, 22));\r\n\t\t\tcmdAddProxy.setText(\"Add\");\r\n\t\t\tcmdAddProxy.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\tString ip = txtA.getText()+\".\"+txtB.getText()+\".\"+txtC.getText()+\".\"+txtD.getText();\r\n\t\t\t\t\tObject[] data = {mark, ip, txtPort.getText(),\"\",\"\"};\r\n\t\t\t\t\taddRow(data);\r\n\t\t\t\t\taddProxy.setVisible(false);\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdAddProxy;\r\n\t}", "private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n addButton.setForeground(new Color(247, 37, 133));\n addButton.addActionListener(this);\n addButton.setContentAreaFilled(false);\n addButton.setFocusPainted(false);\n addButton.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n addButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "public void setAddBtn(JButton addBtn) {\n\t\tthis.addBtn = addBtn;\n\t}", "public JButtonOperator btAddFromLibrary() {\n if (_btAddFromLibrary==null) {\n _btAddFromLibrary = new JButtonOperator(this, \"Add from Library...\"); // NOI18N\n }\n return _btAddFromLibrary;\n }", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "public void actionPerformed(ActionEvent e){\n\t\t\topenAdd();\n\t\t}", "public AddRandomList() {\n setTitleText(\"Add new random List\");\n\n addButton.setText(\"Add\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n addButton(addButton);\n }", "public void setNewButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public AddList() {\n setTitleText(\"Add new List\");\n addButton = new JButton(\"Add\");\n addButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n addButtonActionPerformed(actionEvent);\n }\n });\n addButton(addButton);\n }", "public void clickCreateFolderButton() {\n\t\tfilePicker.fileManButton(locCreateFolderButton);\n\t}", "private void addButton(final FrameContainer<?> source) {\n final JToggleButton button = new JToggleButton(source.toString(),\n IconManager.getIconManager().getIcon(source.getIcon()));\n button.addActionListener(this);\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setMinimumSize(new Dimension(0,buttonHeight));\n button.setMargin(new Insets(0, 0, 0, 0));\n buttons.put(source, button);\n }", "public void newDocument();", "void documentAdded(SingleDocumentModel model);", "public ImportFromURLAction(){\n\t\tsuper();\n\t\tsetText(\"Import from remote OMPL document\");\n\t\tsetImageDescriptor(ImageDescriptor.createFromFile(ImportFromURLAction.class,\"/images/importfromurl.png\"));\n\t\tsetToolTipText(\"Import a group of feeds from a remote OPML file\");\n\t}", "private void addContainerButton(){\n ContainerAddDialogNameTextfield.setText(\"\");\n ContainerAddDialog.setVisible(true);\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "@FXML\n private void add() {\n\n var firstName = firstNameTextField.getText();\n var lastName = lastNameTextField.getText();\n\n // validate params\n if (firstName.isBlank() ||\n lastName.isBlank()) {\n alertDialog.show(\"All Fields are Required!\");\n return;\n }\n\n loadingImageView.setVisible(true); // show the loading animation\n\n // make an http request to add new author\n AuthorRequest\n .getInstance()\n .add(firstName, lastName)\n .thenAcceptAsync(success -> Platform.runLater(() -> {\n loadingImageView.setVisible(false);\n String message;\n if (success) {\n message = \"Successful!\";\n // clear all form fields\n firstNameTextField.clear();\n lastNameTextField.clear();\n } else message = \"Something went wrong!\";\n alertDialog.show(message); // show response\n }));\n\n }", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private Button addButton(Configuration config, String name) {\r\n Button button = new HintedButton(config, name);\r\n button.addActionListener(this);\r\n add(button);\r\n return button;\r\n }", "public void addButton(String label, ActionListener listener) {\n JButton button = new JButton(label);\n buttonPanel.add(button);\n button.addActionListener(listener);\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }", "private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add\");\n addButton.setToolTipText(\"Add new notification settings for a site\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addBalloonSettings();\n }\n });\n }\n return addButton;\n }", "private void addSearchFieldAndButton() {\n\t\tsearchButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.SEARCH);\n\t\tsearchButton.setEnabled(false);\n searchField = new JTextField(20);\n searchField.setEnabled(false);\n\t\tsearchField.setToolTipText(\"Search...\");\n\t\ttoolPanel.add(searchField);\n\t\ttoolPanel.add(searchButton);\n\n ActionListener queryListener = new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString query = searchField.getText();\n controller.getViewController().addView(\"query\", \"q\"+query, false);\n\t\t\t}\n\t\t};\n\n searchField.addActionListener(queryListener);\n\t\tsearchButton.addActionListener(queryListener);\n }", "public void openAddClientAdm(ActionEvent event) throws IOException {\n\t\tFXMLLoader addClientFxml = new FXMLLoader(getClass().getResource(\"Add-Client.fxml\"));\n\t\taddClientFxml.setController(this);\n\t\tParent addRoot = addClientFxml.load();\n\t\tmainPane_AdministratorOptionsWindow.getChildren().setAll(addRoot);\n\t}", "public void onAdd() {\n String bookTitle = details[0];\n String author = details[1];\n boolean addedCorrectly = ControllerBook.addBook(this.ISBN, author, bookTitle, \"\");\n if (addedCorrectly) {\n dispose();\n } else {\n\n pack();\n }\n\n }", "public void addButton( AbstractButton button ) {\r\n synchronized (buttons) {\r\n buttons.add( button );\r\n }\r\n }", "public String addNew() {\r\n\t\ttry {\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\treturn \"questData\";\r\n\t\t} catch(Exception e) {\r\n\t\t\tlogger.error(\"Exception in addNew in action:\" + e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addPages() {\n //super.addPages(); //<--- notice we're overriding here\n mainPage = new NewTargetWizardPage(\"newFilePage1\", getSelection());//$NON-NLS-1$\n mainPage.setTitle(TITLE);\n mainPage.setDescription(DESCRIPTION); \n addPage(mainPage);\n }", "public void addButton(final JButton theButton) {\n customButtonPanel.add(theButton);\n }", "protected void clickOnCreerClient() {\n\t\t\t_currentPage = ((DoliNouveauTiersPage)_currentPage).clickOnCreerClient();\n\t\t}", "@Override\n public String getServletInfo() {\n return \"Adds document\";\n }", "public VBox addVBox() {\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(10)); // Set all sides to 10\n vbox.setSpacing(8); // Gap between nodes\n\n\n\n Image addCategoryImage = new Image(getClass().getResourceAsStream(\"images/buttons/Add.png\"));\n\n// title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 14));\n Button addCategoryButton = new Button(\"\", new ImageView(addCategoryImage));\n addCategoryButton.setOnAction(event -> addVBox());\n// vbox.getChildren().addAll(title,addCategoryButton);\n\n// Hyperlink options[] = new Hyperlink[] {new Hyperlink(\"FOOD\")};\n// for (int i=0; i<1; i++) {\n//\n// // Add offset to left side to indent from title\n// VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n// vbox.getChildren().add(options[i]);\n// }\n\n return vbox;\n }", "private void addGalleryCommand(FlamingoCommand command) {\n JCommandToggleButton button = (JCommandToggleButton) command.buildButton();\n button.getActionModel().addChangeListener(new ChangeListener() {\n boolean wasRollover = false;\n\n @Override\n public void stateChanged(ChangeEvent e) {\n boolean isRollover = button.getActionModel().isRollover();\n if (wasRollover && !isRollover) {\n if (galleryModel != null) {\n galleryModel.cancelPreview(command);\n }\n }\n if (!wasRollover && isRollover) {\n if (galleryModel != null) {\n galleryModel.activatePreview(command);\n }\n }\n wasRollover = isRollover;\n }\n });\n\n this.buttons.add(button);\n this.buttonSelectionGroup.add(button);\n this.commands.add(command);\n button.setDisplayState(this.buttonDisplayState);\n\n super.add(button);\n }", "private void add() {\n \tfinal DBBrowserTree dbBrowserTree = new DBBrowserTree(type, false);\n \tdbBrowserTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);\n dbBrowserTree.addMouseListener(new MouseAdapter() {\n public void mousePressed(MouseEvent e) {\n job(e, true);\n }\n\n public void mouseReleased(MouseEvent e) {\n job(e, false);\n }\n\n private void job(MouseEvent e, boolean pressed) {\n \tTreePath[] paths = dbBrowserTree.getSelectionPaths();\n if (paths == null) {\n return;\n }\n dbBrowserTree.setSelectionPaths(paths);\t\t\t\t\n }\n });\n JScrollPane scroll = new JScrollPane(dbBrowserTree);\n scroll.setPreferredSize(scrTreeDim);\n \n JPanel panel = new JPanel();\n panel.add(scroll);\n \n JDialog dialog = new BaseDialog(panel, I18NSupport.getString(\"wizard.publish.entities.select\"), true) {\n \t protected boolean ok() {\n \t\t TreePath[] paths = dbBrowserTree.getSelectionPaths();\n if (paths == null) {\n return false;\n } \n \t\t\t\tfor (TreePath selPath : paths) {\t\t\t\t\t\n \t\t\t\t\tfinal DBBrowserNode selectedNode = (DBBrowserNode) selPath.getLastPathComponent();\t \t\t\t\t\t\n \t\t\t\t\tif (!selectedNode.getDBObject().isFolder()) {\n \t\t\t\t\t\tString path = selectedNode.getDBObject().getAbsolutePath();\n \t\t\t\t\t\tif (!listModel.contains(path)) {\n \t\t\t\t\t\t // convert xml if needed before add to list\n\t\t\t\t\t\t\tif (selectedNode.getDBObject().getType() == DBObject.REPORTS) {\n\t\t\t\t\t\t\t\tbyte result = ConverterUtil.convertIfNeeded(path);\n\t\t\t\t\t\t\t\tif (result != ConverterUtil.TYPE_CONVERSION_EXCEPTION) {\n\t\t\t\t\t\t\t\t\tlistModel.addElement(path);\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\tlistModel.addElement(path);\n\t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\t\n \t\t\t\t\t} \t\t\t\t\t\n \t\t\t\t}\n \t return true;\n \t }\n };\n \tdialog.setBackground(Color.WHITE); \t\n dialog.pack(); \n Show.centrateComponent(Globals.getMainFrame(), dialog);\n dialog.setVisible(true); \t\n }", "@FXML\n void addButton(ActionEvent event) {\n\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n\n if (selectedPart == null) {\n AlartMessage.displayAlertAdd(6);\n } else {\n assocParts.add(selectedPart);\n assocPartTableView.setItems(assocParts);\n }\n }", "private void addControls() {\n\t\tAjaxButton button = new AjaxButton(\"submitButton\", ResourceUtils.getModel(\"button.save\")) {\n\t\t\t@Override\n protected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n onSubmitAction(strWrapper, target, form);\n target.add(form);\n }\n\n\t\t\t@Override\n\t\t\tprotected void onError(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tsuper.onError(target, form);\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tform.add(button);\n\n\t\tbutton = new AjaxButton(\"cancelButton\", ResourceUtils.getModel(\"button.cancel\")) {\n\t\t\t@Override\n\t\t\tprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tonCancelAction(strWrapper, target, form);\n\t\t\t\tform.clearInput();\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tbutton.setDefaultFormProcessing(false);\n\t\tform.add(button);\n\n\t}", "protected void shoAddNewDataEditor () {\n\t\t\n\t\t\n\t\tinstantiateDataForAddNewTemplate(new AsyncCallback< DATA>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// ini tidak mungkin gagal\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(final DATA result) {\n\t\t\t\teditorGenerator.instantiatePanel(new ExpensivePanelGenerator<BaseDualControlDataEditor<PK,DATA>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onPanelGenerationComplete(\n\t\t\t\t\t\t\tBaseDualControlDataEditor<PK, DATA> widget) {\n\t\t\t\t\t\tconfigureAndPlaceEditorPanel(widget);\n\t\t\t\t\t\twidget.requestDoubleSubmitToken(null);\n\t\t\t\t\t\twidget.addAndEditNewData(result);\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\t\n\t\t\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "private void setUpSearchButton()\n {\n searchButton.setCaption(\"Go\");\n searchButton.addClickListener(new Button.ClickListener() {\n public void buttonClick(Button.ClickEvent event)\n {\n //Grab the data from the database base on the search text\n //Assume all search is author name for now\n String searchValue = searchText.getValue();\n \n //Remove all values in the table\n bookTable.removeAllItems();\n \n //Grab Data from database\n List<Book> books = collectDataFromDatabase(searchValue);\n \n //Put the data into the table\n allBooksBean.addAll(books);\n //putDataIntoTable(books);\n }\n });\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "@FXML\n public void buttonAddItem(ActionEvent actionEvent) {\n //adds a list item to the table\n }", "public void manageInputPointCreation(){\n Button addInputButton = new Button();\n addInputButton.setId(\"addInputListButton\");\n\n addInputButton.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n try {\n Map<String, IYamlDomain> newMap = new HashMap<String, IYamlDomain>();\n newMap.put(Integer.toString(_addCounter), _class.newInstance());\n _abstractUiNode.getChilds().get(0).addInputData(newMap);\n _addCounter ++;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n _abstractUiNode.getChildren().add(addInputButton);\n addInputButton.setVisible(true);\n StackPane.setAlignment(addInputButton, Pos.BOTTOM_LEFT);\n\n }", "private JButton getCmdUrl() {\r\n\t\tif (cmdUrl == null) {\r\n\t\t\tcmdUrl = new JButton();\r\n\t\t\tcmdUrl.setText(\"\");\r\n\t\t\tcmdUrl.setToolTipText(\"Import proxy list from remote file. List should be in ip:port or ip port format.\");\r\n\t\t\tcmdUrl.setIcon(new ImageIcon(getClass().getResource(\"/remote.png\")));\r\n\t\t\tcmdUrl.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\tString url = JOptionPane.showInputDialog(null,\r\n\t\t\t\t\t\t\t\"Import from remote file\",\r\n\t\t\t\t\t\t\t\"Enter the remote url of your proxy list\",\r\n\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\tif (url!=null)\r\n\t\t\t\t\t\taddRows(p.getProxyFromUrl(url));\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdUrl;\r\n\t}", "protected javax.swing.JButton getJButtonNew() {\n\t\tif(jButton2 == null) {\n\t\t\tjButton2 = new javax.swing.JButton();\n\t\t\tjButton2.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton2.setMnemonic(java.awt.event.KeyEvent.VK_N);\n\t\t\tjButton2.setName(\"New\");\n\t\t\tjButton2.setText(\"New...\");\n\t\t\tjButton2.setToolTipText(\"Add a new play entry to the list below\");\n\t\t\tjButton2.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) { \t\t\t\t\t\n\t\t\t\t\tVideoEntryEditor ed = new VideoEntryEditor(PlayListDialog.this);\n\t\t\t\t\ted.setThemeFiles( getThemeFiles() );\n\t\t\t\t\ted.show();\n\t\t\t\t\t\n\t\t\t\t\tif( ed.getResponse() == JOptionPane.OK_OPTION ) {\n\t\t\t\t\t\tgetTableModel().addRow( ed.getVideoEntry() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton2;\n\t}", "public void addBookmarks(ActionEvent event) throws IOException{\n bookmarkTxt();\n }", "public void addProj() {\n\t\tbtnAdd.click();\n\t}", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "public void addNewFiles(java.lang.String param){\r\n if (localNewFiles == null){\r\n localNewFiles = new java.lang.String[]{};\r\n }\r\n\r\n \r\n //update the setting tracker\r\n localNewFilesTracker = true;\r\n \r\n\r\n java.util.List list =\r\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localNewFiles);\r\n list.add(param);\r\n this.localNewFiles =\r\n (java.lang.String[])list.toArray(\r\n new java.lang.String[list.size()]);\r\n\r\n }" ]
[ "0.64679396", "0.6116965", "0.5943869", "0.5930959", "0.59135026", "0.5903383", "0.5882467", "0.58692914", "0.57991296", "0.57430303", "0.57418305", "0.57296866", "0.5696654", "0.56918764", "0.56569725", "0.5633282", "0.56325763", "0.5592348", "0.5586626", "0.5578109", "0.55605274", "0.5551365", "0.55513066", "0.55347747", "0.5492872", "0.5479856", "0.5478212", "0.5465973", "0.54632473", "0.5426126", "0.5417898", "0.5404139", "0.5393925", "0.53724337", "0.53528", "0.53449565", "0.5340814", "0.5339212", "0.5320179", "0.5316061", "0.53049994", "0.52984446", "0.5292269", "0.52911395", "0.52880317", "0.5283199", "0.52739096", "0.52710927", "0.5258904", "0.5254202", "0.5251075", "0.5247422", "0.52463573", "0.5240866", "0.5236211", "0.5235685", "0.5229879", "0.5223839", "0.52190167", "0.52084607", "0.5196774", "0.51830316", "0.5180594", "0.51729256", "0.51725715", "0.5171263", "0.5170111", "0.51647466", "0.51577234", "0.51567286", "0.5155202", "0.5152846", "0.5147419", "0.51442146", "0.51409996", "0.5108606", "0.51077276", "0.5101948", "0.50925386", "0.5091935", "0.5088381", "0.5082149", "0.5080993", "0.50801617", "0.5078614", "0.50782543", "0.50768155", "0.50727373", "0.5067383", "0.50601506", "0.50560427", "0.50554746", "0.5051578", "0.50505745", "0.50410867", "0.50401443", "0.50380737", "0.5025127", "0.5024446", "0.5023801" ]
0.6537929
0
get all cart items for a pooler
@Query(value = "SELECT * FROM cmpe275_cartShare.cart_item WHERE pooler_id = ?1", nativeQuery = true) List<CartItem> findAllByPoolerId(Long poolerId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<CartItem> getAllcartitem();", "public synchronized List<ShoppingCartItem> getItems(){\n List<ShoppingCartItem> cart = new ArrayList<ShoppingCartItem>();\n \n for(ShoppingCartItem cartItem : carrito){\n if(cartItem!=null)\n cart.add(cartItem);\n }\n \n return cart;\n }", "public Collection<CartItem> getCartItems(){\t\t\n\t\treturn map.values();\n\t}", "ResponseEntity<List<ItemDTO>> getAllCartItems(String cartId);", "List<Cart> getAllCarts();", "public final List<Item> getCart() {\n return cart;\n }", "public List<CartLine> listAvailable(int cartId);", "public List<CartItem> findCartItemsByCartItemIdItemSellerSellerId(int sellerId);", "public static HashMap<Integer,Item> getUserCart(){\n\t\treturn userCart;\n\t}", "@Override\n public List<ICart> All() throws ServiceUnavailableException {\n if(cartRepository==null)\n throw new ServiceUnavailableException(\"Missing persitance repository!\");\n \n return cartRepository.findAll().stream().map(cart -> (ICart)cart).collect(Collectors.toList());\n }", "@Override\n\tpublic List<Cart> findAllCart() {\n\t\treturn cartRepository.findAll();\n\t}", "public ArrayList getCartas();", "public Collection<Item> shopItems() {\n\t\treturn this.itemRepository.shopItems();\n\t}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "@Override\n\tpublic List<Cart> selectCartAll() {\n\t\treturn cartDao.selectCartAll();\n\t}", "@GetMapping(\"/cartItems/{customerId}\")\n List<Cart> getAllCartProducts(@PathVariable(\"customerId\") int customerId) {\n\n Customer customer = cartService.getAllCartItems(customerId);\n List<Cart> cartItems = new ArrayList<>();\n\n Set<Cart> cart = customer.getCartItems();\n\n for (Cart cartItem : cart) {\n \n if(!(cartItem.isSavedForLater())){\n Double price = cartService.getNewPrice(cartItem);\n cartItem.setPrice(price);\n cartItems.add(cartItem);\n }\n \n }\n\n return cartItems;\n\n }", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "List<CatalogItem> getAllCatalogItems();", "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 }", "List<PricedItem> getItems() {\n return Collections.unmodifiableList(items);\n }", "public Collection<Item> itemsPurchased() {\n\t\treturn this.itemRepository.itemsPurchased();\n\t}", "public List<Item> getAllItemsAvailable();", "Collection<Item> getInventory();", "public List<CartItem> findCartItemsByCartItemIdCustomerCustomerId(int customerId);", "public void queryAllBuyableItems(){\r\n awsAppSyncClient.query(ListBuyableItemsQuery.builder().build())\r\n .responseFetcher(AppSyncResponseFetchers.CACHE_AND_NETWORK)\r\n .enqueue(getAllBuyableItemsCallback);\r\n }", "public ArrayList<String> getSellers(String productName);", "public ArrayList<String> readAllCartID() {\n db = helper.getReadableDatabase();\n ArrayList<String> 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 list.add(id);\n }\n return list;\n }", "public List<BusinessObject> getItems(Package pkg);", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "List<Item> getItems(IDAOSession session);", "Shopper checkoutNext() {\n Shopper shopper = waitingShoppers.poll();\n if (shopper != null) {\n Receipt receipt = new Receipt();\n Cart cart = shopper.getCart();\n if (cart != null) {\n List<Item> validItems = cart.getItems().stream().filter(i -> i.getQuantity() > 0).collect(Collectors.toList());\n // we processed all the cart items, zero it out\n cart.clear();\n receipt.addItems(validItems);\n shopper.setReceipt(receipt);\n }\n }\n return shopper;\n }", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "Product getPProducts();", "public List<Publication> getShoppingCart() {\n return Collections.unmodifiableList(shoppingCart);\n }", "@Override\r\n\tpublic List<ProductRaw> getProductRaws(PageRequest pageable) {\n\t\treturn productRawDao.getProductRaws(pageable);\r\n\t}", "Cart getCartForUser(String userId);", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public List<ProductWithSupplierAndStockItemTO> getProductsWithStockItems(long storeID) throws NotInDatabaseException;", "public Shopper() {\r\n cart = new Carryable[MAX_CART_ITEMS];\r\n numItems = 0;\r\n }", "public static void getCartCheckOutItems(int from, int checkbox,boolean voluntaryuncheck) {\n String url = APIBaseURL.getCartsList + SaveSharedPreference.getLoggedInUserEmail(consumerCheckOutActivity) + \"?Referal=\" + stateReferralAppliedorNot;\n Log.v(\"cartUrl\", url);\n CustomVolleyRequest stringRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.v(\"cartResponse\", response);\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONObject dataArray = jsonObject.getJSONObject(\"data\");\n\n\n\n JSONArray cartDetailsArray = new JSONArray();\n JSONArray totalMenuItemsArray = new JSONArray();\n if (dataArray.has(\"cartDetails\")) {\n cartDetailsArray = dataArray.getJSONArray(\"cartDetails\");\n }\n double sum = 0;\n double mealPriceSum = 0;\n objectsList = new ArrayList<>();\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 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 }\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 if (checkbox == 2) {\n if (!dataArray.optBoolean(\"isRefferalApplied\") && stateReferralAppliedorNot) {\n checkReferral.setChecked(false);\n stateReferralAppliedorNot = false;\n new AlertDialog.Builder(consumerCheckOutActivity)\n .setMessage(\"Referral cannot be applied as 25% of bill amount is less than one time Referral code amount\")\n\n // Specifying a listener allows you to take an action before dismissing the dialog.\n // The dialog is automatically dismissed when a dialog button is clicked.\n .setPositiveButton(\"Okay\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Continue with delete operation\n dialog.dismiss();\n }\n })\n .setIcon(R.mipmap.ic_launcher_round)\n .show();\n } else if (orderReportSummaryObject.optInt(\"referalAmount\") != 0 && dataArray.optInt(\"totalPointused\") != 0) {\n //Toast.makeText(consumerCheckOutActivity, \"Referral code has been applied successfully and \" + dataArray.optInt(\"totalPointused\") + \" points have been consumed\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n// if(!voluntaryuncheck){\n// Toast.makeText(consumerCheckOutActivity,\"Referral not applied\",Toast.LENGTH_SHORT).show();\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// }\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 if (from == 2) {\n recyclerViewFoodItem.setAdapter(new ConsumerHomeAdapters(consumerCheckOutActivity, objectsList, RobotoBold, RobotoRegular, poppinsSemiBold, poppinsBold, poppinsLight, poppinsMedium, 1));\n\n } else {\n recyclerViewFoodItem.setAdapter(new ConsumerHomeAdapters(consumerCheckOutActivity, objectsList, RobotoBold, RobotoRegular, poppinsSemiBold, poppinsBold, poppinsLight, poppinsMedium, 1));\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n boolean checkAvailability = isAllItemsAreNotSoldOut(cartDetailsListssArray);\n if (checkAvailability) {\n soldOutTextinCart.setVisibility(View.VISIBLE);\n } else {\n soldOutTextinCart.setVisibility(View.GONE);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\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 }", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "public Map<String, Integer> getCart() {\n return cart;\n }", "@Override\n\tpublic List<Cart> selectCartByusername(String username) {\n\t\treturn cartDao.selectCartByusername(username);\n\t}", "public ArrayList getOrdenCartas();", "public @NotNull Set<Item> findAllItems() throws BazaarException;", "@GetMapping(\"/show-cart\")\r\n\tpublic List<Cart> showCart() throws CartEmptyException {\r\n\t\tlog.info(\"showCart -Start\");\r\n\t\t//Cart cart = null;\r\n\t\tList<Cart> cart;\r\n\t\tcart = service.getAllCartItems(1);\r\n\t\tint total=0;\r\n\t\tif(cart.size()==0)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor(Cart carts:cart)\r\n\t\t{\r\n\t\t\ttotal+=carts.getMenuItem().getPrice();\r\n\t\t}\r\n\t System.out.println(\"*************************************************\"+total);\r\n\t\tlog.info(\"showCart -End\");\r\n\t\treturn cart;\r\n\r\n\t}", "public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }", "private void getItemsInBasket(){\n Disposable disposable = mViewModel.getItemsInBasket()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .doOnError(throwable -> Log.e(\"BasketFragment\",throwable.getMessage()))\n .subscribe(basketItems -> basketListAdapter.submitList(basketItems));\n mDisposable.add(disposable);\n }", "public Object[][] checkCartItems(WebDriver driver) throws InterruptedException {\n\n Actions actions = new Actions(driver);\n // some elements can not be visible if we don't move slider down\n if (cartSlider.isDisplayed()) {\n actions.moveToElement(cartSlider).clickAndHold().build().perform();\n actions.moveByOffset(0,400).build().perform();\n Thread.sleep(5000);\n }\n\n Object[][] dataFromCart = new Object[cartItemsName.size()][4];\n int productsAddedCount = 0;\n\n for (int i = 0; i < cartItemsName.size(); i++) {\n\n //name\n dataFromCart[i][0] = cartItemsName.get(i).getText().split(\"-\")[0].trim();\n //quantity\n dataFromCart[i][1] = Integer.parseInt(cartItemsQuantity.get(i).getText().split(\" \")[0]);\n //price per 1\n dataFromCart[i][2] = Integer.parseInt(cartItemsPrice.get(i).getText());\n //total price\n dataFromCart[i][3] = Integer.parseInt(cartItemsTotalPrice.get(i).getText());\n\n }\n\n return dataFromCart;\n }", "public static ArrayList<Item> find()\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ArrayList<Item> items=new ArrayList<Item>();\n items=null;\n \n String query = \"select * from item\";\n try\n { \n ps = connection.prepareStatement(query);\n ResultSet rs = null;\n\t rs = ps.executeQuery();\n while(rs.next()){\n Item item = new Item();\n\t\titem.setAttribute(rs.getString(2));\n\t\titem.setItemname(rs.getString(3));\n\t\titem.setDescription(rs.getString(4));\n\t\titem.setPrice(rs.getDouble(5));\n items.add(item);\n }\n return items;\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return null;\n }\n finally\n {\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n } \n }", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "public Iterator<QuantifiedItemDTO> getIterator() {\r\n\t\treturn items.iterator();\r\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "@Override\r\n\tpublic List<ProductRaw_Price> getPrices(PageRequest pageable) {\n\t\treturn productRaw_PriceDao.getProductRawPrices(pageable);\r\n\t}", "@Override\n\tpublic List<ProductInfo> getProducts() {\n\t\treturn shoppercnetproducts;\n\t}", "@Override\n\tpublic List selectCartList() {\n\t\treturn null;\n\t}", "public List<PlayerItem> getAllPlayerItemById(Player player);", "ArrayList<RecipeObject> getRecipes();", "public ArrayList<CoffeeShop> returnShops(){\r\n return allShops;\r\n }", "@RequestMapping(value = \"/items\", method = RequestMethod.GET)\n public ItemResponse getAllReceipts() {\n\n List items = itemsDBService.getItems();\n List itemNew = new ArrayList();\n for (Object i : items) {\n ItemEntity ie = (ItemEntity) i;\n itemNew.add(Item.builder().itemNumber(ie.getItemNumber())\n .itemUnitCount(ie.getItemUnitCount())\n .itemName(ie.getItemName())\n .itemPrice(ie.getItemPrice())\n .itemUnitPrice(ie.getItemUnitPrice())\n .itemCategory(ie.getItemCategory())\n .itemDiscount(ie.getItemDiscount())\n .itemWarantyEndDate(ie.getItemWarantyEndDate())\n .itemTypeCode(ie.getItemTypeCode())\n .build()\n );\n }\n return ItemResponse.builder().items(itemNew).build();\n }", "private void getAllProducts() {\n }", "public static Vector<Company> getAllPrices(){\n\t\treturn all_prices;\n\t}", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public ArrayList<Collectable> getItems(){\n return items;\n }", "public nl.webservices.www.soap.GCRItem[] getItems() {\n return items;\n }", "public ArrayList<Product> getCartContents() throws IOException, ClassNotFoundException {\n try {\n String fileName=userid+\"cart.txt\";\n File file=new File(fileName);\n if(file.exists()) {\n FileInputStream fis = new FileInputStream(fileName);//fileName);\n ObjectInputStream ois = new ObjectInputStream(fis);\n this.cartContents = (ArrayList<Product>) ois.readObject();\n }\n return cartContents;\n }\n catch(EOFException e)\n {\n System.out.println(\"Cart is empty.\");\n }\n return null;\n }", "public List<Item> getItemsOfAllSellersByCategoryAndBuyer(CategoryTree category, Person buyer){\n return null;\n }", "List<StockList> fetchAll();", "@Override\n\t@Transactional\n\tpublic List<ShoppingCart> getListShoppingCart() {\n\t\treturn shoppingCartDao.getListShoppingCart();\n\t}", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "public Collection<Long> getAvailableItems();", "@GetMapping(\"/savedItems/{customerId}\")\n List<Cart> getAllSavedProducts(@PathVariable(\"customerId\") int customerId) {\n\n Customer customer = cartService.getAllCartItems(customerId);\n List<Cart> savedItems = new ArrayList<>();\n\n Set<Cart> cart = customer.getCartItems();\n\n for (Cart savedItem : cart) {\n \n if(savedItem.isSavedForLater()){\n Double price = cartService.getNewPrice(savedItem);\n savedItem.setPrice(price);\n savedItems.add(savedItem);\n }\n \n }\n \n return savedItems;\n\n }", "@GetMapping(value = \"/viewcart\")\n public ResponseEntity<List<CartProduct>> viewCart(final HttpSession session) {\n log.info(session.getId() + \" : Retrieving the cart to view\");\n Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT);\n ControllerUtils.checkEmptyCart(initialCart, session.getId());\n List<CartProduct> result = new ArrayList();\n\n for (String key : initialCart.keySet()) {\n result.add(initialCart.get(key));\n }\n return ResponseEntity.status(HttpStatus.OK).body(result);\n }", "public FreeClientPool getClientPool()\n\t{\n\t\treturn this.peer.getClientPool();\n\t}", "@Override\n\tpublic List<ShoppingCart> getAllBook() {\n\t\treturn dao.findAll();\n\t}", "public String[] loadCart(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes loadCart() method\");\n\t\treturn null;\n\t\t\n\t}", "ArrayList<RecipeObject> getRecipes(String recipeName);", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "@Override\n\tpublic List<ShopCarVO> getShopCartList(String member) {\n\t\treturn null;\n\t}", "public void getCartIDFromAPI(String endpoint){\n final RequestQueue requestQueue = Volley.newRequestQueue(App.getAppContext());\n try {\n JSONObject jsonBody = new JSONObject();\n jsonBody.put(\"email\", CognitoUserPoolShared.getInstance().getUserPool().getCurrentUser().getUserId());\n final String requestBody = jsonBody.toString();\n final StringRequest stringRequest = new StringRequest(Request.Method.POST, endpoint, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n Log.e(\"Response\",response);\n JSONObject responseBody = new JSONObject(response);\n boolean success = responseBody.getBoolean(\"success\");\n if(success){\n int idCart = responseBody.getInt(\"cart\");\n setCartID(idCart);\n Log.e(\"CART\",String.valueOf(idCart));\n JSONArray jsonArrayOfItems = responseBody.getJSONArray(\"items\");\n for(int i = 0; i< jsonArrayOfItems.length();i++){\n JSONObject item = jsonArrayOfItems.getJSONObject(i);\n int id = item.getInt(\"id\");\n String name = item.getString(\"name\");\n String manufacturer = item.getString(\"manufacturer\");\n float price = new Float(item.getDouble(\"price\"));\n String description = item.getString(\"description\");\n String imageUrl = item.getString(\"url\");\n Integer quantity = item.getInt(\"quantity\");\n ArrayList<String> tags = new ArrayList<String>();\n Item currentItem = new Item(id,name,manufacturer,price,description,quantity,imageUrl,\"\",tags);\n addItemInCart(currentItem,currentItem.getQuantity(),true);\n Log.e(\"CART\",currentItem.toString());\n }\n inSyncWithServer = true;\n setChanged();\n notifyObservers();\n }\n else{\n inSyncWithServer = true;\n setChanged();\n notifyObservers();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n if(e.getMessage().contains(\"No value for items\")){\n inSyncWithServer = true;\n Log.e(\"0 articoli nel carrello\",e.getMessage());\n }\n else{\n getCartIDFromAPI(getLastCartEndpoint);\n }\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n setCartID(-1);\n inSyncWithServer = true;\n setChanged();\n notifyObservers();\n Log.e(\"CART\",\"Errore\" + error.toString()+ error.getLocalizedMessage());\n }\n }) {\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\";\n }\n\n @Override\n public byte[] getBody() throws AuthFailureError {\n try {\n Log.i(\"BODY\", requestBody);\n return requestBody == null ? null : requestBody.getBytes(\"utf-8\");\n } catch (UnsupportedEncodingException uee) {\n VolleyLog.wtf(\"Unsupported Encoding while trying to get the bytes of %s using %s\", requestBody, \"utf-8\");\n return null;\n }\n }\n\n\n @Override\n protected Response<String> parseNetworkResponse(NetworkResponse response) {\n return super.parseNetworkResponse(response);\n }\n };\n stringRequest.setRetryPolicy(new RetryPolicy() {\n @Override\n public int getCurrentTimeout() {\n return 25000;\n }\n\n @Override\n public int getCurrentRetryCount() {\n return 10;\n }\n\n @Override\n public void retry(VolleyError error) throws VolleyError {\n Log.e(\"CART\",\"RETRY\" + error.getMessage());\n }\n });\n requestQueue.add(stringRequest);\n requestQueue.start();\n\n } catch (JSONException e) {\n getCartIDFromAPI(getLastCartEndpoint);\n }\n }", "List<Product> retrieveProducts();", "public final java.util.List<p035ru.unicorn.ujin.data.realm.marketplace.CartOffer> getOrderedOfferList(java.lang.String r5) {\n /*\n r4 = this;\n io.realm.Realm r0 = r4.realm\n java.lang.Class<ru.unicorn.ujin.data.realm.marketplace.CartItem> r1 = p035ru.unicorn.ujin.data.realm.marketplace.CartItem.class\n io.realm.RealmQuery r0 = r0.where(r1)\n io.realm.RealmResults r0 = r0.findAll()\n java.lang.String r1 = \"cartItemList\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)\n java.lang.Iterable r0 = (java.lang.Iterable) r0\n java.util.Iterator r0 = r0.iterator()\n L_0x0017:\n boolean r1 = r0.hasNext()\n r2 = 0\n if (r1 == 0) goto L_0x0036\n java.lang.Object r1 = r0.next()\n r3 = r1\n ru.unicorn.ujin.data.realm.marketplace.CartItem r3 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r3\n ru.unicorn.ujin.data.realm.marketplace.CartCompany r3 = r3.getCompany()\n if (r3 == 0) goto L_0x002f\n java.lang.String r2 = r3.getId()\n L_0x002f:\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r5)\n if (r2 == 0) goto L_0x0017\n goto L_0x0037\n L_0x0036:\n r1 = r2\n L_0x0037:\n ru.unicorn.ujin.data.realm.marketplace.CartItem r1 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r1\n if (r1 == 0) goto L_0x004a\n io.realm.RealmList r5 = r1.getOffers()\n if (r5 == 0) goto L_0x004a\n java.lang.Iterable r5 = (java.lang.Iterable) r5\n java.util.List r5 = kotlin.collections.CollectionsKt.filterNotNull(r5)\n if (r5 == 0) goto L_0x004a\n goto L_0x004e\n L_0x004a:\n java.util.List r5 = kotlin.collections.CollectionsKt.emptyList()\n L_0x004e:\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p035ru.unicorn.ujin.market.repository.MarketLocalRepository.getOrderedOfferList(java.lang.String):java.util.List\");\n }", "public Pile getPileCartes(){\n\t\treturn this.pileCartes;\n\t}", "@Override\n\tpublic Set<T> retrieveAllItems() {\n\t\treturn cache;\n\t}", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<ItemStockDO> selectAll();", "public List<Product> getProducts();", "public List<Product> getProducts();", "@GetMapping(\"/retrieve\")\n public ResponseEntity<List<Product>> getProdAll(final HttpSession session) {\n log.info(session.getId() + \" : Retrieving all products\");\n return ResponseEntity.status(HttpStatus.OK).body(prodService.getAll());\n }", "List<DangerMerchant> selectAll();", "void getMarketOrders();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\n\tpublic List<Recipe> getAllRecipe() {\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tResponseEntity<List<Recipe>> rateResponse =\n\t\t restTemplate.exchange(BASE_URL + RECIPE_URL, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<List<Recipe>>() {\n\t\t });\n\t\tList<Recipe> recipeList = rateResponse.getBody();\n\t\tlogger.debug(\"RECIPE Info :\" + recipeList);\n\t\treturn recipeList;\n\t}", "public List<RLOrder> getItems() {\n\t\treturn _orders.getPage(_currentPage);\n\t}", "public java.util.List<SitbMoneyCollection> findAll();", "List<transactionsProducts> purchasedProducts();" ]
[ "0.66655713", "0.6386141", "0.6290473", "0.6118782", "0.6083263", "0.5882627", "0.58594793", "0.5850458", "0.57873553", "0.57602066", "0.57165176", "0.569986", "0.56880826", "0.5664625", "0.56422895", "0.5570484", "0.5558639", "0.55503714", "0.55491805", "0.5528111", "0.5522999", "0.54781663", "0.5437395", "0.54347", "0.5416142", "0.5407878", "0.5390978", "0.53815955", "0.53752744", "0.53459144", "0.53407705", "0.53024805", "0.52836776", "0.5274641", "0.5261539", "0.5259251", "0.5252309", "0.524631", "0.52298033", "0.5226152", "0.5225554", "0.52179414", "0.52173007", "0.5213424", "0.52113444", "0.51955956", "0.51935816", "0.51891816", "0.51817995", "0.5176162", "0.51700133", "0.5156937", "0.514446", "0.51391464", "0.51374096", "0.5136711", "0.5123904", "0.51213115", "0.5112282", "0.51049465", "0.5103257", "0.510203", "0.5101031", "0.5099116", "0.50983703", "0.50972223", "0.50971884", "0.50963914", "0.5092173", "0.5079342", "0.5077509", "0.50711006", "0.5062203", "0.5056536", "0.5056472", "0.5053267", "0.50472593", "0.5045585", "0.50388396", "0.50372666", "0.5036787", "0.5028363", "0.50273424", "0.5025544", "0.50203514", "0.50089484", "0.50051624", "0.5001816", "0.5001396", "0.49984622", "0.49979168", "0.49979168", "0.4997242", "0.49971506", "0.49930143", "0.4992165", "0.49868423", "0.4985136", "0.4985123", "0.49850735" ]
0.7057505
0
Returns a string representation of this Map object.
public native String toString();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n if (this.size() <= 0) {\n return \"{}\";\n }\n StringBuilder stringBuilder = new StringBuilder(this.mSize * 28);\n stringBuilder.append('{');\n int n2 = 0;\n do {\n if (n2 >= this.mSize) {\n stringBuilder.append('}');\n return stringBuilder.toString();\n }\n if (n2 > 0) {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(this.keyAt(n2));\n stringBuilder.append('=');\n E e2 = this.valueAt(n2);\n if (e2 != this) {\n stringBuilder.append(e2);\n } else {\n stringBuilder.append(\"(this Map)\");\n }\n ++n2;\n } while (true);\n }", "public String toString()\n {\n return super.toString() + \":\\n\" + getMap();\n }", "@Override\n\tpublic String toString() {\t\t\n\t\treturn \"mirMap:\\n\" + mapToString(mirMap) + \"\\ngeneMap:\\n\" + mapToString(geneMap);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}", "public synchronized String toString() {\n// int max = size() - 1;\n StringBuffer buf = new StringBuffer();\n\n buf.append(\"(\").append(super.toString());\n// \tfor (int i = 0; i <= max; i++) {\n// \t Map.Entry e = (Map.Entry) (it.next());\n// Object key = e.getKey();\n// Object value = e.getValue();\n// buf.append((key == this ? \"(this Map)\" : key) + \"=\" + \n// (value == this ? \"(this Map)\" : value));\n\n// \t if (i < max)\n// \t\tbuf.append(\", \");\n// \t}\n buf.append(\")\");\n return buf.toString();\n }", "public String toString()\n {\n return ClassHelper.getSimpleName(getClass()) +\n \"{InsertAllowed=\" + m_fInsert +\n \", ReturnRequired=\" + m_fReturn +\n \", Map=\" + m_map + '}';\n }", "public String toString() {\n return \"{...(\" + this.size() + \" key(s) mapped to value(s))...}\";\n }", "public String getMap() { \n\t\treturn getMapElement().getValue();\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tfinal AppendingStringBuffer buffer = new AppendingStringBuffer();\n\t\tboolean first = true;\n\t\tfor (Map.Entry<String, Object> entry : entrySet())\n\t\t{\n\t\t\tif (first == false)\n\t\t\t{\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t\tfirst = false;\n\n\t\t\tbuffer.append(entry.getKey());\n\t\t\tbuffer.append(\" = \\\"\");\n\t\t\tfinal Object value = entry.getValue();\n\t\t\tif (value == null)\n\t\t\t{\n\t\t\t\tbuffer.append(\"null\");\n\t\t\t}\n\t\t\telse if (value.getClass().isArray())\n\t\t\t{\n\t\t\t\tbuffer.append(Arrays.asList((Object[])value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbuffer.append(value);\n\t\t\t}\n\n\t\t\tbuffer.append('\\\"');\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n public String toString() {\n if (this.map.getMap().isEmpty()) return \"\";\n final StringBuilder param = new StringBuilder(this.map.getMap().size() * 40);\n for (final Map.Entry<String, String> entry: entrySet()) {\n param.append(MultiProtocolURL.escape(entry.getKey()))\n .append('=')\n .append(MultiProtocolURL.escape(entry.getValue()))\n .append('&');\n }\n param.setLength(param.length() - 1);\n return param.toString();\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder s = new StringBuilder();\n\t\tjava.util.Iterator<java.util.Map.Entry<String, Object>> iterator = entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tjava.util.Map.Entry<String, Object> entry = iterator.next();\n\n\t\t\ts.append('\\n');\n\t\t\ts.append(\"\\t\");\n\t\t\ts.append(entry.getKey());\n\t\t\ts.append(':');\n\t\t\ts.append(' ');\n\t\t\ts.append(entry.getValue().toString());\n\t\t}\n\t\treturn s.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\t\n\t\tSet<KeyValueData> keyvalueset = key_value_treemap.keySet();\n\t\tIterator<KeyValueData> iterator = keyvalueset.iterator();\n\t\tStringBuilder builder = new StringBuilder(\"*\");\n\t\twhile(iterator.hasNext()){\n\t\t\tKeyValueData data = iterator.next();\n\t\t\tbuilder.append(data.key);\n\t\t\tbuilder.append(\" \");\n\t\t\tbuilder.append(data.value);\n\t\t\tbuilder.append(\" \");\n\t\t}\n\t\treturn builder.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuffer buf = new StringBuffer(\"Dictionary contents:\\n\");\n\t\tfor (Iterator iter = entrySet().iterator(); iter.hasNext();) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbuf.append(\" \").append(entry.getKey()).append(\" = \").append(\n\t\t\t\t\tentry.getValue()).append(\"\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "public String toString()\n {\n String ret = \"\";\n String s = adjMaps.toString();\n String[] parts = s.split(\"},\");\n for(int i=0; i< parts.length; i++){\n ret += parts[i] + \"}\\n\";\n }\n return ret;\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder buffer = new StringBuilder(128);\n\t\tIterator<Map.Entry<String, AbstractNode>> it = pairs.entrySet().iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tMap.Entry<String, AbstractNode> pair = it.next();\n\t\t\tbuffer.append(keyToString(pair.getKey()));\n\t\t\tbuffer.append(KEY_VALUE_SEPARATOR_CHAR);\n\t\t\tbuffer.append(' ');\n\t\t\tbuffer.append(pair.getValue());\n\t\t\tif (it.hasNext())\n\t\t\t{\n\t\t\t\tbuffer.append(PAIR_SEPARATOR_CHAR);\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "public String toString() {\n\t\t\tif (this.getKey() == null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"Key:\" + this.getKey() + \" Value:\" + this.getValue();\n\t\t\t}\n\t\t}", "public String toString() { return stringify(this, true); }", "@Override\n public String toString ()\n {\n StringBuffer buffer = new StringBuffer();\n for (State value : stateMap.values()) {\n buffer.append(value.toString());\n buffer.append(\"\\n\");\n }\n return buffer.toString();\n }", "public String toOutputString()\n\t{\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (Entry<Object, Object> entry : this.entrySet())\n\t\t\tbuf.append(String.format(\"%s=%s%c\",\n\t\t\t\t\tentry.getKey(), entry.getValue(), 12));\n\t\treturn buf.toString();\n\t}", "public String toString() {\n\t\treturn geoCoordinate.toString() + \" | \" + name + \" | \" + description;\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\tfor (Entry<Object, Object> entry : this.entrySet())\n\t\t\tset.add(String.format(\"%s = %s%n\",\n\t\t\t\t\tentry.getKey(), entry.getValue()));\n\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (String s : set)\n\t\t\tbuf.append(s);\n\t\treturn buf.toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n sb.append(tx2gtxMap.size()).append(\" mappings, \");\n sb.append(gtx2ContextMap.size()).append(\" transactions\");\n return sb.toString();\n }", "public static String mapToString(Map<String, Object> m) {\n boolean hasNext = false;\n StringBuilder sb = new StringBuilder();\n sb.append(\"[\");\n for(Map.Entry<String, Object> e: m.entrySet()) {\n if(hasNext) {\n sb.append(\",\");\n } else {\n hasNext = true;\n }\n sb.append(e.getKey());\n sb.append(\"#\");\n Object val = e.getValue();\n if(val != null) {\n sb.append(val.toString());\n }\n }\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder output = new StringBuilder();\n for (Tile[] tiles : this.map) {\n StringBuilder line = new StringBuilder();\n for (Tile tile : tiles) {\n if (tile.isVisible()) {\n if (tile.isInhabited()) {\n tile.sortInhabitants();\n line.append(tile.getInhabitants().get(0).getSymbol());\n } else {\n Terrain terrain = tile.getTerrain();\n if (terrain == Terrain.EMPTY) {\n line.append(\" \");\n } else {\n line.append(\"#\");\n }\n }\n } else {\n line.append(\".\");\n }\n if (Main.BETTER_GRAPHICS) line.append(\" \");\n }\n line.append(\" \");\n line.append(\"\\n\");\n output.append(line);\n }\n return output.toString();\n }", "public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "public String toString()\r\n\t\t{\r\n\t\t\treturn \"|Key: \" + key + \", Value: \" + value + \"|\";\r\n\t\t}", "public String toString(){\n return this.tileType.toString() + this.position + this.orientation;\n }", "public static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }", "public String toString() {\n return\n getLatitude(\"\") + \"|\" +\n getLongitude(\"\") + \"|\" +\n getDepth(\"\") + \"|\" +\n getTemperatureMin(\"\") + \"|\" +\n getTemperatureMax(\"\") + \"|\" +\n getSalinityMin(\"\") + \"|\" +\n getSalinityMax(\"\") + \"|\" +\n getOxygenMin(\"\") + \"|\" +\n getOxygenMax(\"\") + \"|\" +\n getNitrateMin(\"\") + \"|\" +\n getNitrateMax(\"\") + \"|\" +\n getPhosphateMin(\"\") + \"|\" +\n getPhosphateMax(\"\") + \"|\" +\n getSilicateMin(\"\") + \"|\" +\n getSilicateMax(\"\") + \"|\" +\n getChlorophyllMin(\"\") + \"|\" +\n getChlorophyllMax(\"\") + \"|\";\n }", "public String toString() { \r\n\t\tString str = \"&markers=color:\" + color + \"%7Clabel:\" + label + \"%7C\" + latitude + \",\" + longitude;\r\n\t\t\r\n\t\treturn str;\r\n\t\t\r\n\t}", "public void mapToString() {\r\n for (Square[] x : map) {\r\n for (Square y : x) {\r\n System.out.print(y.getVisual() + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\treturn key.toString() + \"=\" + value.toString();\r\n\t\t}", "@Override\n public String toString() {\n return new Gson().toJson(this);\n }", "public void printMap() {\n\t\tmap.printMap();\n\t}", "public String toString() {\n\t\treturn toString(true);\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tsb.append(\"WidgetLayoutMapping -> \");\r\n\t\tsb.append(\"widgetId: \");\r\n\t\tsb.append(widgetId);\r\n\t\tsb.append(\"; layoutId: \");\r\n\t\tsb.append(layoutId);\r\n\t\tsb.append(\"; layoutWidgetPosition: \");\r\n\t\tsb.append(layoutWidgetPosition);\r\n\t\tsb.append(\"; blockPosition : \");\r\n\t\tsb.append(blockPosition);\r\n\t\tsb.append(\"; closedInd: \");\r\n\t\tsb.append(closedInd);\r\n\t\treturn sb.toString();\r\n\t}", "public String toString() {\n return \"\" + \"Magic=\" + Magic // NOI18N\n + \", Version=\" + Version // NOI18N\n + \", Reserved=\" + Reserved // NOI18N\n + \", StringsOffset=\" + StringsOffset // NOI18N\n + \", NumEntries=\" + NumEntries // NOI18N\n + \", NumBuckets=\" + NumBuckets // NOI18N\n + \", MaxValueLength=\" + MaxValueLength; // NOI18N\n }", "@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}", "public String toString() {\n return key + \"=\" + value;\n }", "public String mapToString() {\n\r\n\t\tString mapStr = \"b\";//Initialize the string and mark as map with \"b\"\r\n\t\tString tileStr = \"\";\r\n\r\n\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {//Loop through the tile map\r\n\r\n\t\t\t\ttileStr = \"[\";//Indicate new tile\r\n\r\n\t\t\t\t//Find the tile type and assign to string\r\n\t\t\t\tif (tileMap[i][j] instanceof GrassTile) {\r\n\t\t\t\t\ttileStr += \"0,0\";\r\n\t\t\t\t}else if (tileMap[i][j] instanceof WaterTile) {\r\n\t\t\t\t\ttileStr += \"1,0\";\r\n\t\t\t\t}else if (tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\ttileStr += \"2\";\r\n\t\t\t\t\ttileStr += \",\" + ((ForestTile)tileMap[i][j]).getQuantity();\r\n\t\t\t\t}else if (tileMap[i][j] instanceof MountainTile) {\r\n\t\t\t\t\ttileStr += \"3,0\";\r\n\t\t\t\t}else if (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\ttileStr += \"4\";\r\n\t\t\t\t\ttileStr += \",\" + ((ConoreTile)tileMap[i][j]).getQuantity();\r\n\t\t\t\t}else if (tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\ttileStr += \"5\";\r\n\t\t\t\t\ttileStr += \",\" + ((KannaiteTile)tileMap[i][j]).getQuantity();\r\n\t\t\t\t}else if (tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\ttileStr += \"6\";\r\n\t\t\t\t\ttileStr += \",\" + ((FuelTile)tileMap[i][j]).getQuantity();\r\n\t\t\t\t}else if (tileMap[i][j] instanceof OilTile) {\r\n\t\t\t\t\ttileStr += \"7\";\r\n\t\t\t\t\ttileStr += \",\" + ((OilTile)tileMap[i][j]).getQuantity();\r\n\t\t\t\t}else if (tileMap[i][j] instanceof DesertTile) {\r\n\t\t\t\t\ttileStr += \"8,0\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Check if tile is powered\r\n\t\t\t\tif (tileMap[i][j].getPowered()) {\r\n\t\t\t\t\ttileStr += \",p\";\r\n\t\t\t\t}else {\r\n\t\t\t\t\ttileStr += \",o\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmapStr += tileStr;\r\n\t\t\t\t//testCount++;\r\n\t\t\t\t//System.out.println(testCount + \": \" + tileStr);\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//mapStr += \"[\";\r\n\t\t//System.out.println(mapStr); //TEST OUTPUT\r\n\t\tmapStr += \"[1,0,o\";\r\n\t\treturn mapStr;\r\n\t}", "private String toStringMap( Map<String, String[]> m ) {\n StringBuilder builder = new StringBuilder();\n m.keySet().forEach( ( k ) -> {\n builder.append( \"Key=\" ).append( k )\n .append( \", \" )\n .append( \"Value/s=\" ).append( Arrays.toString( m.get( k ) ) )\n .append( System.lineSeparator() );\n } );\n return builder.toString();\n }", "public String toString() {\n\t\treturn toString(this);\n\t}", "public String toString()\n {\n return this.j2ksec + \",\" + this.eid + \",\" + this.lat + \",\" + this.lon + \",\" + this.depth + \",\" + this.prefmag;\n }", "@Override\n public String toString() {\n if (map == null || map.size() == 0)\n return \"\";\n StringBuilder sb = new StringBuilder();\n\n Set<String> visited = new HashSet<>();\n\n for (Map.Entry<String, Vertex> m : map.entrySet()) {\n dfs(sb, m.getKey(), m.getValue(), visited);\n }\n\n return sb.toString();\n }", "public String toString() {\n checkRep();\n return \"(latitude,longitude)=(\" + this.latitude + \",\" + this.longitude + \") \\n\";\n\n }", "public String toString() {\r\n\t\treturn \"(\" + key + \",\" + value + \")\";\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "public String toString()\n {\n return this.getGeoEvent().toString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn key + \"\";\r\n\t}", "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "public static String serializeMapToString(Map<String, String> map) {\n if(map == null) return \"\\\\0\";\n Map<String, String> attrNew = new HashMap<String, String>(map);\n Set<String> keys = new HashSet<String>(attrNew.keySet());\n for(String s: keys) {\n attrNew.put(\"<\" + BeansUtils.createEscaping(s) + \">\", \"<\" + BeansUtils.createEscaping(attrNew.get(s)) + \">\");\n attrNew.remove(s);\n }\n return attrNew.toString();\n }", "@Override\n public String toString() {\n return toString(false, true, true, null);\n }", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "public String toString()\n {\n StringBuffer sb = new StringBuffer();\n\n sb.append(super.toString());\n sb.append(\"{m_priority=\");\n sb.append(m_priority);\n sb.append(\", m_category=\");\n sb.append(m_category);\n sb.append(\", m_status=\");\n sb.append(m_status);\n sb.append(\", m_logicalKey=\");\n sb.append(m_logicalKey);\n sb.append(\", m_levelObjectType=\");\n sb.append(getLevelTypeAsString(m_levelObjectType));\n sb.append(\", m_levelObjectId=\");\n sb.append(m_levelObjectId);\n sb.append(\", m_issueHistory={\");\n sb.append(m_issueHistory.toString());\n sb.append(\"}}\");\n\n return sb.toString();\n }", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"<\"+key.toString()+\",\"+value.toString()+\">\";\n\t\t}", "@Override\n public String toString() {\n StringJoiner sj = new StringJoiner(\", \", \"{\", \"}\\n\");\n wordMap.forEach((k, v) -> sj.add(String.format(\"%s -> %s\", k, v)));\n return sj.toString();\n }", "public String getMapDesc() {\n\t\treturn this.mapDesc;\n\t}", "public String toString() {\n String memory = super.toString();\n return memory + \"(\" + locations + \", \" + vehicles + \")\";\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n\n sb.append(super.toString());\n sb.append(this.locals.toString());\n sb.append(\"At: \" + this.stage + \"stage\\n\");\n\n return sb.toString();\n }", "public String toString()\n\t{\n\t\tString line=\"\";\n\t\tIterator<Integer> keySetIterator = recordMap.keySet().iterator(); \n\t\tInteger key;\n\t\twhile(keySetIterator.hasNext())\n\t\t{ \n\t\t\tkey = keySetIterator.next(); \n\t\t\tif (key == 0) line+=recordMap.get(key);\n\t\t\telse line+=DELIMITER+recordMap.get(key); \n\t\t}\n\t\treturn line;\n\t}", "public String toString() {\n\t\tString toString = null;\n\t\ttoString = \"[\" + this.px() + \", \" + this.py() + \", \" + this.pz() + \", \" + this.e() + \"]\";\n\t\treturn toString;\n\t}", "public String toString() {\n String s = \"\";\n for (Vertex v : mVertices.values()) {\n s += v + \": \";\n for (Vertex w : mAdjList.get(v)) {\n s += w + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "public String toString() {\n\t\treturn store.toString();\n\t}", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "public String toString() {\n\t\treturn toString(0, 0);\n\t}", "protected String serialize(Map<String, String> map)\n {\n StringBuffer output = new StringBuffer(\"{\");\n String separator = \"\";\n for (Map.Entry<String, String> entry : map.entrySet()) {\n output.append(separator);\n output.append(new JSONString(entry.getKey()));\n output.append(':');\n output.append(new JSONString(entry.getValue()));\n separator = \",\";\n }\n output.append(\"}\");\n return output.toString();\n }", "public String toJSONString() throws CharConversionException, UnsupportedEncodingException {\n return objectMap.toJSONString();\n }", "@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n for (int i = 0; i < this.getHeight(); i++) {\n for (int j = 0; j < this.getWidth(); j++) {\n s.append(this.getEntry(j,i)).append(\" \");\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "public String toString() {\n\t\t// WRITE YOUR CODE HERE!\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Virtual dataset with \" +attributes.length+\" attribute(s) and \"+map.length+\" row(s)\"+ System.lineSeparator());\n\t\tbuffer.append(\"Dataset is a view over weather-nominal.csv\"+System.lineSeparator());\n\t\tbuffer.append(\"Row indices in this dataset (w.r.t its source dataset) [\");\n\n\t\tfor(int i = 0; i < map.length; i++){\n\t\t\tbuffer.append(map[i]);\n\t\t\tif(i!=map.length-1)\n\t\t\t\tbuffer.append(\",\");\n\t\t}\n\t\tbuffer.append(\"]\").append(System.lineSeparator());\n\t\tfor(int i =0; i<attributes.length; i++){\n\t\t\tbuffer.append(attributes[i]);\n\t\t\tbuffer.append(System.lineSeparator());\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "public String toString() {\n\t\treturn (getValue().toString());\r\n\t}", "@Override\n public String toString () {\n StringBuilder output = new StringBuilder( \"name=\" );\n output.append( this.name );\n output.append( \", entries=\" );\n output.append( this.dictionary.size() );\n output.append( \";\" );\n\n return output.toString();\n }", "@Override\n public String toString()\n {\n return Arrays.toString(this.toArray());\n }", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "@Override\r\n public String toString() {\r\n return key.toString() + \"=\" + value.toString();\r\n }", "@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tsb.append(cells[m][n].getValue());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\treturn \"[Location] Operator: \" + this.operator + \" Longitude: \" + this.longitude +\n\t\t\t \" Latitude: \" + this.latitude;\n\t}", "public String toString () {\n StringBuffer s = new StringBuffer();\n for (V v: dag.keySet()) s.append(\"\\n \" + v + \" -> \" + dag.get(v));\n return s.toString(); \n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getOptional() != null)\n sb.append(\"Optional: \").append(getOptional()).append(\",\");\n if (getKey() != null)\n sb.append(\"Key: \").append(getKey()).append(\",\");\n if (getNoEcho() != null)\n sb.append(\"NoEcho: \").append(getNoEcho()).append(\",\");\n if (getQueryable() != null)\n sb.append(\"Queryable: \").append(getQueryable()).append(\",\");\n if (getDescription() != null)\n sb.append(\"Description: \").append(getDescription());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n\t\tString ret = obox.toString();\n\t\t// TODO: return extra info during debugging:\n\t\t//ret += \" Offsets: \" + getWordOffsetsAsStr();\n\t\t//ret += \" Occlusions: \" + getOcclusionsAsStr();\n\t\treturn ret;\n\t}", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\tString s = new String(\"\");\r\n\t\tfor (int i = 0; i < maze.length; i++) {\r\n\t\t\ts+= \"\\n\";\r\n\t\t\ts+= \"Floor #\";\r\n\t\t\ts+= (i+1);\r\n\t\t\ts+= \":\";\r\n\t\t\ts+= \"\\n\";\r\n\t\t\tfor (int j = 0; j < maze[0].length; j++) {\r\n\t\t\t\ts+= \"\\n\";\r\n\t\t\t\tfor (int j2 = 0; j2 < maze[0][0].length; j2++) {\r\n\t\t\t\t\ts += this.maze[i][j][j2];\r\n\t\t\t\t\ts += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts+= \"\\n\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String convertMapToString(HashMap<String, String> map) {\r\n\t\tString string = \"\";\r\n\t\tfor(String key : map.keySet()) {\r\n\t\t\tstring += \"<\" + key + \">\" + map.get(key) + \"</\" + key + \">\";\r\n\t\t}\r\n\t\treturn string;\r\n\t}" ]
[ "0.8386248", "0.79368776", "0.7804675", "0.74939036", "0.73951626", "0.7247485", "0.71609384", "0.707054", "0.7048329", "0.7047434", "0.7024778", "0.69151866", "0.6905595", "0.6858976", "0.6844403", "0.6840042", "0.6744691", "0.6730438", "0.6725653", "0.6713181", "0.6684307", "0.6648418", "0.6648418", "0.6648205", "0.6623688", "0.6622147", "0.6605909", "0.658965", "0.65525055", "0.6542647", "0.6541912", "0.6534818", "0.6502479", "0.64662623", "0.6457971", "0.64480126", "0.6444629", "0.64427465", "0.6438", "0.6438", "0.64317584", "0.6420048", "0.6412542", "0.6408146", "0.639894", "0.6394405", "0.6384267", "0.6374226", "0.6373728", "0.63688296", "0.63665414", "0.63585377", "0.6351848", "0.63474965", "0.6347036", "0.6346664", "0.6342459", "0.6339119", "0.6337421", "0.63364005", "0.63326", "0.6327143", "0.6324596", "0.6320359", "0.6314065", "0.63078547", "0.6303254", "0.63007617", "0.62935454", "0.6289804", "0.6275972", "0.62753546", "0.62732637", "0.6271637", "0.6269802", "0.62677103", "0.62668306", "0.62620467", "0.6257339", "0.6257339", "0.6257339", "0.6253432", "0.624428", "0.62427765", "0.6242669", "0.62424934", "0.624138", "0.62389123", "0.623761", "0.62257004", "0.6208331", "0.6204312", "0.6194864", "0.6188929", "0.6181795", "0.6177673", "0.6175344", "0.6174028", "0.61738443", "0.61736065", "0.61684597" ]
0.0
-1
Builds a square Map object.
public Map(int size_pixels, double size_meters) { this.init(size_pixels, size_meters); // for public accessor this.size_meters = size_meters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map(){\r\n map = new Square[0][0];\r\n }", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }", "private void createMapOfFourthType() {\n\n this.typeOfMap=4;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.PURPLE, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }", "public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }", "public GameMap(int mapNum) {\n numRow = 0;\n numCol = 0;\n String path;\n switch(mapNum) {\n\n case 1:\n path = Constants.PATH_TO_MAP_11;\n break;\n case 2:\n path = Constants.PATH_TO_MAP_12;\n break;\n case 3:\n path = Constants.PATH_TO_MAP_21;\n break;\n case 4:\n path = Constants.PATH_TO_MAP_22;\n break;\n default: //this should never happen\n path = Constants.PATH_TO_MAP_11;\n }\n\n\n //the following line populates the double ArrayList of SquareAbstract (squares)\n List<String> readList = generateSquareStructureFromFile(path);\n\n //now we're gonna link all the squares (to build a graph) inside the generated square structure\n linkSquares(readList);\n\n generateRooms();\n\n populateRooms();\n }", "private void buildMapArea(MapBuilderBase mapBuilder) {\n\t\tmap = new Tile[width][height];\n\n\t\tthis.name = mapBuilder.buildMap(map);\n\t\tupdateValues();\n\n\t\t// TODO: pathfinding precalculations?\n\n\t\t// Log.debug(\"Calculating path maps...\");\n\t\t// pointGraph = new PointGraph();\n\t\t// for (int x = 0; x < width; x++) {\n\t\t// for (int y = 0; y < height; y++) {\n\t\t// if (getTileAt(x, y).isPassable)\n\t\t// pointGraph.addVertex(new Vertex(new Point(x, y)));\n\t\t// }\n\t\t// }\n\t\t// pointGraph.calculateEdges();\n\t\t// Log.debug(\"done\");\n\t}", "public Map(int r, int c){\r\n try {\r\n bomb = new Image(new FileInputStream(\"Minesweeper_Images/bomb.png\"));\r\n zero = new Image(new FileInputStream(\"Minesweeper_Images/zero.png\"));\r\n one = new Image(new FileInputStream(\"Minesweeper_Images/one.png\"));\r\n two = new Image(new FileInputStream(\"Minesweeper_Images/two.png\"));\r\n three = new Image(new FileInputStream(\"Minesweeper_Images/three.png\"));\r\n four = new Image(new FileInputStream(\"Minesweeper_Images/four.png\"));\r\n five = new Image(new FileInputStream(\"Minesweeper_Images/five.png\"));\r\n six = new Image(new FileInputStream(\"Minesweeper_Images/six.png\"));\r\n seven = new Image(new FileInputStream(\"Minesweeper_Images/seven.png\"));\r\n eight = new Image(new FileInputStream(\"Minesweeper_Images/eight.png\"));\r\n flag = new Image(new FileInputStream(\"Minesweeper_Images/flag.png\"));\r\n square = new Image(new FileInputStream(\"Minesweeper_Images/square.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n map = new Square[r][c];\r\n for(int row = 0; row<map.length; row++){\r\n for(int col = 0; col<map[0].length; col++){\r\n map[row][col] = new Square();\r\n //map[row][col].setVisual(\" \");\r\n int x = row;\r\n int y = col;\r\n map[row][col].setVisual(square);\r\n map[row][col].getSquareButton().setOnMouseClicked(e->{\r\n if(e.getButton() == MouseButton.PRIMARY){\r\n revealArea(x, y);\r\n }\r\n if(e.getButton() == MouseButton.SECONDARY){\r\n flag(x, y);\r\n if(win() == true){\r\n System.out.println(\"WIN\");\r\n EndBox.end(\"Win\", \"YOU WIN!!!\");\r\n System.exit(0);\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n }\r\n }", "public Map(){\n this.matrix = new int[10][10];\n }", "public MapTile() {}", "public static Map generateRandomMapWithPath(){\n\t\tMap map = new Map(20,20,(int)System.currentTimeMillis(),0.25); // x size, y size\n\n\t\ttry {\n\t\t\tQueue<int[]> corners = new LinkedList<int[]>();\n\n\t\t\t// add corners to the queue\n\t\t\t// lines between corners must be strictly vertical or horizontal\n\t\t\t// it is assumed that such filtering will be done during gametime\n\t\t\t// by restricting player's input\n\t\t\t// otherwise, no path will be drawn on the map\n\t\t\tcorners.add(new int[] {0,3});\n\t\t\tcorners.add(new int[] {15,3});\n\t\t\tcorners.add(new int[] {15,15});\n\t\t\tcorners.add(new int[] {6,15});\n\t\t\tcorners.add(new int[] {6,8});\n\t\t\tcorners.add(new int[] {2,8});\n\n\t\t\t// build path\n\t\t\tmap.buildNewPath(corners);\n\t\t} catch (PathException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public Map() {\n\n\t\t}", "MAP createMAP();", "public Map(Config config) {\n this.mapCells = new Cell[100][100];\n this.cellGrid= new Cell[20][20][20];\n this.config = config;\n this.origin = config.getOrigin();\n generateMap();\n }", "public Map() {\n\t\t//intially empty\n\t}", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "private SimpleMap(Builder builder) {\n super(builder);\n }", "public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}", "public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}", "public Map(int x, int y) {\n\n height_ = y;\n width_ = x;\n\n map_grid_ = new MapTile[height_][width_];\n for (int i = 0; i < height_; ++i) {\n for (int j = 0; j < width_; ++j) {\n map_grid_[i][j] = new MapTile(j, i); //switch rows and columns\n }\n }\n entity_list_ = new LinkedHashMap<String, Entity>();\n items_list_ = new LinkedList<Item>();\n time_measured_in_turns = 0;\n try {\n my_internet_ = new MapInternet(this);\n } catch (Exception e) {\n // No clue what causes this\n e.printStackTrace();\n System.exit(-6);\n return;\n }\n }", "public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "public Map(String level) {\n this.level = level;\n terrains = new String[]{\"r\", \"p\", \"m1\", \"m2\", \"m3\"};\n\n //if default random\n if (level.equals(\"default\")) {\n String[] defaultLevel = {\n \"p\", \"p\", \"m1\", \"p\", \"r\", \"p\", \"m3\", \"p\", \"p\",\n \"p\", \"m1\", \"p\", \"p\", \"r\", \"p\", \"p\", \"p\", \"m3\",\n \"m3\", \"p\", \"p\", \"p\", \"t\", \"p\", \"p\", \"p\", \"m1\",\n \"p\", \"m2\", \"p\", \"p\", \"r\", \"p\", \"m2\", \"p\", \"p\",\n \"p\", \"p\", \"m2\", \"p\", \"r\", \"p\", \"p\", \"p\", \"m2\"};\n int j = 0;\n for (int i = 0; i < tiles.length; i++) {\n for (int k = 0; k < tiles[0].length; k++, j++) {\n tiles[i][k] = new Tile(i, k, defaultLevel[j]);\n }\n }\n }\n\n // if random level\n if (level.equals(\"random\")) {\n for (int i = 0; i < tiles.length; i++) {\n for (int k = 0; k < tiles[0].length; k++) {\n String ter = terrains[(int) (Math.random() * (terrains.length - 1))];\n tiles[i][k] = new Tile(i, k, ter);\n }\n }\n tiles[2][4] = new Tile(2, 4, \"t\");\n }\n }", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public Map(int canvasWidth, int canvasHeight, GraphicsContext canvas, boolean grid) {\n this.canvasWidth = canvasWidth;\n this.canvasHeight = canvasHeight;\n this.correction = null;\n this.drawGrid = grid;\n this.claimedArea = new ArrayList();\n this.canvas = canvas;\n\n instance = this;\n\n // Do a first calculation of the map size\n calculateMapSize(false);\n\n playerTracking = new ArrayList();\n listeners = new ArrayList();\n }", "private Map(Builder builder) {\n super(builder);\n }", "public void generate()\n {\n System.out.println(\"Initial allocated space for Set: Not supported\");\n// System.out.println(\"Initial allocated space for Set: \" + theMap.capacity());\n final long startTime = TimeUtils.nanoTime();\n Mnemonic m = new Mnemonic(123456789L);\n// GridPoint2 gp = new GridPoint2(0, 0);\n for (int x = -width; x < width; x++) {\n for (int y = -height; y < height; y++) {\n// for (int z = -height; z < height; z++) {\n\n// long z = (x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL);\n// z = ((z & 0x00000000ffff0000L) << 16) | ((z >>> 16) & 0x00000000ffff0000L) | (z & 0xffff00000000ffffL);\n// z = ((z & 0x0000ff000000ff00L) << 8 ) | ((z >>> 8 ) & 0x0000ff000000ff00L) | (z & 0xff0000ffff0000ffL);\n// z = ((z & 0x00f000f000f000f0L) << 4 ) | ((z >>> 4 ) & 0x00f000f000f000f0L) | (z & 0xf00ff00ff00ff00fL);\n// z = ((z & 0x0c0c0c0c0c0c0c0cL) << 2 ) | ((z >>> 2 ) & 0x0c0c0c0c0c0c0c0cL) | (z & 0xc3c3c3c3c3c3c3c3L);\n// z = ((z & 0x2222222222222222L) << 1 ) | ((z >>> 1 ) & 0x2222222222222222L) | (z & 0x9999999999999999L);\n// theMap.put(z, null); // uses 23312536 bytes of heap\n// long z = szudzik(x, y);\n// theMap.put(z, null); // uses 18331216 bytes of heap?\n// unSzudzik(pair, z);\n// theMap.put(0xC13FA9A902A6328FL * x ^ 0x91E10DA5C79E7B1DL * y, null); // uses 23312576 bytes of heap\n// theMap.put((x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL), null); // uses 28555456 bytes of heap\n theMap.add(new Vector2(x - width * 0.5f, y - height * 0.5f)); // crashes out of heap with 720 Vector2\n// gp.set(x, y);\n// theMap.add(gp.hashCode());\n// long r, s;\n// r = (x ^ 0xa0761d65L) * (y ^ 0x8ebc6af1L);\n// s = 0xa0761d65L * (z ^ 0x589965cdL);\n// r -= r >> 32;\n// s -= s >> 32;\n// r = ((r ^ s) + 0xeb44accbL) * 0xeb44acc8L;\n// theMap.add((int)(r - (r >> 32)));\n\n// theMap.add(m.toMnemonic(szudzik(x, y)));\n }\n }\n// }\n// final GridPoint2 gp = new GridPoint2(x, y);\n// final int gpHash = gp.hashCode(); // uses the updated GridPoint2 hashCode(), not the current GDX code\n// theMap.put(gp, gpHash | 0xFF000000); //value doesn't matter; this was supposed to test ObjectMap\n //theMap.put(gp, (53 * 53 + x + 53 * y) | 0xFF000000); //this is what the hashCodes would look like for the current code\n \n //final int gpHash = x * 0xC13F + y * 0x91E1; // updated hashCode()\n //// In the updated hashCode(), numbers are based on the plastic constant, which is\n //// like the golden ratio but with better properties for 2D spaces. These don't need to be prime.\n \n //final int gpHash = 53 * 53 + x + 53 * y; // equivalent to current hashCode()\n long taken = TimeUtils.timeSinceNanos(startTime);\n System.out.println(taken + \"ns taken, about 10 to the \" + Math.log10(taken) + \" power.\");\n// System.out.println(\"Post-assign allocated space for Set: \" + theMap.capacity());\n System.out.println(\"Post-assign allocated space for Set: Not supported\");\n }", "public MapScreen() {\n\t\tthis(DEFAULT_WIDTH, DEFAULT_HEIGHT); // default size for map screen.\n\t}", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public abstract void createMap();", "public MapPanel() {\n painter = NONE_PAINTER;\n setBackground(BACKGROUND_COLOR);\n mapBounds = new Rectangle2D.Double(0, 0, MIN_WIDTH, MIN_HEIGHT);\n mouseClick = SwingObservable.mouse(this, SwingObservable.MOUSE_CLICK)\n .toFlowable(BackpressureStrategy.LATEST)\n .filter(ev -> ev.getID() == MouseEvent.MOUSE_CLICKED)\n .map(this::mapMouseEvent);\n logger.atDebug().log(\"Created\");\n }", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }", "public MapContainer() {\n this(new OpenStreetMapProvider());\n }", "public Map<Integer, List<CellEntry>> buildShipMap() {\n Map<Integer, List<CellEntry>> shipCellMap = new HashMap<>();\n for (int i = 0; i < BOARD_CELL_NUM_PER_SIDE; i++) {\n for (int j = 0; j < BOARD_CELL_NUM_PER_SIDE; j++) {\n Cell cell = getCell(i, j);\n if (cell.getShipIndex() != -1) {\n int shipIndex = cell.getShipIndex();\n if (!shipCellMap.containsKey(shipIndex)) {\n shipCellMap.put(shipIndex, new ArrayList<>());\n }\n\n CellEntry cellEntry = new CellEntry(cell.getIndex(), cell.getShipIndex());\n shipCellMap.get(shipIndex).add(cellEntry);\n }\n }\n }\n return shipCellMap;\n }", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "public Map(int levelWidth, int levelHeight, ArrayList<Planet> planets, ArrayList<Entity> enemies, Player player, Camera camera)\n {\n this.levelWidth = levelWidth;\n this.levelHeight = levelHeight;\n\n double levelSizeRatio = (double)(levelWidth) / levelHeight;\n\n this.mapHeight = defaultMapHeight;\n this.mapWidth = (int)(mapHeight * levelSizeRatio);\n\n this.scale = ((double)(mapHeight)) / levelHeight;\n\n this.topLeftX = defaultTopLeftX;\n this.topLeftY = defaultTopLeftY;\n\n this.planets = planets;\n this.enemies = enemies;\n this.player = player;\n this.camera = camera;\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "public MapPanel(int size, int style)\r\n {\r\n this.setLayout(new BorderLayout());\r\n zoom = 32;//set initail zoom to 32;\r\n\t\t\t\tyear = -4000;\r\n\r\n //set up initial key movements\r\n keyUp = KeyEvent.VK_W;\r\n keyLeft = KeyEvent.VK_A;\r\n keyRight = KeyEvent.VK_D;\r\n keyDown = KeyEvent.VK_S;\r\n keyZoom = KeyEvent.VK_Z;\r\n\r\n if(size == 100 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n //set up the cursor\r\n cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);\r\n\r\n //set up the buttons\r\n leftButton = new JButton();\r\n leftButton.setFocusable(false);\r\n leftButton.setBorder(null);\r\n leftButton.setContentAreaFilled(false);\r\n leftButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/left.gif\");\r\n leftButton.setIcon(iconDefault);\r\n\r\n rightButton = new JButton();\r\n rightButton.setFocusable(false);\r\n rightButton.setBorder(null);\r\n rightButton.setContentAreaFilled(false);\r\n rightButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/right.gif\");\r\n rightButton.setIcon(iconDefault);\r\n\r\n upButton = new JButton();\r\n upButton.setFocusable(false);\r\n upButton.setBorder(null);\r\n upButton.setContentAreaFilled(false);\r\n upButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/up.gif\");\r\n upButton.setIcon(iconDefault);\r\n\r\n downButton = new JButton();\r\n downButton.setFocusable(false);\r\n downButton.setBorder(null);\r\n downButton.setContentAreaFilled(false);\r\n downButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/down.gif\");\r\n downButton.setIcon(iconDefault);\r\n\r\n leftButton.addActionListener(this);\r\n rightButton.addActionListener(this);\r\n upButton.addActionListener(this);\r\n downButton.addActionListener(this);\r\n\r\n //set up the panels\r\n worldPanel = new WorldPanel();\r\n this.add(worldPanel, BorderLayout.CENTER);\r\n\r\n southPanel = new JPanel(new FlowLayout());\r\n southPanel.setBackground(Color.black);\r\n southPanel.add(leftButton);\r\n\t\t\t\tsouthPanel.add(upButton);\r\n southPanel.add(downButton);\r\n southPanel.add(rightButton);\r\n this.add(southPanel, BorderLayout.SOUTH);\r\n\r\n miniMap = new MiniMap();\r\n unitPanel = new UnitInfoPanel();\r\n\r\n eastPanel1 = new JPanel(new BorderLayout());\r\n eastPanel1.setBackground(Color.black);\r\n eastPanel1.add(miniMap ,BorderLayout.SOUTH);\r\n eastPanel1.add(unitPanel, BorderLayout.CENTER);\r\n this.add(eastPanel1, BorderLayout.EAST);\r\n\r\n //create initial map\r\n worldPanel.setInitialMap(mapPieces, mapWidth, mapHeight);\r\n miniMap.setMap(mapPieces, mapWidth, mapHeight, 12, 12);\r\n int x = worldPanel.getFirstX();\r\n int y = worldPanel.getFirstY();\r\n miniMap.setNewXY(x,y,21,15);\r\n addKeyListener(this);\r\n this.setBackground(Color.black);\r\n this.requestFocus();\r\n }", "@Nonnull\n private static MultimapBuilder.SetMultimapBuilder<Comparable, Object> newMapBuilder()\n {\n return MultimapBuilder.SetMultimapBuilder\n .treeKeys()\n .hashSetValues();\n }", "InfiniteMap<K,V> build(MapTypes type);", "public Board(Map<Integer, Space> spaces)\r\n\t{\r\n\t\t_spaces = spaces;\r\n\t}", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "public QuadGramMap()\n\t{\n\t\tsuper();\n\t}", "public static Map createMap(int xDim, int yDim){\n\t\treturn new Map(xDim,yDim);\n\t}", "public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}", "protected WumpusMap() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n private Map() {\n height_ = 0;\n width_ = 0;\n System.exit(-777);\n }", "private void fillMap() {\n\t\tObject tile = new Object();\n\t\tfor(int x = 0; x < map.length; x++) {\n\t\t\tfor(int y = 0; y < map.length; y++) {\n\t\t\t\tmap[x][y] = tile;\n\t\t\t}\n\t\t}\n\t}", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "public GameField() { //generation of maze size and more\n for (int i = 0; i < 18; i++) {\n for (int j = 0; j < 18; j++) {\n System.out.print(\" \" + Map[i][j] + \" \");\n }\n System.out.println();\n }\n width = height = 40;\n }", "public IntMap()\r\n {\r\n this(16);\r\n }", "public GameMapHashMap() {\n HashMap<String, HashMap<String, String>> temporaryMap = new HashMap<>();\n instantiateIndividualRooms();\n\n temporaryMap.put(\"Atrium\", atrium);\n temporaryMap.put(\"Breakfast Nook\", breakfastNook);\n temporaryMap.put(\"Menagerie\", menagerie);\n temporaryMap.put(\"Conservatory\", conservatory);\n temporaryMap.put(\"Panic Room\", panicRoom);\n\n temporaryMap.put(\"Fire Swamps\", fireSwamps);\n temporaryMap.put(\"Hall\", hall);\n temporaryMap.put(\"Dining Room\", diningRoom);\n temporaryMap.put(\"Arcade\", arcade);\n temporaryMap.put(\"Observatory\", observatory);\n\n temporaryMap.put(\"Courtyard\", courtyard);\n temporaryMap.put(\"Library\", library);\n temporaryMap.put(\"Garden\", garden);\n temporaryMap.put(\"Laboratory\", laboratory);\n temporaryMap.put(\"Kitchen\", kitchen);\n\n rooms = Collections.unmodifiableMap(temporaryMap);\n }", "public static Entity buildMap(Texture mapTexture, int w, int h) {\n\t\tEntity bg = new Entity();\n\t\tbg.add(new PivotComponent(new Vector2(0, 0)));\n\t\tbg.add(new SpriteComponent(mapTexture, w, h));\n\t\treturn bg;\n\t}", "public Map(Dimension dim){\r\n\t\tthis.dim = dim;\r\n\t\tinitiateMap();\r\n\t\tcreateWorldMap();\r\n\t}", "private void generateMap () {\n for (int i = 0 ; i < n ; i++) {\n mapCoordinate[i] = new CoordinateInfo(100 * random.nextFloat(), 100 * random.nextFloat());\n\n for (int j = 0 ; j <= i ; j++) {\n mapDistance[i][j] = mapDistance[j][i] = getDistance(mapCoordinate[i], mapCoordinate[j]);\n }\n }\n }", "public Function generateSMap() {\n\t\tFunction sMap = new Function();\n\t\t\n\t\t//initialize all targets to zero\n\t\tfor(Integer index : allMonomials.keySet()) {\n\t\t\tList<int[]> monomialList = allMonomials.get(index);\n\t\t\tfor(int[] monomial : monomialList) {\n\t\t\t\tsMap.set(monomial, new MilnorElement(0));\n\t\t\t}\n\t\t}\n\t\t\n\t\tsMap.set(new int[0], new MilnorElement(new int[0]));\n\t\t\n\t\t//TODO there should be a method which does what the next 6 lines do. almost filteredDimensions() but need AmodAn info, etc\n\t\tDualSteenrod AmodAn = new DualSteenrod(null);\n\t\tAmodAn.setGenerators(DualSteenrod.getDualAModAnGenerators(N));\n\t\t\n\t\tint topClassDim = Tools.milnorDimension(topClass());\n\t\tInteger[] AmodAnKeys = Tools.keysToSortedArray(AmodAn.getMonomialsAtOrBelow(topClassDim));\n\t\tMap<Integer, List<int[]>> filteredMonomials = getMonomialsByFilter(AmodAnKeys);\n\t\tInteger[] dualAnKeys = Tools.keysToSortedArray(filteredMonomials);\n\t\t\n\t\t//this is the only place where the targets of the s map can be NONZERO\n\t\tfor(int i = 0; i < dualAnKeys.length; i++) {\n\t\t\tList<int[]> monomialList = filteredMonomials.get(dualAnKeys[i]);\n\t\t\tfor(int[] monomial : monomialList) {\n\t\t\t\tsMap.set(monomial, new MilnorElement(0));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sMap;\n\t}", "Map(int width, int height, long tileWidth, Boolean[][] clip, String[][] hooks)\n {\n this.width = width;\n this.height = height;\n this.tileWidth = tileWidth;\n this.clip = clip;\n this.hooks = hooks;\n\n hookCurrent = \"default_map\";\n hookSpawn = \"spawn\";\n }", "static <K,V> MapBuilder<K,V> on(ByteSpace space) {\r\n\t\treturn new MapBuilderImpl<>(space);\r\n\t}", "public RadarMap() {\n initComponents();\n }", "private void copyMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (map[i][j] instanceof Player) {\n\t\t\t\t\tnewMap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Mho) {\n\t\t\t\t\tnewMap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Fence) {\n\t\t\t\t\tnewMap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public MapSum() {\n map = new HashMap<>();\n }", "public TiledMap createMap() {\n map_inter = new MapTile[g_logic.MAP_WIDTH][g_logic.MAP_HEIGHT];\n \n //drawing stuff\n tiles = new Texture(Gdx.files.internal(\"packed/terrain.png\"));\n TextureRegion[][] splitTiles = TextureRegion.split(tiles, 54, 54);\n map = new TiledMap();\n MapLayers layers = map.getLayers();\n TiledMapTileLayer new_layer = new TiledMapTileLayer(g_logic.MAP_WIDTH, g_logic.MAP_HEIGHT, g_logic.ISO_WIDTH, g_logic.ISO_HEIGHT);\n \n //actual generation\n for (int x = 0; x < g_logic.MAP_WIDTH; x++) \n {\n for (int y = 0; y < g_logic.MAP_HEIGHT; y++) \n {\n char chara = '.';\n int ty = 0;\n int tx;\n if (x == 0 || x == g_logic.MAP_WIDTH-1)\n {\n tx = 1;\n chara = '#';\n }\n else\n {\n tx = 0; \n chara = '.';\n }\n \n //set up map tiles\n MapTile tile = new MapTile(x, y, tx, ty, chara);\n Gdx.app.log(\"Map gen\", \"Created a map tile @\" + x + \",\" + y + \" \" + tx + \" \" + ty + \" \" + chara);\n \n //put them in the internal map\n putInterMap(tile, x, y);\n \n //set up renderer cells\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n //y,x\n cell.setTile(new StaticTiledMapTile(splitTiles[tile.getTextureY()][tile.getTextureX()]));\n new_layer.setCell(x, y, cell);\n }\n }\n \n \n float y_off = g_logic.getYOffset();\n new_layer.setOffsetY(y_off);\n layers.add(new_layer);\n \n g_logic.setInterMap(map_inter);\n\n return map;\n }", "public static MapView makeMapView(Map map) {\n TileView tileViews[][] = new TileView[map.getWidth()][map.getHeight()];\n for (int x = 0; x < map.getWidth(); x++) {\n for (int y = 0; y < map.getHeight(); y++) {\n Tile tile = map.getTile(x, y);\n if (tile instanceof Grass) {\n tileViews[x][y] = new TileView(tile, Assets.GRASSHEXTILE);\n } else if (tile instanceof Water) {\n tileViews[x][y] = new TileView(tile, Assets.WATERHEXTILE);\n } else if (tile instanceof Mountain) {\n tileViews[x][y] = new TileView(tile, Assets.MOUNTAINHEXTILE);\n } else {\n tileViews[x][y] = new TileView(tile, Assets.GRASSHEXTILE);\n }\n }\n }\n return new MapView(map, tileViews);\n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "public Map(Tile[][] tiles) {\n terrains = new String[]{\"r\", \"p\", \"m1\", \"m2\", \"m3\"};\n this.tiles = tiles;\n }", "InfiniteMap<K,V> build();", "@SuppressWarnings(\"all\")\r\n\tpublic Map(String map, Location mapLocation){\r\n\t\tMapPreset preset = MapPreset.presets.get(map);\r\n\t\tif (preset != null){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfinal World world = mapLocation.getWorld();\r\n\t\t\t\tfinal double x = mapLocation.getX();\r\n\t\t\t\tfinal double y = mapLocation.getY();\r\n\t\t\t\tfinal double z = mapLocation.getZ();\r\n\t\t\t\tfinal float pitch = mapLocation.getPitch();\r\n\t\t\t\tfinal float yaw = mapLocation.getYaw();\r\n\t\t\t\t\t\t\r\n\t\t\t\tfinal Float[] alliesBase = preset.getSpawnAllies();\r\n\t\t\t\tfinal Float[] axisBase = preset.getSpawnAxis();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] bombA = preset.getBombA();\r\n\t\t\t\tfinal Float[] bombB = preset.getBombB();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] domA = preset.getDomA();\r\n\t\t\t\tfinal Float[] domB = preset.getDomB();\r\n\t\t\t\tfinal Float[] domC = preset.getDomC();\r\n\t\t\t\t\r\n\t\t\t\tmainSpawn = mapLocation;\r\n\t\t\t\talliesSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + alliesBase[0], \r\n\t\t\t\t\t\ty + alliesBase[1], \r\n\t\t\t\t\t\tz + alliesBase[2],\r\n\t\t\t\t\t\talliesBase[3], \r\n\t\t\t\t\t\talliesBase[4]);\r\n\t\t\t\t\r\n\t\t\t\taxisSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + axisBase[0], \r\n\t\t\t\t\t\ty + axisBase[1], \r\n\t\t\t\t\t\tz + axisBase[2],\r\n\t\t\t\t\t\taxisBase[3], \r\n\t\t\t\t\t\taxisBase[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombA[0], \r\n\t\t\t\t\t\ty + bombA[1], \r\n\t\t\t\t\t\tz + bombA[2],\r\n\t\t\t\t\t\tbombA[3], \r\n\t\t\t\t\t\tbombA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombB[0], \r\n\t\t\t\t\t\ty + bombB[1], \r\n\t\t\t\t\t\tz + bombB[2],\r\n\t\t\t\t\t\tbombB[3], \r\n\t\t\t\t\t\tbombB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domA[0], \r\n\t\t\t\t\t\ty + domA[1], \r\n\t\t\t\t\t\tz + domA[2],\r\n\t\t\t\t\t\tdomA[3], \r\n\t\t\t\t\t\tdomA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domB[0], \r\n\t\t\t\t\t\ty + domB[1], \r\n\t\t\t\t\t\tz + domB[2],\r\n\t\t\t\t\t\tdomB[3], \r\n\t\t\t\t\t\tdomB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domC = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domC[0], \r\n\t\t\t\t\t\ty + domC[1], \r\n\t\t\t\t\t\tz + domC[2],\r\n\t\t\t\t\t\tdomC[3], \r\n\t\t\t\t\t\tdomC[4]);\r\n\t\t\t\t\r\n\t\t\t\tfor (Float[] spawnpoint : preset.getSpawnpoints()){\r\n\t\t\t\t\tspawnsList.add(new Location(\r\n\t\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\t\tx + spawnpoint[0], \r\n\t\t\t\t\t\t\ty + spawnpoint[1], \r\n\t\t\t\t\t\t\tz + spawnpoint[2], \r\n\t\t\t\t\t\t\tspawnpoint[3], \r\n\t\t\t\t\t\t\tspawnpoint[4]));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmapID = maps.size()+1;\r\n\t\t\t\tmapName = map;\r\n\t\t\t\tmapAvailable.add(mapID);\r\n\t\t\t\tmaps.put(maps.size()+1, this);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\tFPSCaste.log(\"Something went wrong! disabling map: \" + map, Level.WARNING);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFPSCaste.log(\"Could not initialise the Map \" + map, Level.WARNING);\r\n\t\t}\r\n\t}", "public MapSum() {\n root = new Node();\n size = 0;\n }", "public TimeMap2() {\n map = new HashMap<>();\n }", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}", "public MiniMap(Grid grid) {\n\t\tcurrent = this;\n\t\timg = new PImage(grid.cols, grid.rows);\n\t\tint x = Rogue.stage.width - WIDTH;\n\t\tthis.grid = grid;\n\t\tthis.pos = new Int2D(x, 0);\n\t\tbg = createBG();\n\t\tupdate();\n\t\tignoreDiscovered = Registry.getBoolean(\"game.clear_minimap\");\n\t}", "public interface GameMapBuilder {\n void sapperStyle();//小兵装饰\n void mapColor();//地图颜色\n}", "public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "public MapCalculator(ZanMinimap minimap) {\n \t\tmap = minimap.map;\n \t}", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "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 Dimension getMapSize() {\n \t\treturn new Dimension(15, 13);\n \t}", "public GameSettingBuilder setMapSize(int mapSize) {\n this.mapSize = mapSize;\n return this;\n }", "public MapGraphExtra()\n\t{\n\t\t// TODO: Implement in this constructor in WEEK 3\n\t\tmap = new HashMap<GeographicPoint, MapNode> ();\n\t}", "public MapGenerator(GameMap map) {\n\n gameMap = map;\n setGuiHashMap();\n firstCountryFlag=true;\n validator = new MapValidator(gameMap);\n }", "public MapPanel(MapObject[][] map, int pixels_per_grid) {\n \tthis.map = map.clone();\n \tif (pixels_per_grid == 0)\n \t\tthis.pixels_per_grid = GRID_SIZE;\n \telse\n \t\tthis.pixels_per_grid = pixels_per_grid;\n }", "Graph<Integer, DefaultEdge> buildMap();", "public MapSum() {\n root = new Trie();\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public static <K, V> MapBuilder<HashMap<K, V>, K, V> hashMap()\n {\n return new MapBuilder<HashMap<K, V>, K, V>(new HashMap<K, V>());\n }", "private BuildsMapping(long hash) {\n\t\tthis.hash = hash;\n\t\tthis.attribute = AttributeMapping.properify(name());\n\t}", "protected MapImpl() {\n }", "public TerrainObject build() {\n\t\tfor(int i=0; i<paramsSet.length-3; i++)\n\t\t\tif(!paramsSet[i])\n\t\t\t\tthrow new IllegalArgumentException(\"Needed parameter (No. \"+i+\") for TerrainObject hasn't been set\");\n\t\treturn new TerrainObject(x, y, z, xW, yW, zW, scale, seed, noise);\n\t}", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "private item[][] newMap() \r\n\t{\n\t\tinitialItems=50;\r\n\t\t\r\n\t\titem cReg = new item(\"cash register\");\r\n\t\titem door = new item(\"door\");\r\n\t\t\r\n\t\titem[][] array = new item[][] {\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), hPhn(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), path(), path(), path(), path(), path(), wall()},\r\n\t\t {wall(), path(), path(), path(), hPhn(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), path(), path(), path(), hPhn(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), cReg, cReg, path(), path(), path(), hPhn(), path(), hPhn(), wall()},\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), door, wall(), wall()},\r\n\t\t {wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall(), wall()},\r\n\t\t};\r\n\t\t\r\n\t\tdoorX=7;\r\n\t\tdoorY=9;\r\n\t\t\r\n\t\treturn array;\r\n\t}" ]
[ "0.7138777", "0.69576705", "0.6854272", "0.6700145", "0.6668255", "0.66168714", "0.65868855", "0.65713054", "0.65685767", "0.64732707", "0.6339884", "0.6317713", "0.63088876", "0.6305527", "0.62855595", "0.62451357", "0.62397313", "0.6236596", "0.6195476", "0.61807054", "0.61600477", "0.6152809", "0.6131977", "0.6119012", "0.61067325", "0.61048955", "0.6099205", "0.60867673", "0.60812485", "0.60708064", "0.6055803", "0.6005737", "0.59787816", "0.59691805", "0.5956475", "0.5928113", "0.59200436", "0.5910386", "0.5892123", "0.5860628", "0.586013", "0.58573335", "0.58445853", "0.58348936", "0.58147174", "0.58020246", "0.5781834", "0.5780939", "0.5773994", "0.5771743", "0.5769062", "0.5751533", "0.5727164", "0.56944025", "0.5672298", "0.5666222", "0.5664435", "0.5645207", "0.56404144", "0.5640191", "0.56381595", "0.56331575", "0.56293184", "0.56149143", "0.56122464", "0.5596482", "0.5591363", "0.5584832", "0.55827594", "0.556362", "0.5556076", "0.55550474", "0.5554494", "0.554975", "0.55475634", "0.55457354", "0.55413723", "0.5541243", "0.5526788", "0.5513922", "0.550765", "0.5499219", "0.54980534", "0.54961336", "0.545667", "0.54483217", "0.54469603", "0.544418", "0.5430899", "0.54264915", "0.54152477", "0.5413349", "0.5409656", "0.54060197", "0.5397073", "0.5396408", "0.5391845", "0.5376334", "0.5373751", "0.536342" ]
0.6287035
14
Puts current map values into bytearray, which should of which should be of this.size map_size_pixels ^ 2.
public native void get(byte[] bytes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface WorldmapBuffer2 {\n final static byte[] image2 = {\n -125, 47, -3, 77, 51, 29, -45, -103, -120, 119, 76, -122, -82, -22, -106, 61, 113, 4, -59, 124, -116, 59, 115, -26, -44,\n 56, -115, 34, 106, -124, 98, 83, -115, 70, 9, -67, -116, 99, 92, -127, 89, -23, -68, -11, -41, 72, -15, -68, -48, 4,\n 29, 85, -30, 4, -79, -56, -20, 126, 69, 119, -119, -115, -116, 60, -37, -53, -107, 68, 90, -45, 79, -99, 108, 109, 45,\n 84, -65, -93, -44, -79, -23, -40, 23, -40, -48, 98, -92, -50, 125, -104, -52, -58, 50, -97, -119, 13, -78, -81, 82, -86,\n 15, -71, -92, 77, -115, -48, 48, 77, -88, 6, 61, 104, -117, -51, 103, -90, 5, -71, -52, 42, 76, -68, 113, 79, -7,\n 43, -42, -84, 38, -56, -100, 93, -44, 34, 71, -113, 100, -116, 64, 42, 88, -40, 94, 93, -83, -118, -115, 99, -32, -27,\n 72, -26, 43, -104, 35, 7, 37, 101, 12, -66, 107, -104, -128, -106, -116, 54, -93, -83, -119, -50, 23, -47, -117, 39, 89,\n 6, -9, 41, 47, 10, -37, -124, -2, 115, -40, -55, -67, -37, -118, -118, 92, 108, 24, -41, 35, -43, -61, 45, 44, 118,\n 87, 92, 70, -14, 108, -37, -22, -106, -41, -127, 124, -92, -70, -99, -42, 22, -38, 106, 43, -8, -84, -97, -99, -39, -48,\n -6, -62, 78, -10, -98, -38, 109, -98, -23, -87, -45, 112, -67, 73, 42, 21, 99, -25, 109, -40, -21, 10, 120, -88, -110,\n -99, 105, -37, -97, 68, -70, -112, 15, 54, -99, 111, 77, 37, 108, 52, -33, 113, 93, 59, -33, 56, -78, 124, -85, 42,\n 107, -3, -54, -94, 29, -37, 97, -53, -54, -24, 8, -113, -18, 45, 108, 61, 122, -124, 19, 102, 118, -65, -14, -31, 32,\n 30, -30, -8, 35, -40, 102, -106, -109, -33, -115, -58, -27, 38, -37, 43, 88, 106, -11, -104, -51, -16, 11, -39, 116, 24,\n -123, -48, -6, 107, 73, -39, -31, -107, 109, -98, 85, -36, 39, 115, 61, -37, -33, 53, -61, -49, 103, -119, -73, 84, -35,\n -64, -6, 97, -72, -85, -98, -94, 58, -33, 127, 77, -34, 96, 90, -127, 58, -22, -118, -61, -83, 58, 96, 59, 95, 27,\n 11, -29, -123, 76, 79, -108, 11, -48, -35, -100, -40, 82, 4, 97, 57, -18, -36, -63, -94, -28, -105, -87, -76, -57, -84,\n 122, -13, -40, -60, -37, -6, -28, -105, -42, -34, -105, 76, 61, 59, -2, -27, -103, -125, -76, 111, 39, -39, 118, -88, -119,\n 56, 43, 116, 50, 22, -87, 44, 43, -91, 63, -21, -51, -2, -14, -26, -38, -76, 36, -26, -52, -122, -26, 100, -61, -75,\n -108, 7, 24, -24, 92, -37, -28, -116, -51, 52, 126, -33, -103, -102, 114, -27, 77, -24, -124, 87, 68, -13, -119, -28, 99,\n -71, -33, 25, 88, -49, 120, 41, -24, -125, -82, -62, 102, -25, -49, -119, 25, -82, 111, 38, 63, -52, 76, 26, 81, 71,\n 118, -115, 39, 125, -58, -94, -26, 29, -109, -25, -4, -92, -80, 43, -42, -83, -108, -66, -86, -65, 43, -25, 19, 70, -23,\n -80, -68, -54, -72, -3, -43, 32, -117, -93, 102, -93, 27, -29, -77, 56, -70, -38, -34, 27, -67, -94, 52, -75, -119, -73,\n -5, -45, 58, 120, -48, 107, 125, -112, 109, -84, -25, 40, 78, -21, -8, 69, -27, -117, -36, 108, 57, 93, -114, 52, 120,\n -32, 100, 68, -48, -51, 65, -35, -42, 78, 82, 58, -88, 96, -121, 126, -39, 104, 34, -123, -6, 9, 66, -35, 40, 107,\n 66, -120, -65, 127, -125, -19, -75, 6, 122, -30, -21, -74, 42, 126, -121, 2, 3, -19, 22, 20, 53, 85, 89, 61, -21,\n -25, -95, 94, 18, -18, -35, 70, -101, 33, 10, -80, 18, 35, 94, 99, -98, -18, 40, -66, 87, 54, -18, -23, -36, 107,\n -24, 8, 47, -28, -113, -61, -87, -20, -98, -19, -71, 45, -35, -128, -82, -80, -23, -121, -38, 99, -117, -70, 7, 104, -20,\n 52, 122, -18, 76, -115, -40, 36, -6, -16, 88, -59, -72, 127, -58, -111, 59, 126, -2, 82, -17, -68, -49, -18, -63, -118,\n 111, -109, -33, 120, -118, -50, -52, 52, -29, -121, -2, -62, 126, 26, -124, -46, -18, -112, -115, 92, -65, 117, 125, -16, -74,\n 74, 90, -9, 27, -61, 0, 111, 110, 2, -72, -125, -102, 30, 22, 42, -33, 115, 23, -6, -24, 124, -102, -57, -16, 78,\n -62, 76, -119, 91, -48, -87, -65, -71, 126, -118, -123, -89, -18, -31, -92, -13, -95, -68, -35, -63, -100, 55, 88, -68, -47,\n -69, 55, -12, 99, 33, -16, -34, -22, -63, 66, 78, -11, -93, 78, 66, 17, 12, -75, -115, 6, -109, 34, 9, 114, -108,\n -72, -103, 8, -76, 112, 58, 126, -16, -74, -34, 102, 29, -56, -64, 88, 103, 123, -91, 100, 55, 61, -55, -50, 59, -33,\n -22, 90, 55, -90, -106, -3, -20, -79, -35, 53, -112, -2, -47, 49, -114, -23, 30, 95, -16, 25, 70, -17, 75, 53, -9,\n -38, 73, 109, 53, 38, -10, 106, -102, 55, -17, -31, 76, -26, -6, -128, -110, -1, -44, 25, 7, -56, 86, -56, -9, -6,\n 9, -10, -57, -66, -20, 5, 125, -8, 106, -83, -8, -1, -89, -13, -114, 31, -97, -88, -120, 75, -21, 42, -22, -19, -111,\n 101, -117, 107, -30, -71, 121, -11, -99, 23, 88, -68, -8, -88, -85, 25, -128, 72, 47, -95, -122, -125, -87, 50, -82, 50,\n -14, -34, -92, 112, 102, -29, -87, -113, -106, -64, -18, 108, 26, 107, 32, 69, -37, 120, 10, -113, 118, -20, -2, 38, -46,\n 93, -116, -63, 23, 126, -19, 25, -55, -113, -95, -99, 121, -55, 106, -122, 29, 72, -32, 117, 103, -106, 86, -52, 104, -37,\n 15, -14, -122, -27, -33, 77, 79, 96, 4, 27, 34, -87, -6, 69, -69, -69, -93, 113, 3, -49, 69, -75, 56, 101, 106,\n 78, 57, 62, -15, -16, 92, -8, -63, -114, -48, -59, -82, 95, 52, 116, 108, 104, 11, -69, 78, 6, 16, 1, 4, 14,\n 36, 88, -48, -32, 65, -124, 9, 21, 46, 100, 56, 80, 0, 0, 1, 7, 35, 10, -96, 8, 49, 98, -61, -126, 15,\n 1, 108, -28, -40, -47, -29, 71, -112, 33, 69, -114, 36, 89, -46, -28, 73, -108, 41, 47, 98, 76, -88, 113, 100, -59,\n -115, 43, 9, -62, -20, 72, 49, -128, 77, -121, 11, 93, -106, -92, 72, 83, -92, -52, -101, 61, 29, -6, -12, -120, 51,\n -88, -48, -116, 10, -127, 74, 100, 57, 115, 105, 83, -88, 45, -97, 10, -20, 57, 53, 42, 84, -93, 59, 85, 62, 20,\n -86, 53, -27, 87, -80, 97, -59, -114, 37, 91, -42, 108, 88, -85, 87, -43, -82, 101, -120, 52, -93, 70, -93, 87, -67,\n -98, -91, 91, -41, -82, -39, -86, 108, -25, 22, -35, 25, 119, -24, -57, -117, 50, -105, 86, 37, 10, 56, 110, -31, -102,\n 84, -111, 30, -2, -23, 23, -95, 85, -57, 65, 115, 98, -115, -52, 118, 109, 86, -73, -106, -43, 10, 30, -37, -109, 35,\n -30, -69, -2, -95, 69, -113, 38, 93, 58, 100, 90, -51, -87, 85, 27, -52, -85, 23, -76, 105, -40, -79, -47, 14, 69,\n -51, 122, 47, 95, -61, -84, 1, 83, 117, 74, -8, -90, 83, -117, 46, 43, 7, -83, 73, 24, -13, -17, -103, -89, 99,\n 54, -100, -24, -72, -7, 98, -29, -61, 21, -41, 94, -51, 50, 115, 117, -21, -103, 111, -13, -12, 44, -37, -5, 119, -16,\n -31, 65, 82, -57, 94, -34, -68, -50, -18, -30, -43, -81, 79, 60, 25, -29, -21, -94, 55, 79, -21, 110, -1, -5, -16,\n 68, -38, -48, -87, -73, 126, 59, 84, -30, 120, -72, -104, -29, -115, 53, -34, -116, -21, -17, 49, -14, -50, 83, -80, 41,\n -56, -2, -21, 108, 34, -10, 34, -108, 112, 66, -80, 18, 92, -16, -62, -43, -46, -93, 112, 67, -39, 4, -77, 78, 37,\n -86, 78, 3, -118, -90, -107, 112, 10, 44, -90, -86, -118, -77, -112, -71, 18, 31, -37, 77, -70, -57, -108, -102, 46, 58,\n 4, 49, -76, -47, -75, -89, 42, -37, -114, 39, -30, 56, -12, -15, 71, 9, 87, -68, 113, 72, -84, -128, 52, 114, 52,\n 15, -33, -5, -22, -60, -58, 104, 91, 14, 57, -59, -28, -5, -52, 64, 5, 3, 67, 48, -66, -53, 90, -126, 18, 61,\n 24, -119, -12, 50, -71, 39, -35, 123, -85, -84, 18, -113, 52, -13, 76, -46, -124, -4, 114, 77, 7, -47, 116, -77, -77,\n -103, 62, 4, 81, -54, -105, 66, -2, -124, 9, 63, -121, 32, -30, 107, -56, -25, -24, -29, 75, -51, 40, 9, -108, -18,\n 58, 54, 11, 5, 46, -52, -93, 108, -61, 11, -52, 55, 27, 117, 116, 73, 67, 35, 109, -53, -90, 29, 31, -75, 52,\n -52, 4, 43, 125, -47, 36, 38, -21, -53, 19, 75, 27, -97, -93, -76, 83, 80, 47, 27, 49, 63, 26, 37, 85, -107,\n -50, 39, 73, 100, -108, -52, 87, 47, -107, 117, 86, 64, 87, 93, -112, 43, -8, 102, -75, -76, 69, 37, -105, -52, -75,\n -43, -15, 14, 45, -11, -42, 1, 41, 101, 117, 79, -53, -4, 66, -83, 86, 91, 85, 35, -86, -71, 97, 53, -27, 49,\n 68, 93, -85, -107, -107, -39, 102, -85, -85, 8, 66, 107, -83, 53, -111, 65, -76, 78, -30, 118, -73, -93, -126, -67, 49,\n 48, -63, -74, -61, -42, 63, 49, 109, 91, 55, -37, -88, -26, 42, 108, -80, -77, -54, -20, -10, -34, 55, -33, -123, 87,\n -77, -82, -16, -11, 118, 75, -99, 68, 51, -18, 37, 19, -5, -22, -46, -39, -106, -22, -20, 109, -77, 1, -37, 117, 120,\n -33, 42, 81, 26, 76, -38, -97, 62, -11, -9, -30, 35, -7, -125, -40, 75, 13, 49, -34, 21, -32, -124, -21, -30, -17,\n -41, -32, -114, -123, -24, 92, -91, 42, 30, 89, -56, -26, -100, -118, 113, -29, 80, -59, 45, -40, 100, 72, -87, -11, -8,\n 102, 31, -11, -123, -103, 50, -118, 113, -34, -48, 74, -26, -2, 66, 51, -111, 83, 81, -55, 13, 85, 42, 17, -91, 34,\n 15, -49, -55, -46, -43, 121, -25, -128, -125, 123, -115, -79, 37, 17, -19, -39, 103, -84, -45, -124, -102, -29, -85, -77, -114,\n -80, -27, -74, -46, 36, -103, -44, -8, 8, -115, 55, 58, -115, 37, -14, -86, 54, -77, 103, 76, 21, 74, -96, -73, -66,\n 80, -39, -67, 56, -37, 74, 89, -81, -13, 86, -17, 105, -71, 83, -42, -37, -51, 59, -89, -22, -72, 49, -76, 83, 28,\n 79, 102, -102, -91, 62, 85, 109, -76, -109, 114, 92, 41, -31, 14, -114, 44, -45, -103, -5, 38, 114, -22, -116, 36, 6,\n 57, -15, -65, 59, 23, -38, 114, 12, -69, -10, -4, 107, 116, 65, 43, -4, 101, -50, 125, 37, -102, -72, -126, -17, -44,\n -119, 41, 22, 87, 84, -106, 103, 116, 65, -97, 123, -57, 17, 53, 119, 113, 116, -34, -111, -76, -3, -68, -63, 123, -49,\n -8, -74, -74, -75, -76, -7, 59, -83, -26, 125, 29, 118, -32, -29, -52, -82, 70, -105, 127, -41, 107, -38, -52, -87, -9,\n 83, 120, -20, -21, -107, 30, -8, -20, -49, 36, 12, 89, -84, 98, 37, 51, 120, -18, -124, 91, -98, -7, -14, -66, 101,\n 16, 61, -55, 54, -33, 62, 108, -21, -113, 87, 88, -47, -18, -21, 39, -117, 111, -23, 73, -74, 95, -68, 17, -45, 94,\n 95, -4, 7, 125, -81, 124, -84, 74, 75, 1, -101, -41, -66, -1, 65, -18, 113, -2, -17, -21, 21, 73, 114, 7, 32,\n -33, 108, -55, 112, -5, -93, -96, -18, 24, -104, -84, 10, 2, 73, 112, 122, 1, 96, 120, -58, -123, 40, 2, 25, 47,\n 125, 28, -20, -115, -1, -16, -73, 49, 105, -107, 14, 64, 74, -109, -110, -24, 50, 88, -65, -30, 93, 48, 106, 47, -4,\n -103, 8, -49, 102, -79, 32, -127, -49, 54, 54, -44, 22, 9, -99, -57, 67, 25, -50, -112, 96, 117, 43, -99, 91, -32,\n 66, 67, 36, 110, 37, -120, -17, 113, 97, 18, 5, 38, -93, 120, 9, 43, 103, 13, 99, 23, 16, 17, 38, 23, -25,\n 64, 113, -119, 65, -69, -33, 4, -115, -24, 68, 48, 90, 112, -117, 109, 10, -29, 122, 96, 4, -88, -2, -3, -120, 105,\n -127, 58, 31, 118, -48, -120, 58, -12, -115, -47, 111, 104, 73, 79, 119, -56, 87, 70, 60, 126, 70, -114, -41, -53, 35,\n 120, -10, -109, -91, -73, 52, -15, 46, -38, -79, -48, -63, -62, 119, -74, 28, 105, 113, -113, 33, -85, -48, -119, -122, -90,\n -89, 62, 70, -46, 92, 123, -44, -97, 36, 69, -74, 52, 64, -70, 103, -126, 14, 20, 100, -46, 2, 37, 59, 55, -54,\n 69, -127, 112, 92, 36, 25, 37, 118, 50, -55, 84, -46, -110, 97, 124, -37, -5, 58, -71, -54, -102, 89, 39, -109, -101,\n -53, -107, 10, -75, -89, 49, -106, -123, -14, -112, -118, -100, 78, 41, -123, 40, 46, 84, 114, 5, -106, -61, -2, 4, 85,\n -23, -74, -9, 74, 98, -118, 107, 82, -2, -5, 95, 1, 43, 22, -56, -15, 49, -82, -112, -70, 124, 30, 47, -87, -24,\n -53, 64, -118, -114, 108, -55, 36, -90, 49, -39, -120, -86, 19, -14, -117, -101, -90, 97, 91, 15, -35, 39, 63, 79, 101,\n 115, -120, 125, -111, -32, 125, 100, -103, -95, -3, 116, 105, -125, -40, 68, -112, 42, -127, 53, 78, 110, 50, -55, 105, -124,\n 10, -25, 101, -16, 89, -102, 114, 102, -24, -100, 127, 25, 86, 8, 55, -103, 21, 20, -127, -19, -102, -67, 108, -29, 21,\n -95, 39, 32, 82, -46, -77, -125, -100, -76, -25, 63, -111, -88, -49, 4, -50, -115, -117, 22, -3, 28, -5, -32, -55, 68,\n -72, 24, -48, 93, -3, 3, 90, -110, 30, 26, 71, 126, 89, -77, 45, -11, -108, 40, -3, 56, -6, -46, 105, 5, 40,\n -93, -38, 58, -35, -18, 96, 42, -78, 81, -102, -109, 65, 1, -35, -52, 96, 60, -54, 56, -121, -94, -76, -95, -46, -108,\n 104, 69, 111, -118, -49, 113, -127, -110, 123, -122, -71, 14, 50, -113, 42, 56, 67, 70, -47, 60, -52, -102, -35, 74, -43,\n 6, 66, 44, 102, 83, -87, -25, 99, -90, 12, 7, 118, 84, -80, 98, -55, 124, 9, -116, 33, 56, 35, 88, 41, -124,\n -122, -11, 126, 59, 36, -42, 84, 119, -7, -55, -91, -111, 52, -99, 88, -20, 42, 68, -83, 122, 32, -41, 64, -52, -87,\n 106, -59, -2, 99, 29, 17, -7, -80, -22, -119, 40, -123, 56, -28, 43, -30, -94, -89, 81, -73, -18, 114, 84, -120, -52,\n 11, 59, 125, -8, 88, -107, 2, -106, 69, 3, 53, -44, 94, 11, 91, 70, 87, 37, 11, 114, 56, 69, -25, 101, -97,\n -7, -61, -48, 29, 112, -89, 11, -107, -86, 98, -26, 90, 90, -122, 49, -47, -118, 92, 2, -19, -86, 44, -21, 89, 86,\n -114, 21, -78, -90, -75, -117, -35, 96, -21, -55, 5, -74, 53, -79, -76, -101, -22, 105, -33, -6, -37, -55, 10, -107, -95,\n 8, 92, -104, -83, 94, 123, 91, 26, 62, 18, -107, -77, -20, -47, 32, 39, 10, -37, 8, -110, 86, -76, 35, -116, -105,\n 69, 122, -21, -37, -103, 114, -87, 86, -109, 107, -36, 112, 89, 42, -87, -29, 34, 55, -125, -117, -63, -18, 123, -98, -69,\n -42, -13, -14, -107, -92, 101, 21, -24, 116, -63, -75, 92, 109, -23, 16, -75, 67, 53, 85, -125, 22, 39, -62, 126, 54,\n 80, -68, 96, -91, 84, 121, -19, 26, 94, -85, -19, 87, -113, 44, 68, -20, 110, -85, 11, -33, 12, -27, 102, 70, -26,\n -67, 43, 77, 103, 87, -94, -74, 25, 49, 82, 0, 22, -16, 11, 63, -120, 45, -27, 58, -105, -80, -73, 21, 41, 101,\n 83, -22, -34, -9, 34, 56, 53, 68, 116, 108, 100, 67, 88, -91, -82, -12, 73, 42, 39, 94, 19, -123, 43, 108, 97,\n 2, -14, -53, -88, -54, 76, 93, -2, 97, 33, 76, 37, -23, 6, -107, -102, 114, 25, 112, 124, -43, 37, 98, 22, -45,\n 119, -86, 107, -116, 104, -114, 67, -9, -30, -53, -6, 68, 95, 20, -34, 38, 116, 91, -85, -74, 42, 69, -39, -97, 64,\n -106, 113, 99, 18, 90, -28, -43, 38, 118, 89, -62, 61, 23, -110, 109, 76, -89, 119, -71, 56, 56, 21, 54, -87, -112,\n 71, 12, -30, 16, -29, -49, 116, -57, -117, -18, -115, 35, -52, 39, -17, 2, 54, -65, -65, -12, -14, 83, 109, -74, 46,\n 49, 35, -7, -66, -11, -116, 42, 112, 117, 124, 96, 42, -69, 6, -126, -60, -5, -22, 105, -25, -20, 48, -19, 112, 57,\n 102, 9, -83, 51, 76, -19, 21, -24, -115, 54, 90, -61, 79, 94, 96, -97, -33, -71, 99, 30, -9, -40, 89, 107, 67,\n -50, -116, -105, 27, -35, 2, -117, 105, -98, 45, 30, 112, -98, 37, -35, 59, 82, 89, 122, -61, -89, 94, 84, 110, -125,\n -20, 97, 81, 98, 58, -45, 88, 77, 22, -114, 33, 44, 22, 34, -93, -84, -75, -119, 84, 117, -83, 19, 99, 106, 86,\n -13, -82, -65, -2, -75, 105, -80, 91, 125, -40, 34, -97, 16, -44, -20, 125, 53, -96, 105, -51, 92, 68, -29, -102, 77,\n -89, -118, 91, 127, 14, 77, -48, 82, 27, -5, -91, -54, 115, -10, 32, 55, -23, -39, 61, -81, -74, -41, 39, 61, 10,\n -124, -77, -37, 109, -66, -31, -46, -108, -70, 27, 119, -84, -2, -93, -73, -27, -97, -10, -44, 92, -64, -42, -10, -24, -28,\n -43, -19, 122, -47, -51, -55, -82, 86, 116, -104, 121, 105, 72, -86, 126, 16, -46, 56, 18, 92, 0, 57, -106, 31, 88,\n 67, -75, 118, -17, -124, -113, -64, -21, 109, -25, 16, -25, -69, -36, 99, -6, 50, -65, -5, -67, 93, 120, -29, 53, -53,\n 13, 46, 49, -102, 59, -53, 41, -74, 74, 57, 64, -110, 115, -77, -94, -109, -13, 43, 79, 63, 92, -110, -78, -69, 100,\n -32, 8, -87, -42, 68, -38, 117, -29, 51, -49, -15, -96, 10, 119, 115, -25, 104, -38, -29, 77, -28, 76, 63, 83, -68,\n -100, 66, -30, 9, -86, 124, -82, -102, -54, -43, 91, 36, -94, 21, -70, 124, -24, -30, 47, -86, 24, 28, -17, 6, -101,\n -8, -101, -108, -34, -116, -50, 13, -68, -22, 57, 109, 107, -87, -49, -54, -22, 64, -47, 102, -12, 122, -77, 28, -28, -127,\n 85, 98, 115, 45, 10, -22, 75, 71, -99, -36, 102, -82, -94, 100, -99, 61, 103, 122, -31, 69, -74, -15, -3, 108, -38,\n -35, 103, 48, -80, -121, 125, -42, 117, -1, 56, -115, -51, -114, -44, -39, 74, 29, -42, -51, 14, -7, -32, 35, -99, -33,\n -72, 79, -102, -18, 124, -49, 41, -78, 77, 70, -17, -68, 3, 6, -77, 123, -97, 15, -39, 99, 41, -64, 127, 110, -105,\n 50, 80, 118, -9, 50, -37, 77, -58, -49, -1, -37, 119, 110, 28, -5, 40, 71, -2, 45, -81, -56, -17, 45, -27, 127,\n 83, -109, -70, -42, 45, -79, -114, 21, 14, -106, -102, 71, -19, -25, -73, -102, -32, -126, 18, -36, -14, -100, -59, 125, -4,\n 52, 14, -78, 71, -85, 8, -14, -87, 63, -39, -22, -11, 102, 105, -41, -13, -111, 46, -58, -62, 118, 31, 105, -49, -40,\n 15, -37, 125, -60, 70, -21, 105, -15, 0, -84, 51, 85, 54, 40, -73, -63, -49, 54, -15, -3, -24, -4, -96, 79, 50,\n -67, -72, 110, -22, -16, -15, -11, -4, -50, -89, -10, -36, 24, -92, 62, 72, 115, 45, -59, -114, -78, 63, -106, -108, -10,\n -23, -29, 29, -82, 58, -17, -13, 55, -24, 56, -98, -114, -73, -65, 117, -48, 111, -125, 49, -11, 75, 63, 2, 84, -69,\n -23, -53, -67, 21, -77, -72, 60, -61, 48, -98, 107, 54, 115, 75, -91, -61, -127, 21, -29, -53, 63, 48, 10, -67, 68,\n -103, 64, -63, 34, -94, -66, -126, -74, -11, -21, 64, -102, -85, 58, 4, 36, -68, 28, -119, 13, -86, -126, -107, 87, 3,\n -101, -1, -117, 63, -13, -93, 64, 97, 107, -67, 20, 124, 56, -86, -30, 64, 63, 99, -69, -22, 107, 63, 44, 3, 24,\n 12, -12, 61, 57, 65, -81, -100, -104, 24, -125, -86, -79, 10, 25, 63, 22, -20, -90, 92, -94, 45, -67, 11, -68, -89,\n -109, 65, -63, 43, 45, 78, 91, 48, -73, -77, -113, 28, 44, -67, -99, -46, 30, 118, -7, 35, 35, 92, -2, 62, 33,\n 28, 66, 34, -52, -88, 21, -76, 36, 111, -14, 64, 26, 52, 64, 49, -52, 36, 78, 115, 39, -54, -118, 66, 49, -46,\n 47, 19, 108, -95, -63, -77, -110, -67, -78, 45, 45, 12, -85, -5, -96, -101, -32, -61, 60, 61, -53, -118, 25, -108, -71,\n -7, -110, 62, -51, -38, 48, 94, -93, 51, -17, 8, -65, 75, 2, 51, 35, -45, 36, 32, -12, -69, 46, -116, 67, -20,\n 57, -88, -121, 73, -101, 68, 20, -64, -57, 57, -93, 1, -36, 67, -43, 106, 47, 63, -28, -68, 57, -30, 31, 53, 20,\n -103, -10, -64, -92, 78, -93, -62, 67, 84, 68, 57, 92, 40, 103, 122, -79, 13, 42, -94, -18, 114, -65, 62, -52, 67,\n 104, 75, 30, -109, 67, -61, -39, -128, 31, 114, 50, 60, 94, 65, -90, -5, 19, 69, 14, -117, -71, -111, 34, -77, 37,\n 116, -65, 37, 43, -64, -24, -117, -107, 112, -21, 13, 10, -39, -113, 14, -15, 68, -14, 90, -108, 71, -60, -59, 10, -86,\n 42, -68, 90, -58, -3, -47, -66, -68, 122, -102, 94, 83, -74, 98, 27, -58, -65, -101, 16, -74, 57, 70, -91, 57, -85,\n -66, -125, -108, 59, 98, 70, 27, 51, -106, -61, -40, 61, 14, -21, -59, -121, -62, 62, 92, 1, -61, 73, -92, -72, -2,\n 113, 18, 13, -110, -59, 89, -44, 69, -40, 113, -86, -42, -127, 70, 113, -20, 30, 3, -55, 57, 83, -76, -75, -82, -93,\n 58, -10, -2, 74, -58, 76, -71, -70, -1, 48, -73, 0, -100, 34, 64, 124, -94, 106, 19, 41, 91, -60, -107, 97, -53,\n 71, 61, 43, 54, -15, -22, -86, -96, 75, 64, 77, -62, 37, -68, 25, 72, -126, 44, 72, 59, -12, -98, -124, 124, 34,\n 40, -84, -74, 19, 107, -56, -104, -80, 8, -120, -84, -77, 17, -108, -69, 97, -62, 57, -24, -24, 69, -95, -29, 51, -117,\n 28, 67, 36, 100, -100, 107, -55, 68, -40, -128, -106, 86, -63, -81, 124, 43, -118, -109, 68, 73, -27, -13, -107, 22, 90,\n -91, -38, -15, -63, 14, 123, 29, -37, -101, 38, -99, 90, 38, -40, -29, -112, 82, -20, 16, 54, -45, -111, 44, -28, -92,\n -98, 100, -75, -60, 107, -92, 79, -127, 69, -42, -29, 21, 44, -117, -89, 39, 52, 74, 62, 84, -62, -85, -94, -88, 91,\n 52, 35, 70, 34, 65, 116, -14, -63, -88, -92, -88, -87, -108, -76, 7, 2, -54, -65, 120, -56, 72, 82, -88, -83, 28,\n 41, 34, -93, 61, -92, 60, 51, -43, 34, 49, 115, 100, 15, -56, 64, -98, 108, -124, -81, 52, -70, -97, 78, 92, -53,\n 70, 83, 58, -65, -93, 13, 0, -6, 58, 124, 100, -54, -89, -61, -56, 22, -87, 63, 38, 100, -57, 36, 52, 47, -105,\n 43, 56, -124, -4, 73, -128, -86, 27, 81, 123, -91, 103, 17, 38, -62, -116, -56, -88, -100, 24, -47, -60, 72, 20, 105,\n 70, 1, -63, 67, 68, -61, -58, -2, 36, -116, 43, -68, 84, -84, 109, -68, -52, -67, 20, 27, -62, 73, 75, 17, -111,\n 60, -84, -4, 76, 47, 76, -85, -61, -76, -113, -127, -109, -90, -15, -6, 61, -32, 83, -97, 30, -92, 58, -114, 99, 27,\n -111, 4, 70, -103, -116, -51, -81, 113, -87, 99, 116, -96, 43, -124, 19, 121, 73, 30, -36, 20, -80, -126, -103, 18, 110,\n -117, 19, -82, -112, -73, -33, 108, 31, -43, 76, 20, -20, 36, -50, -27, -111, 28, -16, -100, -52, -81, 124, 61, 109, 4,\n -114, -37, -100, 15, -41, -13, -52, -15, -87, -51, 41, -103, 78, 50, -13, 38, 47, 26, -55, -23, -79, -80, 50, 59, -61,\n -92, -72, -49, -43, -20, 70, -62, 43, -49, 101, -6, -56, -13, 36, 68, 96, 107, -78, -30, 88, 62, 7, -22, 62, -8,\n -100, 72, -6, 72, 17, 122, -84, -81, -59, 100, -52, 3, -111, 68, -115, 107, 61, -128, -124, 58, -55, -44, -82, -86, 84,\n -93, 24, 27, 80, -84, 43, -55, 122, -31, -114, 79, 75, 80, -22, -84, 67, -30, 26, -49, -25, 121, -48, 26, 26, 78,\n 15, -13, 41, -83, -108, 62, -76, 12, 67, -109, -93, -85, 111, 44, 70, -79, 50, -53, 25, 117, 74, 9, 18, -47, -8,\n 60, -106, -116, -101, 37, 20, 13, -48, 78, 43, 81, -108, 122, -55, 61, 44, -94, 11, 109, 59, 75, -4, 81, 101, 26,\n 80, 2, -11, -53, -74, -44, -47, -3, -46, 16, -29, -116, -2, -63, 14, 109, -63, 78, 123, 63, -6, 11, -46, 25, 108,\n 55, -106, -95, -58, 42, 53, -109, 38, -3, -100, -12, 76, -70, 79, 83, 82, 40, -75, 31, -54, -23, 41, -38, -52, 26,\n -56, -100, 75, 44, -91, -53, 27, 36, 79, 61, 36, 67, 90, -71, -47, -38, 58, 72, 3, -3, -119, 30, 27, -45, 51,\n 21, 74, -38, -111, -89, -108, -116, -58, -18, -68, -69, 84, -20, -49, -82, 76, -50, 56, 77, 59, 51, -107, -103, -31, -61,\n 15, -84, -84, 36, 8, 89, -44, 62, 93, -60, -103, 4, -56, 112, -12, -100, 114, -116, 40, -52, 49, -44, 67, 69, -44,\n 24, 109, 35, 73, -27, 20, -43, 11, 83, -85, -4, 75, 0, -103, -44, 83, 67, 63, 43, -38, 39, 24, 58, -50, -51,\n 116, 78, 78, 53, 60, 79, -75, -72, -55, 12, 85, 51, -38, 84, 59, -35, 77, 83, -27, 73, 84, 45, 76, -80, 68,\n 76, 57, -29, -45, 70, 33, 36, -33, -48, -97, 116, -103, 83, -57, -29, -77, -37, -85, -90, 47, 21, -98, -25, 104, 63,\n -50, -124, -86, 94, -115, -68, 55, -126, 28, -83, -100, 39, 97, -51, -105, -125, -20, 25, -90, -77, 46, 33, 91, 56, -73,\n -95, 67, -49, 83, 69, -52, -124, -95, 75, 108, 86, 78, 10, -53, 105, -51, -69, 106, 37, 48, -72, 121, -103, 108, 5,\n -100, 109, -51, -70, -112, 18, 67, 112, 45, -73, -14, -101, -46, -72, -102, -100, -117, -2, 58, -41, 92, 109, 18, -26, 92,\n 87, -107, 107, 87, -89, 115, 28, 105, 12, -59, 60, -70, -50, -71, 68, -72, 74, 44, 88, 39, 116, 88, -13, -116, 70,\n -62, -126, -61, 32, 68, 69, -127, -91, -42, 86, -76, 33, 122, 28, 75, -64, 11, -49, -70, -6, 83, -55, -14, 70, -101,\n 76, -82, -26, -93, 88, 49, -30, -66, -117, -123, -63, -116, 37, 37, -56, 36, -43, 124, 90, 41, -3, -28, 64, -115, -108,\n -56, 36, -78, 45, -109, -27, -114, 74, 75, 89, -93, -93, 82, 5, 116, -75, 107, 109, -70, -88, -13, 82, 90, 29, 90,\n 91, -115, 71, -117, -55, 48, -100, -35, 62, -99, 29, -40, -22, 19, -51, 56, 114, 51, -68, -71, -87, -101, 3, -83, 116,\n -5, -44, -66, -116, 75, 97, -31, 88, 27, 4, -66, -50, 88, 90, -104, -5, 43, 82, 60, 61, -76, 43, -41, -105, -107,\n -96, 11, 52, -47, 115, -13, 68, -78, 117, -94, -64, -68, 84, -83, 19, 65, 81, -27, 85, -81, -107, 90, 10, 125, -73,\n 101, 81, -75, -94, -83, -106, -123, 124, -64, 66, -12, 51, -75, 93, 83, 10, -102, 24, 15, 37, -100, 23, 13, 44, 59,\n -20, -52, -68, -99, -37, 107, 113, 85, -6, -78, -64, -78, -28, 40, 19, 74, -44, -76, 117, -47, 110, -94, 89, 114, 41,\n 84, 104, 90, -81, 50, 84, -36, -77, 27, 90, 119, -71, -100, -89, 58, 88, -76, -83, -43, -88, 122, -46, -2, -39, 115,\n 23, 88, -115, 56, -100, 99, 42, -50, -51, 60, 56, 69, -57, -34, 115, 52, -47, -19, -37, 75, -13, 43, -103, 75, -36,\n 124, -79, 92, 98, -13, 19, -83, 45, -48, -42, 29, -89, -69, -123, -35, 3, -108, -38, -58, 77, 82, -7, 66, 29, -36,\n 29, -42, -120, -75, -70, 76, -20, 93, -21, -124, -96, -33, 77, 88, 40, 42, -54, 35, -5, -109, -28, 5, -45, -30, 61,\n 51, 70, 100, -80, -21, 85, 94, -27, 124, 54, 83, -46, -89, 112, 76, -98, 91, -117, -34, 10, -44, -94, -39, -67, -107,\n 82, -119, 87, -84, -95, 94, 89, 101, -97, -92, 18, 82, -90, -24, 94, -17, -3, -34, 76, 17, 43, 60, 5, 88, -84,\n 99, 95, -13, 69, -109, -94, 28, -75, 80, 25, -37, 93, 101, 37, 40, 27, 84, -87, -30, -106, -104, 93, -37, -107, 92,\n -34, -91, 89, 95, -98, -93, -40, -22, -20, -33, 69, -52, -111, -47, 28, -35, 17, 19, 78, 5, 102, 91, -125, 77, 96,\n -122, -7, -71, 119, 124, 92, -56, 101, -32, 72, 3, 76, -71, -109, -46, -128, -107, 96, 76, 77, -42, -111, -46, -85, -114,\n 36, -32, -102, -93, -87, 2, -71, 59, -35, 117, -35, -120, 21, -32, -57, -117, 18, -118, -23, -52, -109, -125, -116, 25, -93,\n 95, 20, -74, -102, -47, -38, 26, -61, 36, 89, 25, -42, 37, -82, 4, -36, -107, -101, 97, 61, -46, -114, -53, 117, 94,\n -91, 43, -2, 41, -104, -67, 84, -61, -8, -31, -113, -95, 93, 96, -75, 29, 31, -10, -93, 115, 82, 51, 89, -67, -39,\n 109, 83, -30, -46, 68, -111, -65, 68, -63, -69, 89, -30, -103, 125, 78, 16, -91, 98, 121, -19, 84, 36, -75, 28, -2,\n -83, -55, 15, -36, -68, -51, -53, -30, 58, -51, 96, -55, 83, -49, -30, 35, 19, 49, 54, -64, 28, 54, 73, 53, -58,\n 94, -26, 107, 88, 87, -46, -32, -62, -77, 68, 124, 27, -59, -17, -83, -40, -30, 123, -61, 65, 1, -29, -46, 124, -29,\n 63, -66, 60, -42, 92, 34, 41, 118, 86, -2, -109, -75, 29, 76, 50, 47, -122, -50, -63, -11, -74, 27, 36, -76, -2,\n -94, 99, -50, 93, -42, 45, -126, 100, 109, -43, -75, 67, -82, 56, -124, 101, 84, 18, 108, 83, -44, -107, 26, 36, -114,\n 100, -65, 60, -46, -33, 17, 101, -128, -126, -40, 77, -93, 60, -24, 26, 98, -63, -60, -47, 67, 117, -71, 127, -107, -27,\n -27, -108, -45, 82, 78, -82, -90, 114, -93, -42, 51, -59, 18, -86, -28, 32, -119, 85, 30, -75, -27, -2, -75, 66, 108,\n -126, 102, -112, 124, 90, 102, -61, -60, 76, 86, 80, 107, 13, 85, 3, 94, 101, 97, 54, 90, 24, -67, 32, 106, -82,\n -26, 74, -77, 96, 21, -106, -57, -119, 52, 70, -28, 73, -61, -41, -4, -26, 58, -114, 99, 113, 38, -30, 122, -20, 102,\n 108, -34, -60, 116, -74, 62, 102, -2, -18, 34, 70, 125, -78, 47, 114, 103, 93, 113, 95, 74, -22, -41, -104, 100, -29,\n 115, 6, -48, 123, 94, -74, 20, 93, -116, -84, -19, 86, 127, -66, 20, -128, 30, -93, 113, 38, 103, -1, -28, 60, -28,\n -37, 89, 0, -52, 95, -42, -19, -94, -56, 65, -39, 16, 109, -24, 42, -42, 84, -120, -82, 89, 74, 4, 42, -32, 28,\n 89, 106, 77, -95, 22, 94, 62, -14, -39, 100, -113, -50, 24, -45, 107, 100, 55, 38, -28, 11, 29, 14, 102, -117, 104,\n -74, 101, -24, -67, -127, -65, -106, -58, 94, -113, 82, -72, -104, -106, -23, -119, 110, 99, 21, 69, 103, 113, -60, -55, 32,\n 73, -58, -99, -10, 95, 23, 101, -36, 125, -79, -23, 91, -98, -23, 2, 2, -44, -75, 92, 84, -116, 78, -22, 98, -52,\n -114, -59, 50, -25, 66, 113, -22, -89, 102, -72, 8, -117, -22, -88, -10, -26, 81, -74, -22, -117, -23, -46, 79, 5, -81,\n 13, -36, 41, 55, 44, 92, 69, -39, 39, -114, -18, -45, 124, -58, 13, -78, -10, 23, 82, -98, 58, 120, -31, 106, -83,\n -15, 33, 35, -126, 74, -121, -44, -111, -117, -75, 88, -112, -61, -21, -99, 46, -62, 122, 54, 46, -23, -99, -83, 76, -51,\n -49, -34, -20, 26, -63, 14, 92, -25, 104, 56, 116, -99, -21, -36, 101, 69, -7, -83, 44, -25, 91, -59, 64, -94, 37,\n -7, 104, 103, -103, -55, -57, -78, 74, 62, -79, -106, 108, -2, -105, 14, 106, -69, -98, -74, -53, 102, -84, 51, -86, -65,\n -20, 52, -23, 58, 105, -20, -20, 81, -25, -49, 114, -19, -122, -66, -53, -32, -78, -20, -61, -90, -20, -1, 90, -106, 57,\n 9, -19, 35, 52, -24, -73, 22, 109, -121, 38, 109, -83, -66, -82, -55, 67, 78, -84, -10, 78, 71, -82, 15, -39, 102,\n 83, -82, 27, 97, -22, 91, 110, 119, 62, 99, 98, -26, -109, -37, -58, 109, -104, 116, 27, 16, -98, 31, -24, -58, -103,\n -14, -19, -51, 26, 11, 76, -32, -42, 91, -98, -94, 101, -30, 118, -31, -111, 110, -68, 31, -78, -52, -92, 13, 102, -97,\n -36, 97, -40, -82, 60, -118, 11, -17, 127, 14, 107, -21, -114, -104, -76, 54, -18, 79, -106, 51, 41, 68, -29, -34, 118,\n 30, -110, 99, 60, -10, -106, 111, 35, -111, 86, -62, -2, -110, -19, -58, -62, 118, -60, -48, 31, 92, -34, -110, 57, -31,\n -2, 38, -24, -3, -51, 110, 1, 127, 20, -88, 68, 109, -114, -87, -18, -6, -50, -41, -90, 97, -32, -85, 29, -40, 6,\n -33, -76, -83, 13, -16, 9, 7, -25, -31, -10, -36, -12, -71, 111, -4, 22, -22, 118, 114, -16, -14, 58, -16, 110, 105,\n 25, 53, 11, 65, 23, -9, -25, -60, -2, -43, 19, -57, 44, -52, 69, -17, -110, -90, -38, 68, -42, 109, -90, 117, 92,\n -101, -14, -15, 17, -9, 22, -71, -76, -15, -59, 59, 95, 105, 26, 91, 37, 71, -2, 86, 59, 21, -14, 35, 68, -68,\n -43, -106, -16, 33, 15, 110, 127, -93, 110, 20, -9, -68, -77, -78, 97, -72, -35, -17, 68, 110, -17, -93, 49, -24, 41,\n -9, 94, 60, -77, -14, 43, 23, 100, 12, 70, -42, 28, 102, -19, 84, -67, -21, 48, -1, -105, -9, 61, -21, -31, 45,\n -13, 49, -92, 109, -2, -98, 31, 59, -26, 69, 54, 111, -13, 127, -122, -16, -58, 34, 115, 12, 103, 114, 43, -58, -63,\n 88, -68, 115, 60, -65, -21, 25, -113, -18, 78, 37, 36, 63, -1, 115, 26, -4, 91, 23, 82, -17, 96, -69, -26, -83,\n 62, 116, 97, 102, 106, 126, -69, 54, 17, 55, 87, 118, -108, -26, 71, -105, -14, 40, -3, -40, 60, -41, 115, 71, -79,\n 116, 57, -21, 50, 63, 13, -22, -15, -18, -12, -28, 30, 71, 76, 47, 111, 81, 7, 28, -38, 5, 96, -11, 61, -11,\n -23, 30, 79, -106, 6, -16, 76, 119, 52, -81, 122, -11, -6, 109, 81, -30, 60, 52, 74, 87, -68, 112, -114, -36, 46,\n -105, -15, 59, 12, -94, 96, 87, -29, 90, -28, -50, 55, 69, 110, 87, 79, -30, -1, -28, -103, 104, -37, 109, 6, -105,\n 67, -17, -2, 105, 94, -9, -56, 98, -87, -62, 35, 38, -67, 100, 26, -17, 102, -30, 87, 106, 47, -10, -48, -107, -93,\n -72, -50, 118, 45, -66, 98, 42, -110, -89, 11, -82, 106, 70, 55, -15, 66, 14, -44, 52, -116, 108, -120, -2, 11, 104,\n 116, 39, -15, -66, 5, 119, -54, -48, -11, 112, 110, -60, 85, 103, 94, -34, -18, -40, 82, 74, 118, -13, 117, -27, -75,\n 43, 104, 48, 95, -32, 126, -81, 112, 66, -89, 50, -126, -65, 106, 95, 122, -8, -33, -3, -32, -38, -122, -13, 58, 23,\n -8, 56, 126, 104, -58, 110, -8, 47, -98, -26, 123, -65, -52, 106, -124, -25, -128, -57, 90, -105, 12, 90, 109, -30, -8,\n 16, -90, 39, -119, 87, 92, 95, 15, 98, 120, 31, -32, -50, -43, 113, 120, -65, -11, -44, 53, 101, 72, -12, -8, -113,\n 111, 102, 8, 63, 65, -25, 6, -38, -127, -66, 100, -29, 49, 62, -25, 85, 101, -100, -49, 121, -78, -36, 121, -97, 61,\n 35, 112, -13, -54, 64, 87, -20, 60, 61, -10, -94, 50, 122, -66, 44, 113, 68, 43, -60, -107, 79, 119, 45, 105, -7,\n -55, -70, 122, -113, 105, 118, 74, -106, -6, -93, 111, 122, -98, 63, -61, 125, -117, 17, 80, 55, 123, -101, -105, -61, 86,\n -97, 48, -80, -49, 105, -79, 95, -31, 119, -11, 116, -30, 21, -7, -96, -9, -20, -106, 26, -7, -74, -105, -74, -73, 39,\n 48, 39, 39, 122, 103, -74, -25, 56, 92, 123, -74, -49, -5, 64, 68, 122, 64, -89, -9, -104, -73, -8, -124, -49, 63,\n -63, -33, 106, -62, 47, -4, -67, -9, 84, -82, -41, 68, -125, -97, 50, -69, -113, -6, -57, -73, -47, 55, -105, 124, -22,\n 52, -37, -2, 27, 34, 119, -17, 107, 124, -45, -50, -4, -101, -116, 124, -105, -60, -13, -77, -81, 71, -48, 15, 125, -52,\n 39, -3, -89, -82, -38, -98, 47, 123, -11, -93, 121, 45, 20, 125, 3, 119, -3, 89, -36, -4, -116, 7, -51, 1, 68,\n 90, -120, -76, -3, 11, -57, -3, -68, -58, -66, -54, 70, 124, 68, 22, -91, 126, 38, 76, -32, 95, 116, -31, -81, 45,\n -35, 71, 94, -71, -105, -3, 34, -59, -51, -27, 55, -11, -26, 23, -45, -92, -124, 116, -34, 23, -89, -23, -84, -2, -22,\n -67, 126, -25, 34, -2, -33, -101, 124, 8, -27, -2, -18, 31, 50, 73, 127, 118, -16, -65, 37, 67, 78, -17, 72, 55,\n -1, -13, -105, -79, 111, 75, -3, 35, 95, 127, -100, 18, 127, -125, 122, 127, 65, 19, -47, -128, -53, -31, -54, 7, -120,\n 0, 2, 7, 18, 44, 104, 112, -96, 0, 0, 10, 23, 50, 108, -24, -16, 33, -60, -120, 18, 39, 82, -84, 104, -15,\n 34, -58, -116, 26, 55, 114, -20, -24, -15, 35, -56, -123, 2, 4, -114, 60, 104, -14, 100, -128, -110, 7, 71, 38, 12,\n -23, -14, 37, -52, -104, 27, 85, -94, 60, -39, 82, 38, -50, -100, 58, 119, -30, -92, 89, -45, -96, -128, -101, 24, 125,\n 6, -3, 105, 20, 40, -49, -92, 74, -105, 50, 109, -22, 84, 105, 73, -97, 71, -127, -94, 12, -6, -12, 42, -42, -105,\n 82, -89, 10, -51, -22, -11, 43, -2, 88, -122, 91, 127, 90, -19, 72, -77, -24, -44, -93, 93, -61, -78, 109, -21, -10,\n -19, 85, -107, 99, -45, -90, -84, 10, -9, 46, -40, -71, 85, -41, -30, -19, -21, 87, -93, -34, -96, -126, 7, -125, -108,\n 11, 64, 47, 93, -110, 127, 23, 51, 110, -36, 88, 110, -30, -107, 104, 11, -14, 117, 108, 57, 36, 98, -54, -107, 47,\n 115, -10, 59, -103, -14, -50, -88, -103, 19, 111, -18, 108, -6, 52, 106, -114, 103, 35, 35, 61, 44, 88, 113, -22, -40,\n 67, 7, -45, -82, 93, 90, 54, 110, -84, -97, -53, -22, 20, 124, -72, 46, -21, -107, 95, 121, -25, 46, 110, -4, 35,\n -28, -32, -96, -59, -34, 62, -18, -4, 57, 116, -73, 69, -101, 107, 117, 61, 90, 109, 88, -33, -47, -73, 115, -1, -115,\n 80, -7, -14, -18, -30, -57, -109, 127, 74, 61, -26, -21, -49, -84, -49, -13, -116, 90, -2, 125, -22, -43, -32, 9, -78,\n -121, 111, -1, 62, -2, -20, 9, -81, -37, -51, -98, 50, 63, -128, -98, 81, 54, 31, 125, 1, 26, 120, 32, -126, -70,\n -127, 87, 95, 123, 12, 38, -8, 32, 122, -12, 17, 24, 30, -124, 21, 90, 120, -31, 80, 11, 74, -73, 31, -122, 29,\n -54, 68, -44, -124, 5, 122, 56, 34, -119, 24, -14, -41, 90, 91, -124, -107, -72, -30, 76, 3, -122, -8, 31, -117, 49,\n -54, 120, -33, -119, 20, -78, 53, -35, -116, 57, 70, 4, -2, 98, -120, 14, -22, -8, 35, -112, -114, -115, 53, -105, 118,\n -46, -111, 68, 91, -112, 51, -14, 56, -95, -113, 73, 58, -7, 100, -118, 72, -99, 85, 36, 92, 91, 53, 9, 37, -115,\n 18, 46, -88, 34, -106, 93, 122, -23, 25, 90, 55, -79, 116, 37, 83, 86, 126, 57, -94, 124, 116, 33, 121, 38, -101,\n 109, -34, 69, -100, 107, -116, -103, -23, -90, -123, 105, -90, 69, 38, -99, 121, -22, 25, -38, 98, 86, -30, -71, -25, 113,\n 75, -34, 9, 40, -95, -123, -42, -87, -103, -95, 7, 10, -54, 85, -94, -115, 58, -118, -33, 89, -113, 2, -72, 40, 118,\n -110, 90, 122, 41, 116, -122, 97, 106, 31, -91, -110, -123, -71, 41, -88, -95, 50, 39, -26, -97, -24, 53, -28, -98, -88,\n -28, 117, -118, 34, -107, -87, -70, -22, -88, 104, 44, 25, -39, 82, 122, -81, -114, 87, 91, -91, -74, -22, 42, -23, -100,\n -2, -91, 52, 38, -100, -69, 58, 71, 106, -91, -91, 10, 123, -84, -116, 82, 25, 91, 24, -118, -56, 102, -86, 16, 75,\n -40, 5, -21, 44, -75, 94, 42, 123, 35, 125, -53, 86, 91, 37, -83, -64, -111, -43, -22, -74, -31, 62, 25, -87, -81,\n -80, -119, 27, 104, -73, -4, 77, 123, 46, -69, 57, 106, 58, 28, -71, -19, 26, -105, 110, -82, -14, -38, -85, 35, -72,\n 113, 53, 123, 47, 110, -55, -43, -92, 45, -65, 1, -17, -87, -34, -111, 2, -9, -2, -5, 29, 89, 6, 43, -84, -85,\n -97, 11, -53, -26, -81, 77, 14, 75, 28, -22, -112, 19, -57, 22, 109, -62, 22, 107, 12, -85, 73, 0, 111, -36, 84,\n 84, -33, 126, 60, 50, -95, 21, -109, 124, 89, -56, 54, 121, 124, 50, -53, -121, 10, -41, -14, 95, 86, 65, 108, 35,\n -52, 53, -113, -37, -80, -51, 111, 30, -119, 112, -57, 57, -5, 124, -77, 104, 63, -65, -7, 26, -49, 61, 11, 125, -12,\n -113, -21, 34, -99, -105, -117, -3, 45, -3, 52, -44, -37, -38, -23, 116, -44, 85, 91, -3, 106, -104, 70, -83, 124, 53,\n -41, 93, 39, 61, -104, -42, 94, -117, 61, -74, -95, -109, -115, -74, 53, -39, 105, -85, -99, -96, -39, 25, -81, -3, 54,\n -36, 73, -18, -25, 109, -60, 113, -37, 125, 119, -78, -45, -3, -117, 55, -33, 125, -93, 73, 55, 85, 104, -5, 61, 56,\n -31, -90, 17, -35, -79, -32, -123, 43, -66, -72, -100, -121, 35, -60, 56, -28, -111, -33, 90, -76, -71, -110, 91, 126, 121,\n 110, -47, 18, 53, -45, -102, -104, 123, -2, -71, 110, 41, 87, 126, -111, -52, -7, -126, 126, 58, -22, -24, 77, 71, 52,\n -125, -76, 38, -98, 58, -20, -96, 59, -2, -85, -46, -79, -37, 126, 59, 84, -23, 117, -114, 59, -17, -67, -73, 71, -69,\n 92, -81, -5, 62, 124, -22, -91, 3, -1, 43, -15, -55, 43, 111, 86, -23, -34, -115, -71, 60, -12, -47, 59, 83, -124,\n -85, -73, -75, 75, 127, 61, -15, -70, 3, 110, 61, -10, -35, -13, -98, 30, 66, 92, 122, 63, -66, -14, -69, -109, 127,\n 126, -10, -74, -95, -65, 126, -7, -36, -77, -1, 62, -4, -15, -53, 63, 63, -3, -11, -37, 127, 63, -2, -7, -21, -65,\n 63, -1, -3, -81, 24, 16, 0, 0, 59\n };\n}", "public byte[] toByteArray() {\n\n int rowSize = data.length;\n int colSize = data[0].length;\n byte [] byteArr = new byte[rowSize * colSize + 24]; // 24 for the entry, exit, size of row, size of col\n int byteCounter = 24;\n\n //Converts the RowSize, ColSize, Start, Exit of the maze into four bytes data each.\n byte [] RowSizeBytes = ByteBuffer.allocate(4).putInt(rowSize).array();\n byte [] ColSizeBytes = ByteBuffer.allocate(4).putInt(colSize).array();\n\n byte [] StartRowBytes = ByteBuffer.allocate(4).putInt(this.entry.getRowIndex()).array();\n byte [] StartColBytes = ByteBuffer.allocate(4).putInt(this.entry.getColumnIndex()).array();\n\n byte [] EndRowBytes = ByteBuffer.allocate(4).putInt(this.exit.getRowIndex()).array();\n byte [] EndColBytes = ByteBuffer.allocate(4).putInt(this.exit.getColumnIndex()).array();\n\n //Copies the data to the main byte array.\n System.arraycopy(RowSizeBytes, 0, byteArr, 0, 4);\n System.arraycopy(ColSizeBytes, 0, byteArr, 4, 4);\n System.arraycopy(StartRowBytes, 0, byteArr, 8, 4);\n System.arraycopy(StartColBytes, 0, byteArr, 12, 4);\n System.arraycopy(EndRowBytes, 0, byteArr, 16, 4);\n System.arraycopy(EndColBytes, 0, byteArr, 20, 4);\n\n //Copies the int maze to the byte array\n for (int i = 0; i < data.length; i++)\n {\n for (int j = 0; j < data[0].length; j++)\n {\n byteArr[byteCounter] = (byte) data[i][j];\n byteCounter++;\n }\n }\n\n return byteArr;\n }", "public byte[] toByteArray(){\n int bound=numOfBits*2/*The Start Position*/+numOfBits*2/*The Goal Position*/+numOfBits/*Num of Rows*/+numOfBits/*Num of Columns*/+(maze.length*maze[0].length);\n byte[] arrayByte=new byte[bound];\n\n fillArrayByte(arrayByte,0,toBinary(start.getRowIndex()));\n fillArrayByte(arrayByte,numOfBits,toBinary(start.getColumnIndex()));\n fillArrayByte(arrayByte,numOfBits*2,toBinary(goal.getRowIndex()));\n fillArrayByte(arrayByte,numOfBits*3,toBinary(goal.getColumnIndex()));\n fillArrayByte(arrayByte,numOfBits*4,toBinary(maze.length));\n fillArrayByte(arrayByte,numOfBits*5,toBinary(maze[0].length));\n int counter=numOfBits*6;\n for(int i=0;i<maze.length;i++){\n for(int j=0;j<maze[0].length;j++){\n arrayByte[counter]=(byte)maze[i][j];\n counter++;\n }\n }\n return arrayByte;\n\n\n }", "private void calculateMapSize() {\n calculateMapSize(true);\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "public static byte[] convertMapToArray(HashMap<Integer, String> dictionary){\n byte[] out = new byte[dictionary.size()];\n for (Integer b: dictionary.keySet()){\n out[Integer.parseUnsignedInt(dictionary.get(b), 2)] = (byte) (b & 0xff);\n }\n return out;\n }", "@Override\r\n public byte[] pack(Map<String, String> value) {\n return null;\r\n }", "public byte[] toByteArray()\r\n\t{\r\n\t\tbyte[] b = new byte[(this.maze.length*this.maze[0].length*this.maze[0][0].length)+9];\r\n\t\tb[0] = (byte) this.maze.length;\r\n\t\tb[1] = (byte) this.maze[0].length;\r\n\t\tb[2] = (byte) this.maze[0][0].length;\r\n\t\tb[3] = (byte) this.getStartPosition().getY();\r\n\t\tb[4] = (byte) this.getStartPosition().getZ();\r\n\t\tb[5] = (byte) this.getStartPosition().getX();\r\n\t\tb[6] = (byte) this.getGoalPosition().getY();\r\n\t\tb[7] = (byte) this.getGoalPosition().getZ();\r\n\t\tb[8] = (byte) this.getGoalPosition().getX();\r\n\t\tint counter = 9;\r\n\t\tfor(int i = 0;i<maze.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0;j<maze[0].length;j++)\r\n\t\t\t{\r\n\t\t\t\tfor(int k = 0;k<maze[0][0].length;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tb[counter] = (byte) this.maze[i][j][k];\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn b;\r\n\t\t\r\n\t}", "private void fillMap() {\n\t\tObject tile = new Object();\n\t\tfor(int x = 0; x < map.length; x++) {\n\t\t\tfor(int y = 0; y < map.length; y++) {\n\t\t\t\tmap[x][y] = tile;\n\t\t\t}\n\t\t}\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public byte[] getByteArray(){\r\n\r\n byte[] b = new byte[0x54];\r\n\r\n System.arraycopy(PID_pointer, 0, b, 0, 4);\r\n System.arraycopy(MPID_pointer, 0, b, 4, 4);\r\n System.arraycopy(Null_pointer, 0, b, 8, 4);\r\n System.arraycopy(Portrait_pointer, 0, b, 12, 4);\r\n System.arraycopy(Class_pointer, 0, b, 16, 4);\r\n System.arraycopy(Affiliation_pointer, 0, b, 20, 4);\r\n System.arraycopy(Weaponlevel_pointer, 0, b, 24, 4);\r\n System.arraycopy(Skill1_pointer, 0, b, 28, 4);\r\n System.arraycopy(Skill2_pointer, 0, b, 32, 4);\r\n System.arraycopy(Skill3_pointer, 0, b, 36, 4);\r\n System.arraycopy(Animation1_pointer, 0, b, 40, 4);\r\n System.arraycopy(Animation2_pointer, 0, b, 44, 4);\r\n b[48] = unknownbyte1;\r\n b[49] = unknownbyte2;\r\n b[50] = unknownbyte3;\r\n b[51] = unknownbyte4;\r\n b[52] = unknownbyte5;\r\n b[53] = unknownbyte6;\r\n b[54] = level;\r\n b[55] = build;\r\n b[56] = weight;\r\n System.arraycopy(bases, 0, b, 57, 8);\r\n System.arraycopy(growths, 0, b, 65, 8);\r\n System.arraycopy(supportgrowth, 0, b, 73, 8);\r\n b[81] = unknownbyte9;\r\n b[82] = unknownbyte10;\r\n b[83] = unknownbyte11;\r\n\r\n return b;\r\n }", "private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }", "public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }", "@Override\n public void putAll(List<KeyValue<Bytes, byte[]>> entries) {\n entries.forEach(bytesKeyValue -> {\n\n this.put(bytesKeyValue.key, bytesKeyValue.value);\n });\n }", "@Override\n\tpublic void updateMemory(Map map) {\n\t\tif(!memory.used)\n\t\t\treset(map);\n\t\tspiral();\n\t}", "public int getMapSize() {\n return mapSize;\n }", "public void writeBig (byte[] b) {\n if (b.length<12)\n try {\n throw new IOException();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Map<String,Integer> codes = new LinkedHashMap<>();\n ArrayList<Pair<Integer,Integer>> array = new ArrayList<>();\n int arrIndex=0;\n array.add(arrIndex++,new Pair<>(0,0));\n int k=12;\n codes.put(String.valueOf(b[k]),arrIndex);\n array.add(arrIndex++,new Pair((int)b[k++],0));\n\n for (; k<b.length; k++){\n int pointer=0;\n String current = String.valueOf(b[k]);\n while (codes.containsKey(current) && k<b.length-1){\n pointer=codes.get(current);\n k++;\n current+=String.valueOf(b[k]);\n }\n if (codes.containsKey(current) && k==b.length-1) {\n array.add(arrIndex, new Pair(2, codes.get(current)));\n codes.put(current,arrIndex);\n }\n else{\n array.add(arrIndex,new Pair((int)b[k],pointer));\n codes.put(current,arrIndex++);\n }\n }\n\n //Write compressed array//\n for (int i=0; i< 12 ; i++) //maze dimensions + start/goal\n write(b[i]);\n int pointerSize= array.size()>128 ? (array.size()>32768 ? 3 : 2) : 1; // how many bytes to represent the pointer\n write(pointerSize);\n// System.out.println(\"DEBUG : array size:\" + array.size()+\" unit size: \"+(pointerSize+1)); //DEBUGGING\n for (Pair<Integer, Integer> Pair : array) { //send array\n byte cell = (byte) (Pair.getKey()<<7);\n cell = (byte) (cell | (Pair.getValue()>>(8*(pointerSize-1))));\n write(cell);\n for (int j = pointerSize - 2; j >= 0; j--) {\n cell=(byte) (Pair.getValue() >> 8 * j);\n write(cell);\n }\n }\n write(array.get(array.size()-1).getKey()); //last cell key (0/1/2)\n //Finish writing compressed array//\n }", "private UInteger[] getHashValues() {\n int hashWindowSize = 48;\n UInteger[] hashValues = new UInteger[this.fileContent.length];\n int shiftAmount = this.getShiftAmount(hashWindowSize);\n int i = 0;\n\n int[] lookupTable =\n {0x5e3f7c48, 0x796a0d2b, 0xbecd4e32, 0x6f16159c, 0x687312bc, 0x12a6f30a, 0x8fca2662,\n 0x79b83d14, 0x3fab3f30, 0x984d6ca2, 0x4df5fe6c, 0x4acd3196, 0x6245ad21,\n 0x3a15e5ba, 0x90db6499, 0x05aacb6b, 0x791cf724, 0x504cd910, 0x98093570,\n 0x090392df, 0xf193e5b8, 0x42023c5b, 0x80a95c6a, 0x11e676be, 0xc70f2117,\n 0xeed4587f, 0x6479e9bd, 0x1b0c427c, 0x410486ba, 0x30f5b837, 0xf957d307,\n 0x1535f121, 0xabe45e90, 0x7a1ab8f0, 0x1c6887e4, 0x4170b7ba, 0x8b491bed,\n 0x5c920e73, 0x1b1ed791, 0x7a0ed482, 0xcce86619, 0x45dc7290, 0x57e71362,\n 0x2e24f01c, 0x0a0637f3, 0x0e8c5565, 0x15944012, 0x34f7eeea, 0xbc628141,\n 0x1e200874, 0xe9244379, 0x3e63aeca, 0x7a3b3cce, 0x73f8a245, 0xd734e215,\n 0x834fa434, 0xf96a0904, 0xfb39a424, 0x0bfa963a, 0x9b236ee2, 0xa2131005,\n 0x3eb70acf, 0x2907bcd8, 0x3f685f3a, 0x3765fd37, 0x1c1c34d2, 0x03a95179,\n 0x024be6c3, 0x06128960, 0x844e7490, 0xe2b371a3, 0x3382909c, 0x3d519a77,\n 0x90971ec9, 0x6ea745e5, 0x490b3a5c, 0x7f3916f7, 0xbc150351, 0x241a7ba0,\n 0xec93c2bb, 0x6c7083aa, 0xf3937751, 0xe6aa1df1, 0x129fc001, 0xb90709b9,\n 0x7e59a4fc, 0x4509e58a, 0x8a93ed43, 0x6934ce62, 0x8ec6af1a, 0xf36581a9,\n 0x53d01d93, 0xb34eef69, 0x08494a84, 0x0f6dff34, 0x74729aa3, 0x48b5475f,\n 0xb986dc84, 0xd0424c8d, 0xb72ad089, 0x0adbbdb8, 0x824fdbe8, 0x99ad1058,\n 0x98faec38, 0xe746242b, 0x2b7ee7fc, 0x2e151fa7, 0x6413270f, 0x68ed7239,\n 0x7729e2d3, 0x5697b3a5, 0x0b90a6c3, 0xdf7cefcf, 0xded46a48, 0x46956888,\n 0xb3bb6dc4, 0xe987578f, 0xf82e74b7, 0xc8eeeba4, 0xdd960ff9, 0x482ed28d,\n 0x4f343078, 0x563ab8a4, 0x3ec7aa0d, 0x2481d448, 0x5fe98704, 0x5aafc580,\n 0x841d81ec, 0xae7fe8fd, 0x6b31ccb6, 0x911ebdd4, 0x75f4703d, 0xe6855a0f,\n 0x6184b42e, 0x147a4a95, 0x39528e48, 0xe975b416, 0x3cba13d3, 0x1e23e544,\n 0xf7955286, 0xa5f96b7f, 0xaaa697aa, 0x29e794e3, 0x87628c09, 0xfeebf5f1,\n 0xf8b070cd, 0xe361b627, 0x8c7a8682, 0x69cab331, 0xca867ad1, 0xd0151a96,\n 0xfc19a6b9, 0x6d7439e7, 0x64cd62ac, 0x4a650747, 0x9ddbfa28, 0x337c8bed,\n 0xf12a6860, 0x3767ffd3, 0x13559ced, 0x71ac2011, 0xc11dc687, 0x260b7105,\n 0xc13bca0c, 0xcd0af893, 0x793b54e6, 0x89d27fc3, 0xc6bd1c88, 0xe3337313,\n 0x387bc671, 0x61280de4, 0x76941a36, 0xaa52a2b9, 0x6d7cb52c, 0x18ff4d70,\n 0x8987cf38, 0x306e47ed, 0xf7df8135, 0x18a8e024, 0xc9eb085f, 0xc1a7c769,\n 0xd5667a12, 0x9c8be93a, 0x028781b1, 0x6213dada, 0x07fef4f5, 0x5e6bf91d,\n 0x469ea798, 0xb9654a37, 0x1cb5e74e, 0x525d502d, 0xe805ec68, 0xdd8c4320,\n 0x7890848f, 0x61e59c8e, 0x1d99f9ef, 0x25b60b20, 0x2f198088, 0xe01b6926,\n 0xffa4917f, 0xb2fa0f22, 0xee8ac924, 0x18a1c5a7, 0xb76d8d7f, 0x88ad5e0d,\n 0x7b3fb12b, 0xc8a91add, 0x762a6f4e, 0x056fad31, 0xebecfab8, 0xea54cd17,\n 0x71f5af9f, 0xfaececa1, 0x08a52f4d, 0xbb5efebe, 0x5bcb04c2, 0xcb2530b0,\n 0x01bb862b, 0xbb5d54f0, 0x404deb4b, 0x038658bd, 0x09399005, 0xddd862c8,\n 0x8985776f, 0xcfcfd717, 0xbec756cb, 0x52aecc5a, 0x09ac3f62, 0x62c1c6fb,\n 0x76cc3221, 0xcde6d028, 0x844d9291, 0xc143eeac, 0x0ea5e772, 0x8855456e,\n 0xeb03a426, 0x3398475d, 0x73dc8107, 0x681605d0, 0xd18b6264, 0x934e43eb,\n 0x59e76d21, 0xd3ce2b77, 0x4ccfee1c, 0x2f4af76d, 0x8b12a309, 0x849bb415,\n 0xf45ad809, 0xc7bccae7, 0xac891c35, 0x59db2274, 0xbcd71393, 0x2c9b1705,\n 0xcb536a69, 0xb2800f00, 0x111313fc};\n\n while (i < this.fileContent.length) {\n UInteger hashValue = i == 0 ? uint(0) : hashValues[i - 1];\n int trailingEdgeData = i < hashWindowSize ? ubyte(0).intValue() :\n ubyte(this.fileContent[i - hashWindowSize]).intValue();\n int leadingEdgeData = ubyte(this.fileContent[i]).intValue();\n UInteger val = hashValue.xor(uint(lookupTable[trailingEdgeData]))\n .xor(uint(lookupTable[leadingEdgeData]));\n hashValues[i] =\n val.leftShift(2).inclusiveOr(val.rightShift(Integer.SIZE - shiftAmount));\n i++;\n }\n\n return hashValues;\n }", "public FloatByteMap(float[][] f) {\n _clips = new Clips(f);\n }", "private void calculateMaps() {\n\tsrcrows = new int[destHeight + 1];\n\tfor (int y = 0; y <= destHeight; y++) {\n\t srcrows[y] = (2 * y * srcHeight + srcHeight) / (2 * destHeight);\n\t}\n\tsrccols = new int[destWidth + 1];\n\tfor (int x = 0; x <= destWidth; x++) {\n\t srccols[x] = (2 * x * srcWidth + srcWidth) / (2 * destWidth);\n\t}\n\n float xscale = ( ( float ) srcWidth - 1 ) / ( ( float ) destWidth );\n float yscale = ( ( float ) srcHeight - 1 ) / ( ( float ) destHeight ) ;\n\n srcxlarr = new int[destWidth+1];\n srcxuarr = new int[destWidth+1];\n srcxarr = new int[destWidth+1];\n\n for (int x = 0 ; x <= destWidth;x++) {\n float tmp = x * xscale ;\n srcxlarr[x] = (int) Math.floor( tmp ) ;\n srcxuarr[x] = (int) Math.ceil( tmp ) ;\n srcxarr[x] = (int) ( ( tmp - srcxlarr[x] ) * 255f );\n }\n\n srcylarr = new int[destHeight+1];\n srcyuarr = new int[destHeight+1];\n srcyarr = new int[destHeight+1];\n\n for (int y = 0 ; y <= destHeight;y++) {\n float tmp = y * yscale ;\n srcylarr[y] = (int) Math.floor( tmp ) ;\n srcyuarr[y] = (int) Math.ceil( tmp ) ;\n srcyarr[y] = (int) ( ( tmp - srcylarr[y] ) * 255f );\n }\n\n /*\n System.out.println( \"srcrows\" );\n for (int i=0;i<srcrows.length;i++) {\n System.out.print( srcrows[i] + \" \" );\n }\n\n System.out.println( \"\\nsrccols\" );\n for (int i=0;i<srccols.length;i++) {\n System.out.print( srccols[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxlarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcxlarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcxuarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcylarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcylarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcyuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcyuarr[i] + \" \" );\n }\n */\n }", "public native void constituteImage(int width, int height, String map,\n\t\t\tbyte[] pixels) throws MagickException;", "@Override\n public void drawPixelMap(ImageData pixelMap, double x, double y) {\n graphicsEnvironmentImpl.putPixelMap(canvas, pixelMap, x, y);\n }", "public FloatByteMap(float[][][] f) {\n _clips = new Clips(f);\n }", "DirectMemoryBackingStore( final long aMaxMapSize )\n\t{\n\t\tmapSize = aMaxMapSize;\n\t\tstartingAddress = UnsafeAccess.UNSAFE.allocateMemory(aMaxMapSize);\n\t\tbuffer = new LongUnsafeBuffer(startingAddress, mapSize);\n\t}", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "@Override\n\t \tprotected int sizeOf(Object key, Object value) {\n\t\t\t\tBitmap bitmap = (Bitmap) value;\n\t return bitmap.getRowBytes() * bitmap.getHeight();\n\t \t}", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }", "void write(final DataOutputStream out) throws IOException {\n HFileProtos.FileInfoProto.Builder builder = HFileProtos.FileInfoProto.newBuilder();\n for (Map.Entry<byte[], byte[]> e : this.map.entrySet()) {\n HBaseProtos.BytesBytesPair.Builder bbpBuilder = HBaseProtos.BytesBytesPair.newBuilder();\n bbpBuilder.setFirst(ByteStringer.wrap(e.getKey()));\n bbpBuilder.setSecond(ByteStringer.wrap(e.getValue()));\n builder.addMapEntry(bbpBuilder.build());\n }\n out.write(ProtobufUtil.PB_MAGIC);\n builder.build().writeDelimitedTo(out);\n }", "void writeBytes(byte[] value);", "@Override\r\n protected void onDraw(Canvas canvas) {\r\n super.onDraw(canvas);\r\n try {\r\n int x = 0, y = 0;\r\n int width = ScreenWidth / MatrixWidth;//width its Screen width div to matrix width\r\n int hight = ScreenHeight / MatrixHeight;//height its Screen height div to matrix height\r\n canvas.drawARGB(255, 30, 30, 30);\r\n for (int i = 0; i < map.length; i++) {\r\n x = 0;\r\n for (int j = 0; j < map[i].length; j++, x += width) {\r\n if (i == 0 && j < 3) {\r\n Rect dst = new Rect(x, y, x + width, y + hight);//dest its rectangle that can draw on screen according to x,y\r\n canvas.drawBitmap(this.blockList.getBlock(1, i, j).getBlock(), this.blockList.getBlock(1, i, j).getSrc(), dst, null);\r\n }\r\n if (map[i][j] != '0') {\r\n int type = Integer.valueOf(String.valueOf(map[i][j]));//change type char to int\r\n Rect dst = new Rect(x, y, x + width, y + hight);//dest its rectangle that can draw on screen according to x,y\r\n canvas.drawBitmap(this.blockList.getBlock(type, i, j).getBlock(), this.blockList.getBlock(type, i, j).getSrc(), dst, null);\r\n }\r\n }\r\n y += hight;\r\n }\r\n FinishTheGame();\r\n }catch (NullPointerException e){\r\n\r\n }\r\n }", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "@Override\r\n public void write(byte[] b) throws IOException {\r\n int rows = (Byte.toUnsignedInt(b[0])*255) + Byte.toUnsignedInt(b[1]);\r\n int cols = (Byte.toUnsignedInt(b[2])*255) + Byte.toUnsignedInt(b[3]);\r\n int compressed_size = 12 + (((rows*cols)) / 8);\r\n if ((rows*cols) % 8 != 0)\r\n compressed_size++;\r\n\r\n byte[] to_return = new byte[compressed_size];\r\n System.arraycopy(b,0,to_return,0,12);\r\n String s1=\"\";\r\n int j=0;\r\n int index=12;\r\n //go through the body of the maze\r\n for(int i=12; i<b.length; i++){\r\n //reached end of chunk\r\n if(j==8){\r\n byte temp=(byte)Integer.parseInt(s1,2);\r\n to_return[index]=temp;\r\n index++;\r\n s1=Integer.toString(b[i]);\r\n j=1;\r\n if(i==b.length-1){\r\n //s1+=Integer.toString(b[i]);\r\n byte temp1=(byte)Integer.parseInt(s1,2);\r\n to_return[index]=temp1;\r\n }\r\n }\r\n else if(j != 8 && i==b.length-1){ //remaining in case doesn't divide in 7 completely\r\n s1+=Integer.toString(b[i]);\r\n byte temp=(byte)Integer.parseInt(s1,2); //turns from binary string to byte(0-127)\r\n to_return[index]=temp;\r\n }\r\n else{\r\n s1+=Integer.toString(b[i]);\r\n j++;\r\n }\r\n }\r\n try{\r\n if(this.out instanceof ObjectOutputStream){\r\n ObjectOutputStream o=(ObjectOutputStream)this.out;\r\n o.writeObject(to_return);\r\n }\r\n else {\r\n out.write(to_return);\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public ImageData createPixelMap(ImageData pixelMap) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, pixelMap);\n }", "public IntMap(int size){\r\n hashMask=size-1;\r\n indexMask=(size<<1)-1;\r\n data=new int[size<<1];\r\n }", "public byte[] bitmap();", "public Map(){\r\n map = new Square[0][0];\r\n }", "@Override\n public ImageData createPixelMap(double x, double y, int[] data) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, x, y, data);\n }", "@Override\n protected int mapSize() {\n return left.size()+right.size()-hidden.size();\n }", "public boolean put2BuffMap( byte[] rec){\n\t\t/**\n\t\t * update\n\t\t */\n\t\t\n\t\tKey key = new Key(rec);\n\t\t\n\t\tif(buffMap.containsKey(key)){\n\t\t\tint val = buffMap.get(key)+1;\n\t\t\tbuffMap.replace(key, val);\n\t\t}else{\n\t\t\tbuffMap.put(key, 1);\n\t\t}\n\t\treturn true;\n\t}", "private void writeInMemoryData() throws IOException {\n out.write(totalBitsInChunk);\n\n /* write chunk of bytes itself */\n out.write(chunk, 0, chunkIndex < chunk.length ? chunkIndex + 1 : chunkIndex);\n out.flush();\n\n zeroChunk();\n }", "public void write(C6720b bVar, Map<K, V> map) throws IOException {\n boolean z;\n if (map == null) {\n bVar.mo16115f();\n } else if (!MapTypeAdapterFactory.this.f18993a) {\n bVar.mo16113d();\n for (Entry entry : map.entrySet()) {\n bVar.mo16107a(String.valueOf(entry.getKey()));\n this.f18997c.write(bVar, entry.getValue());\n }\n bVar.mo16114e();\n } else {\n ArrayList arrayList = new ArrayList(map.size());\n ArrayList arrayList2 = new ArrayList(map.size());\n int i = 0;\n boolean z2 = false;\n for (Entry entry2 : map.entrySet()) {\n C6709k jsonTree = this.f18996b.toJsonTree(entry2.getKey());\n arrayList.add(jsonTree);\n arrayList2.add(entry2.getValue());\n if (jsonTree.mo16132i() || jsonTree.mo16133j()) {\n z = true;\n } else {\n z = false;\n }\n z2 |= z;\n }\n if (z2) {\n bVar.mo16109b();\n int size = arrayList.size();\n while (i < size) {\n bVar.mo16109b();\n C6700i.m20727a((C6709k) arrayList.get(i), bVar);\n this.f18997c.write(bVar, arrayList2.get(i));\n bVar.mo16111c();\n i++;\n }\n bVar.mo16111c();\n return;\n }\n bVar.mo16113d();\n int size2 = arrayList.size();\n while (i < size2) {\n bVar.mo16107a(m20561a((C6709k) arrayList.get(i)));\n this.f18997c.write(bVar, arrayList2.get(i));\n i++;\n }\n bVar.mo16114e();\n }\n }", "public int GetMapSize() {\n\t\treturn m_mapSize;\n\t}", "public Map<Integer, byte[]> getAsBinary() throws SQLException {\n return retrieveExpected(createNativeAsBinaryStatement(), OBJECT);\n }", "public void updateFromDeserialization() {\n\t\tif (inSerializedState) {\n\t\t\tframes = new KeyFrames();\n\t\t\tfor(Integer key : pixelsMap.keySet()) {\n\t\t\t\tint[][] pixels = pixelsMap.get(key);\n\t\t\t\tDrawFrame image = new DrawFrame(serializedWidth, serializedHeight);\n\t\t\t\tfor(int r = 0; r < serializedHeight; r++) {\n\t\t\t\t\tfor (int c = 0; c < serializedWidth; c++) {\n\t\t\t\t\t\timage.setRGB(c, r, pixels[r][c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t WritableRaster raster = (WritableRaster) image.getData();\n\t\t raster.setPixels(0,0, serializedWidth, serializedHeight, pixels);\n\t\t image.setData(raster);\n\t\t */\n\t\t\t\tframes.put(key, image);\n\t\t\t}\n\t\t\tinitializeTransientUIComponents();\n\t\t\tinSerializedState = false;\t\n\t\t}\n\t}", "@Override\n\tpublic void setByteAtPos(int x, int y, byte byteP) {\n\t\tmapGrid[x][y] = byteP;\n\t}", "public void GetBytes(ByteBuffer bytes) {\n bytes.put(data);\n }", "protected void setValues() {\n values = new double[size];\n int pi = 0; // pixelIndex\n int siz = size - nanW - negW - posW;\n int biw = min < max ? negW : posW;\n int tiw = min < max ? posW : negW;\n double bv = min < max ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;\n double tv = min < max ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY;\n double f = siz > 1 ? (max - min) / (siz - 1.) : 0.;\n for (int i = 0; i < biw && pi < size; i++,pi++) {\n values[pi] = bv;\n }\n for (int i = 0; i < siz && pi < size; i++,pi++) {\n double v = min + i * f;\n values[pi] = v;\n }\n for (int i = 0; i < tiw && pi < size; i++,pi++) {\n values[pi] = tv;\n }\n for (int i = 0; i < nanW && pi < size; i++,pi++) {\n values[pi] = Double.NaN;\n }\n }", "private void getMapping() {\n double [][] chars = new double[CHAR_SET_SIZE][1];\n for (int i = 0; i < chars.length; i++) {\n chars[i][0] = i;\n }\n Matrix b = new Matrix(key).times(new Matrix(chars));\n map = b.getArray();\n }", "public abstract void putAll(AbstractIntHashMap map);", "void writeByteArray(ByteArray array);", "@Override\n public int getSize() {\n return map.size();\n }", "@Override\n public byte[] getByteArray()\n {\n if(firstTime)\n {\n return new byte[0];\n }\n ByteBuffer buffer = ByteBuffer.allocate(MolapCommonConstants.DOUBLE_SIZE_IN_BYTE);\n buffer.putDouble(aggVal);\n return buffer.array();\n }", "@Override\n public byte[] pack() {\n // If data not set\n if (m_ptLoc == null)\n return (null);\n \n byte[] bData = new byte[16];\n double dValue; \n int iValue;\n \n // X-coordinate\n iValue = (int)(Math.floor(dValue = m_ptLoc.getX()));\n bData[0] = (byte)((0xFF000000 & iValue) >> 24);\n bData[1] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[2] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[3] = (byte)((0x000000FF & iValue));\n iValue = (int)(Math.floor((dValue - (double)iValue) * 10e8));\n bData[4] = (byte)((0xFF000000 & iValue) >> 24);\n bData[5] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[6] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[7] = (byte)((0x000000FF & iValue));\n \n // Y-coordinate\n iValue = (int)(Math.floor(dValue = m_ptLoc.getY()));\n bData[8] = (byte)((0xFF000000 & iValue) >> 24);\n bData[9] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[10] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[11] = (byte)((0x000000FF & iValue));\n iValue = (int)(Math.floor((dValue - (double)iValue) * 10e8));\n bData[12] = (byte)((0xFF000000 & iValue) >> 24);\n bData[13] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[14] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[15] = (byte)((0x000000FF & iValue));\n \n return (bData);\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }", "public FloatByteMap(float[] f) {\n _clips = new Clips(f);\n }", "public Maze(byte[] arrayByte){\n start=new Position(toDecimal(0,arrayByte),toDecimal(numOfBits,arrayByte));\n goal=new Position(toDecimal(numOfBits*2,arrayByte),toDecimal(numOfBits*3,arrayByte));\n maze=new int[toDecimal(numOfBits*4,arrayByte)][toDecimal(numOfBits*5,arrayByte)];\n int counter=numOfBits*6;\n for(int i=0;i<maze.length;i++){\n for (int j=0;j<maze[0].length;j++){\n maze[i][j]=arrayByte[counter];\n counter++;\n }\n }\n mazeID=toByteArray().toString().hashCode();\n }", "public synchronized void setData(byte[] data, int level, int fx, int fy) {\n final int edge = getTileEdge(level);\n final int tileOffset = getTileOffset(level, fx, fy);\n final int blockSize = edge*edge;\n// log.debug(this.data.array().length + \" - \" + (origo+tileOffset) + \" - \" + blockSize);\n backingData.position(origo+tileOffset);\n backingData.put(data, 0, blockSize);\n syncMemData();\n }", "@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public Map(){\n this.matrix = new int[10][10];\n }", "private void setPixels() {\n\t\t\tfinal byte[] dest = new byte[(int) (getMetadata().get(0).getAxisLength(\n\t\t\t\tAxes.X) * getMetadata().get(0).getAxisLength(Axes.Y))];\n\t\t\tlong lastImage = -1;\n\n\t\t\t// fill in starting image contents based on last image's dispose\n\t\t\t// code\n\t\t\tif (getMetadata().getLastDispose() > 0) {\n\t\t\t\tif (getMetadata().getLastDispose() == 3) { // use image before last\n\t\t\t\t\tfinal long n = getMetadata().get(0).getPlaneCount() - 2;\n\t\t\t\t\tif (n > 0) lastImage = n - 1;\n\t\t\t\t}\n\n\t\t\t\tif (lastImage != -1) {\n\t\t\t\t\tfinal byte[] prev = getMetadata().getImages().get((int) lastImage);\n\t\t\t\t\tSystem.arraycopy(prev, 0, dest, 0, (int) (getMetadata().get(0)\n\t\t\t\t\t\t.getAxisLength(Axes.X) * getMetadata().get(0).getAxisLength(\n\t\t\t\t\t\t\tAxes.Y)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// copy each source line to the appropriate place in the destination\n\n\t\t\tint pass = 1;\n\t\t\tint inc = 8;\n\t\t\tint iline = 0;\n\t\t\tfor (int i = 0; i < getMetadata().getIh(); i++) {\n\t\t\t\tint line = i;\n\t\t\t\tif (getMetadata().isInterlace()) {\n\t\t\t\t\tif (iline >= getMetadata().getIh()) {\n\t\t\t\t\t\tpass++;\n\t\t\t\t\t\tswitch (pass) {\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tiline = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tiline = 2;\n\t\t\t\t\t\t\t\tinc = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tiline = 1;\n\t\t\t\t\t\t\t\tinc = 2;\n\t\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\tline = iline;\n\t\t\t\t\tiline += inc;\n\t\t\t\t}\n\t\t\t\tline += getMetadata().getIy();\n\t\t\t\tif (line < getMetadata().get(0).getAxisLength(Axes.Y)) {\n\t\t\t\t\tfinal int k = line * (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint dx = k + getMetadata().getIx(); // start of line in dest\n\t\t\t\t\tint dlim = dx + getMetadata().getIw(); // end of dest line\n\t\t\t\t\tif ((k + getMetadata().get(0).getAxisLength(Axes.X)) < dlim) dlim =\n\t\t\t\t\t\tk + (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint sx = i * getMetadata().getIw(); // start of line in\n\t\t\t\t\t// source\n\t\t\t\t\twhile (dx < dlim) {\n\t\t\t\t\t\t// map color and insert in destination\n\t\t\t\t\t\tfinal int index = getMetadata().getPixels()[sx++] & 0xff;\n\t\t\t\t\t\tdest[dx++] = (byte) index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tgetMetadata().getColorTables().add(getMetadata().getAct());\n\t\t\tgetMetadata().getImages().add(dest);\n\t\t}", "public void set(byte[] arrby) {\n ByteBuffer byteBuffer;\n ByteBuffer byteBuffer2 = byteBuffer = Blob.this.getByteBuffer();\n synchronized (byteBuffer2) {\n byteBuffer.position(Blob.this.getByteBufferPosition() + this.offset());\n byteBuffer.put(arrby);\n this.mCurrentDataSize = arrby.length;\n return;\n }\n }", "public MHKEncryption_Array(){\n\t\t\tBigInteger wgenerator = new BigInteger(\"2\");\n\t\t\twsum = BigInteger.ZERO;\n\t\t\tfor(int i = 0;i < 640;i++){\n\t\t\t\twgenerator = wgenerator.multiply(new BigInteger(\"2\")).subtract(BigInteger.ONE); \n\t\t\t\tw[i] = wgenerator;\n\t\t\t\twsum = wsum.add(wgenerator);\n\t\t\t}\n\t}", "private void buildMapArea(MapBuilderBase mapBuilder) {\n\t\tmap = new Tile[width][height];\n\n\t\tthis.name = mapBuilder.buildMap(map);\n\t\tupdateValues();\n\n\t\t// TODO: pathfinding precalculations?\n\n\t\t// Log.debug(\"Calculating path maps...\");\n\t\t// pointGraph = new PointGraph();\n\t\t// for (int x = 0; x < width; x++) {\n\t\t// for (int y = 0; y < height; y++) {\n\t\t// if (getTileAt(x, y).isPassable)\n\t\t// pointGraph.addVertex(new Vertex(new Point(x, y)));\n\t\t// }\n\t\t// }\n\t\t// pointGraph.calculateEdges();\n\t\t// Log.debug(\"done\");\n\t}", "com.google.protobuf.ByteString getValuesBytes(int index);", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "protected void drawMap(Canvas canvas) {\n\t\tcanvas.save();\n\t\t\n\t\tif (mImage != null) {\n\t\t\tif (!mImage.isRecycled()) {\n\t\t\t\tcanvas.drawBitmap(mImage, mScrollLeft, mScrollTop, null);\n\t\t\t}\n\t\t}\n\t\tcanvas.restore();\n\t}", "public ByteBuffer getPixels() {\n\t\t\treturn pixels;\n\t\t}", "private void histToByteMatrix(int[] intHist)\n {\n int pixelsPerSection = pixel_height_per_grid * pixel_width_per_grid;\n\n // Number of bits needed to represent section of the grid\n int maxBits = (int)(Math.log(pixelsPerSection)/ Math.log(2)) + 1;\n\n // Number of bytes needed per array of the Matrix below (Cols)\n int bytesNeeded = PaillierEncryption.number_of_bits / 8;\n\n // Number of integers for every byte array\n float numInts = PaillierEncryption.number_of_bits / (float) maxBits;\n\n // Check if numInts has a decimal place\n if(numInts == (int) numInts)\n {\n numInts--;\n }\n\n int matrixSize = (int)Math.ceil((float)(intHist.length / Math.floor(numInts)));\n\n // Create byte matrix\n byteMatrix = new byte[matrixSize][bytesNeeded];\n\n // Create byte array (these are the arrays set in the matrix above\n byte[] byteArray = new byte[bytesNeeded];\n\n // This is the first bit position that needs to be updated in the byte array\n int bitPos = 0;\n\n // This is set to true if the first byte needs to be all zeroes (to avoid error in encryption)\n boolean firstEmpty = false;\n\n // This is the number of bits that need to be skipped to avoid getting a negative number\n int skipBits = (PaillierEncryption.number_of_bits % maxBits);\n\n // Figure out where to start\n if(skipBits > 8)\n {\n firstEmpty = true;\n bitPos = (16 - skipBits) - 1;\n }\n else if(skipBits == 8 || skipBits == 0)\n {\n // This is if the amount of ints that can be placed into a single BigInteger has no decimal place\n firstEmpty = true;\n bitPos = 7;\n }\n else\n {\n bitPos = (8 - skipBits) - 1;\n }\n\n // This byte is used to check if a specific bit is set or not\n byte andByte = 0x01;\n\n // This is the next byte to be added to byteArray\n byte nextByte = 0x00;\n\n // This is the current index of the byteArray\n int arrayIndex = 0;\n\n // This is the current index of the byteMatrix\n int matrixIndex = 0;\n\n // This is set when the matrix becomes properly filled\n boolean isDone = false;\n\n // Both the for loops just go through every bit\n // First loop is to make sure the alogorithm keeps filling the matrix even when there are no more numbers in inthist\n int i = 0;\n while(!isDone)\n {\n // Get the current value if there is a value to get\n int value = 0;\n if(i < intHist.length)\n {\n value = intHist[i];\n }\n\n // For every bit needed to represent value\n for(int k = maxBits - 1; k >= 0; k--)\n {\n // Check if we need to skip the first byte in byteArray\n // This should only happen in a few settings: 1024 bit key and a grid size of 1\n if(firstEmpty && arrayIndex == 0)\n {\n byteArray[arrayIndex++] = nextByte;\n }\n // Check the specific bit of value\n if(((value >> k) & andByte) == 1)\n {\n // if 1, set the proper bit in nextByte\n nextByte |= (1 << bitPos);\n }\n // Always reduce the bit position by 1\n bitPos--;\n\n // If the bitPos is less than 0, then add nextByte to byteArray and reset values\n if(bitPos < 0)\n {\n byteArray[arrayIndex++] = nextByte;\n bitPos = 7;\n nextByte = 0x00;\n }\n // If the array has been filled add it to the matrix and repeat\n if(arrayIndex == bytesNeeded)\n {\n byteMatrix[matrixIndex++] = byteArray;\n byteArray = new byte[bytesNeeded];\n arrayIndex = 0;\n\n if(matrixIndex == matrixSize)\n {\n isDone = true;\n }\n\n // Figure out where to start again\n if(skipBits > 8)\n {\n // This may not work... idk. But it won't get called for 1024 or 2048 bit key\n bitPos = (16 - skipBits) - 1;\n }\n else if(skipBits == 8 || skipBits == 0)\n {\n // This is if the amount of ints that can be placed into a single BigInteger has no decimal place\n bitPos = 7;\n }\n else\n {\n bitPos = (8 - skipBits) - 1;\n }\n\n }\n\n }\n i++;\n }\n }", "static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }", "public native void constituteImage(int width, int height, String map,\n\t\t\tint[] pixels) throws MagickException;", "private void m10260a(long j, byte[] bArr, int i) {\r\n bArr[i + 0] = (byte) ((int) (j & 255));\r\n bArr[i + 1] = (byte) ((int) ((j >> 8) & 255));\r\n bArr[i + 2] = (byte) ((int) ((j >> 16) & 255));\r\n bArr[i + 3] = (byte) ((int) ((j >> 24) & 255));\r\n bArr[i + 4] = (byte) ((int) ((j >> 32) & 255));\r\n bArr[i + 5] = (byte) ((int) ((j >> 40) & 255));\r\n bArr[i + 6] = (byte) ((int) ((j >> 48) & 255));\r\n bArr[i + 7] = (byte) ((int) ((j >> 56) & 255));\r\n }", "public AsmMemoryMap(int numRegisters, int sizeOfMemory, int startPoint) {\r\n\t\tfinal int POINTERCOPY = 1; // 1 is added to the array of memory addresses to allocate a memory address for the pointer copy register\r\n\t\t\r\n\t\tthis.registers = new AsmMemoryAddress[numRegisters];\r\n\t\tthis.fullMemory = new AsmMemoryAddress[numRegisters+sizeOfMemory+POINTERCOPY+1/*memory pointer*/+3/*memory pointer arr*/];\r\n\t\tthis.programMemory = new AsmMemoryAddress[sizeOfMemory];\r\n\t\t\r\n\t\tinit(startPoint);\r\n\t}", "@Override\n protected void putImageBuffer(BufferedImage input) \n {\n // Load data in. \n for (int y = 0; y < height; y++) \n {\n for (int x = 0; x < width; x++) \n {\n\t\tdouble h = getHeight(input, x, y);\n\t\tdouble du = 0;\n\t\tdouble dv = 0;\n\t\t\n\t\tif(x > 0)\n\t\t{\t\n\t\t du += h - getHeight(input, x-1, y);\n\t\t}\n\t\tif(x < width - 1)\n\t\t{\n\t\t du += getHeight(input, x+1, y) - h;\n\t\t}\n\t\tif(y > 0)\n\t\t{\n\t\t dv += h - getHeight(input, x , y-1);\n\t\t}\n\t\tif(y < height - 1)\n\t\t{\n\t\t dv += getHeight(input, x, y+1) - h;\n\t\t}\n\t\t\n\t\tdouble u = -du;\n\t\tdouble v = -dv;\n\t\tdouble w = 0.25;\n \n\t\tdouble n = Math.sqrt(u*u + v*v + w*w);\n\n byte a = (byte)(h * 255.0);\n byte r = (byte)((u / n + 1.0) / 2.0 * 255.0);\n byte g = (byte)((v / n + 1.0) / 2.0 * 255.0);\n byte b = (byte)((w / n + 1.0) / 2.0 * 255.0);\n \n int index = (x + y * allocatedWidth) * 4;\n pixelData.put(index++, r);\n pixelData.put(index++, g);\n pixelData.put(index++, b);\n pixelData.put(index , a);\n }\n }\n }", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "@Override\r\n public void save(ByteBuffer buffer) {\r\n for (int i = 0; i < 24; i++) {\r\n buffer.putInt((int) (experience[i] * 10));\r\n if (i == HITPOINTS) {\r\n buffer.put((byte) lifepoints);\r\n } else if (i == PRAYER) {\r\n buffer.put((byte) Math.ceil(prayerPoints));\r\n } else {\r\n buffer.put((byte) dynamicLevels[i]);\r\n }\r\n buffer.put((byte) staticLevels[i]);\r\n }\r\n buffer.putInt(experienceGained);\r\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public void updateValues() {\n\t\tlightResistances = new float[width][height];\n\t\twalls = new boolean[width][height];\n\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tlightResistances[x][y] = map[x][y].getLighting();\n\t\t\t\twalls[x][y] = map[x][y].isWall();\n\t\t\t}\n\t\t}\n\t}", "@Override\n \t protected void onPostExecute(Bitmap result)\n \t {\n \t\t\tMapImageView imageView = (MapImageView)this.getActivity().findViewById(com.example.chronolocalization.R.id.mapImage);\n \t \n \t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n \t\t\tresult.compress(Bitmap.CompressFormat.PNG, 100, baos);\n \t\t\tInputStream is = new ByteArrayInputStream( baos.toByteArray());\n \t \t\t\n \t\t\t //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n Bitmap resizedbitmap = BitmapFactory.decodeStream(is, null, o2);\n\t \n \t\t imageView.setImageBitmap(resizedbitmap);\n \t\t \n \t\t int bitmapHeight = resizedbitmap.getHeight();\n \t\t int bitmapWidth = resizedbitmap.getWidth();\n \t\t \n \t\t int imageViewHeight = imageView.getHeight();\n \t\t int imageViewWidth = imageView.getWidth();\n \t\t \n \t\t float additionalRatioX = (float) imageViewWidth / (float) bitmapWidth;\n \t\t float additionalRatioY = (float) imageViewHeight / (float) bitmapHeight;\n \t\t \n \t\t float additionalRatio = 1.0f;\n\t\t if( Math.abs(additionalRatioX - 1.0f) < Math.abs(additionalRatioY -1.0f) )\n \t\t {\n \t\t \tadditionalRatio = additionalRatioX;\n \t\t }\n \t\t else\n \t\t {\n \t\t \tadditionalRatio = additionalRatioY;\n \t\t }\n\t\t \n\t\t float heightInMeter = mapRecord.getHeight();\n\t\t float widthInMeter = mapRecord.getWidth();\n\t\t \n\t\t int heightInPixel = (int)heightInMeter * (int)mapRecord.getScalingY();\n\t\t int widthInPixel = (int)widthInMeter * (int)mapRecord.getScalingX();\n\t\t \n \t\t float scalingX = mapRecord.getScalingX() * additionalRatio;\n \t \tfloat scalingY = mapRecord.getScalingY() * additionalRatio;\n\t \t\n\t \tfloat offsetX = mapRecord.getOffsetX();\n\t \tfloat offsetY = mapRecord.getOffsetY();\n\t \t\n \t \tPoint oldZero = new Point(0.0f, 0.0f);\n\t \tPoint newZero = new Point(0.0f, -offsetY*additionalRatio);\n \t \t\n \t \tCoordinateTransformation coordinateTransformation = new CoordinateTransformation(oldZero, newZero);\n \t\t \n \t \timageView.clearReceiverPositions();\n \t\t for(ReceiverRecord receiverRecord : receiverRecords)\n \t\t {\n \t\t \tPoint receiverPosition = receiverRecord.getReceiverPosition();\n \t\t \treceiverPosition.scale(scalingX, scalingY);\n \t\t \treceiverPosition = coordinateTransformation.transformPosition(receiverPosition);\n \t\t \t\n \t\t \timageView.addReceiver(receiverRecord.getReceiverId(), receiverPosition);\n \t\t }\n \t\t \t\t \n \t\t imageView.invalidate();\n \n \t }", "public static BufferedImage loadMapBinary16(File source, int width, int height) throws IOException {\n //load binary into byte buffer\n RandomAccessFile raf = new RandomAccessFile(source, \"r\");\n byte[] buffer = new byte[(int) raf.length()];\n raf.readFully(buffer);\n raf.close();\n\n assert (buffer.length == width * height * 2);\n\n //create new gray scale image\n BufferedImage retVal = new BufferedImage(width, height, BufferedImage.TYPE_USHORT_GRAY);\n WritableRaster wr = retVal.getRaster();\n\n //write in it line by line\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int offset = ((x + y * width) * 2);\n int value = (short) ((Byte.toUnsignedInt(buffer[offset]) +\n (Byte.toUnsignedInt(buffer[offset + 1]) << 8)) - 32768);\n wr.setSample(x, y, 0, value);\n }\n }\n\n return retVal;\n }", "private void initArrayHeightAndWidth() {\n\n\t\theight = 0;\n\t\twidth = 0;\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\tString line = br.readLine();\n\t\t\t// get length of map\n\t\t\twidth = line.length();\n\t\t\t// get height of map\n\t\t\twhile (line != null) {\n\t\t\t\theight += 1;\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\theight_on_display = (height - 1) * 35;\n\t\twidth_on_display = (width - 1) * 35;\n\t\tmapElementStringArray = new String[height][width];\n\t\tmapElementArray = new MapElement[height][width];\n\n\t}", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void render(Bitmap map) {\n\t\t\n\t}", "private void m675a(long j, byte[] bArr, int i) {\n bArr[i + 0] = (byte) ((int) (j & 255));\n bArr[i + 1] = (byte) ((int) ((j >> 8) & 255));\n bArr[i + 2] = (byte) ((int) ((j >> 16) & 255));\n bArr[i + 3] = (byte) ((int) ((j >> 24) & 255));\n bArr[i + 4] = (byte) ((int) ((j >> 32) & 255));\n bArr[i + 5] = (byte) ((int) ((j >> 40) & 255));\n bArr[i + 6] = (byte) ((int) ((j >> 48) & 255));\n bArr[i + 7] = (byte) ((int) ((j >> 56) & 255));\n }", "public native byte[][] __byte2dArrayMethod( long __swiftObject, byte[][] arg );", "public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }", "@Override\n\t\t\tprotected int sizeOf(String key, Bitmap value) {\n\t\t\t\treturn value.getRowBytes()*value.getHeight();\n\t\t\t}", "static int[][] unite4arrays(Map<Integer, int[][]> map, int size) {\n int sqrt = (int) Math.sqrt( map.keySet().size());\n int[][] result = new int[size * sqrt][size * sqrt];\n for (int i = 0; i < map.keySet().size(); i++) {\n\n for (int x = 0; x < size; x++) {\n for (int y = 0; y < size; y++) {\n result[x + size * (i % sqrt)][y + size * (i / sqrt)] = map.get(i)[x][y];\n }\n }\n\n }\n return result;\n }", "public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}", "@Override\n public ImageData createPixelMap(double x, double y) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, x, y);\n }", "private void callbitmapmethod() {\n\t\ttry {\n\t\t\tencode.clear();\n\t\t\tfor (int i = 0; i < queueItemforApproval.size(); i++) {\n\t\t\t\t/**/\n\t\t\t\tQueueString en = new QueueString();\n\t\t\t\tif (queueItemforApproval.get(i).bitmap != null) {\n\t\t\t\t\tSystem.out.println(\"bitmap is:\"\n\t\t\t\t\t\t\t+ queueItemforApproval.get(i).bitmap);\n\t\t\t\t\ten.path = convertintobase64(queueItemforApproval.get(i).bitmap);\n\t\t\t\t\tSystem.out.println(\"path is :\" + en.path);\n\t\t\t\t\t// Bitmap bitmap = decodeBase64(en.path, i);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"bitmap is null\");\n\t\t\t\t}\n\t\t\t\tencode.add(en);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "byte[] getBytes();", "byte[] getBytes();", "void newframe() {\n\t\ti = oldind;\r\n\t\toldind = newind;\r\n\t\tnewind = i;\r\n\r\n\t\ti = 0;\r\n\t\tmapind = oldind;\r\n\t\tfor (int y = 0; y < height; y++) {\r\n\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\tshort data = (short) ((ripplemap[mapind - width] + ripplemap[mapind + width] + ripplemap[mapind - 1] + ripplemap[mapind + 1]) >> 1);\r\n\t\t\t\tdata -= ripplemap[newind + i];\r\n\t\t\t\tdata -= data >> 5;\r\n\t\t\t\tripplemap[newind + i] = data;\r\n\r\n\t\t\t\t// where data=0 then still, where data>0 then wave\r\n\t\t\t\tdata = (short) (1024 - data);\r\n\r\n\t\t\t\t// offsets\r\n\t\t\t\ta = ((x - hwidth) * data / 1024) + hwidth;\r\n\t\t\t\tb = ((y - hheight) * data / 1024) + hheight;\r\n\r\n\t\t\t\t// bounds check\r\n\t\t\t\tif (a >= width)\r\n\t\t\t\t\ta = width - 1;\r\n\t\t\t\tif (a < 0)\r\n\t\t\t\t\ta = 0;\r\n\t\t\t\tif (b >= height)\r\n\t\t\t\t\tb = height - 1;\r\n\t\t\t\tif (b < 0)\r\n\t\t\t\t\tb = 0;\r\n\r\n\t\t\t\tripple[i] = texture[a + (b * width)];\r\n\t\t\t\tmapind++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public EWAHCompressedBitmap() {\n\t\tthis.buffer = new long[defaultbuffersize];\n\t\tthis.rlw = new RunningLengthWord(this.buffer, 0);\n\t}", "public byte[] toByteArray() {\n final byte[] data = new byte[maxIndex];\n for (Map.Entry<Integer, String> entry : addr2str.entrySet()) {\n final String str = entry.getValue();\n final int addr = entry.getKey();\n for (int k = 0; k < str.length(); k++) {\n data[addr + k] = (byte) str.charAt(k);\n }\n }\n return data;\n }", "public final synchronized byte[] mo68846g(Integer num) {\n byte[] bArr;\n AppMethodBeat.m2504i(60317);\n bArr = (byte[]) super.mo33852d(num);\n if (bArr == null) {\n bArr = new byte[num.intValue()];\n }\n AppMethodBeat.m2505o(60317);\n return bArr;\n }", "public void putRawData(byte []bytes){\n\t\trawData=bytes;\n\t}", "void updateMap(MapData map);" ]
[ "0.55913025", "0.5546833", "0.5527215", "0.5373328", "0.52728933", "0.52140796", "0.52108175", "0.5205164", "0.5193071", "0.5178848", "0.51546615", "0.514435", "0.51055926", "0.50838095", "0.50785184", "0.5037293", "0.5017532", "0.50118566", "0.49800333", "0.49731198", "0.49711478", "0.49585196", "0.49437842", "0.4891453", "0.48880348", "0.4884512", "0.4860648", "0.48385647", "0.4835065", "0.48332918", "0.48151532", "0.48032677", "0.47982466", "0.4793943", "0.4787285", "0.47784558", "0.4776425", "0.4773692", "0.47586352", "0.47543335", "0.4738356", "0.4735845", "0.47323394", "0.47209916", "0.4720974", "0.47176597", "0.47101954", "0.47098804", "0.47045627", "0.46918005", "0.46907863", "0.46821663", "0.467195", "0.46700934", "0.46700934", "0.46700934", "0.46700934", "0.46664646", "0.466218", "0.4658205", "0.465783", "0.4657115", "0.46537632", "0.46300024", "0.46239215", "0.46204573", "0.46082067", "0.4604949", "0.46048385", "0.459917", "0.45875984", "0.45874318", "0.45815817", "0.45785132", "0.45665547", "0.4565883", "0.4562183", "0.4555898", "0.45485324", "0.4546908", "0.45463756", "0.45431873", "0.45379454", "0.4535091", "0.45251456", "0.45232132", "0.45213968", "0.45186338", "0.4514798", "0.45125574", "0.45056334", "0.4498975", "0.44986895", "0.4495016", "0.4495016", "0.449388", "0.44911075", "0.4489359", "0.44843447", "0.44792295", "0.44740325" ]
0.0
-1
Updates this map object based on new data.
public void update(Scan scan, Position position, int quality, double hole_width_mm) { this.update(scan, position.x_mm, position.y_mm, position.theta_degrees, quality, hole_width_mm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateMap(MapData map);", "private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}", "public void updateData() {}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\r\n public final void update() {\r\n\r\n logger.entering(this.getClass().getName(), \"update\");\r\n\r\n setFilterMap();\r\n\r\n logger.exiting(this.getClass().getName(), \"update\");\r\n\r\n }", "@Override\n\tpublic void updateDataListMap(List<Map<String, Object>> dataList) {\n\t\t\n\t}", "void updateData();", "private void updateMap(){\n mMap.clear();\n // this instruction clears the Map object from the other object, it's needed in orther to display\n //the right current geofences without having the previous ones still on screen\n\n mOptions.setOption(mOptions.getOption().center(circle.getCenter()));\n mOptions.setOption(mOptions.getOption().radius(circle.getRadius()));\n\n\n circle=mMap.addCircle(mOptions.getOption());//i need to add again the user circle object on screen\n\n //TODO have to implement settings\n //set markers based on the return objects of the geoquery\n for (int ix = 0; ix < LOCATIONS.length; ix++) {\n mMap.addMarker(new MarkerOptions()\n .title(LOCATIONS[ix].getExplaination())\n .snippet(\"TODO\")\n .position(LOCATIONS[ix].getPosition()));\n }\n }", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }", "public void updateMap(TileMap tileMap){\n\t\tthis.tileMap = tileMap;\n\n\t}", "public abstract void setData(Map<ID, T> data);", "public void updateMap(Map map) {\n\t\tmyMap.updateMap(map);\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public abstract void updateFromFeed(Map<String,List<Map<String,String>>> data);", "private void fillData() {\n\t\tfor(Entry<String, HashMap<String, Double>> entry : m.map.entrySet()) {\n\t\t\tfor(Entry<String, Double> subEntry : entry.getValue().entrySet()) {\n\t\t\t\tMappingData item = new MappingData(entry.getKey(), subEntry.getKey(), subEntry.getValue());\n\t\t\t\tdataList.add(item);\n\t\t\t}\n\t\t}\n\t}", "public void updatePositioningData(PositioningData data);", "public void saveMap(){\n dataBase.updateMap(level);\n }", "public void refreshMapInformation() {\n\t\t((JLabel)components.get(\"timeElapsedLabel\")).setText(Integer.toString(ABmap.instance().getTimeElapsed()));\n\t\t((JLabel)components.get(\"oilInMapLabel\")).setText(Integer.toString(ABmap.instance().getOilInMap()));\n\t\t((JLabel)components.get(\"oilInStorageLabel\")).setText(Integer.toString(ABmap.instance().getOilInStorage()));\n\t\t((JProgressBar)components.get(\"oilCleanedProgressBar\")).setValue(100-((ABmap.instance().getOilInMap()*100)/ABmap.instance().initialOilCount));\n\t\t((JLabel)components.get(\"fuelUsedLabel\")).setText(Integer.toString(ABmap.instance().getFuelUsed()));\n\t\t((JLabel)components.get(\"simCompletedLabel\")).setText(Boolean.toString(ABmap.instance().isDone()));\n\t}", "@Override\n\tpublic void updateMemory(Map map) {\n\t\tif(!memory.used)\n\t\t\treset(map);\n\t\tspiral();\n\t}", "@Override\r\n\tpublic void update(Observable observable, Object data) {\r\n\t\tGameWorld gw = (GameWorld) data;\r\n\t\t\r\n\t\tif(counter >= 1)\r\n\t\t\tgw.map();\r\n\t\t\r\n\t\tcounter++;\r\n\t}", "protected abstract void updateInfos();", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "public void refresh() {\n if (mMarkerView != null) {\n mMarkerView.setLatLng(GeoJSONUtils.toLatLng(mCoordinate));\n }\n }", "public abstract void updateLocations();", "protected void addDataMap(DataMap map, DataMap currentMap) {\n\n ProjectController mediator = getProjectController();\n\n if (currentMap != null) {\n // merge with existing map... have to memorize map state before and after\n // to do the right events\n\n Collection<ObjEntity> originalOE = new ArrayList<>(currentMap.getObjEntities());\n Collection<DbEntity> originalDE = new ArrayList<>(currentMap.getDbEntities());\n Collection<QueryDescriptor> originalQueries = new ArrayList<>(currentMap.getQueryDescriptors());\n\n currentMap.mergeWithDataMap(map);\n map = currentMap;\n\n // postprocess changes\n Collection<ObjEntity> newOE = new ArrayList<>(currentMap.getObjEntities());\n Collection<DbEntity> newDE = new ArrayList<>(currentMap.getDbEntities());\n Collection<QueryDescriptor> newQueries = new ArrayList<>(currentMap.getQueryDescriptors());\n\n EntityEvent entityEvent = new EntityEvent(Application.getFrame(), null);\n QueryEvent queryEvent = new QueryEvent(Application.getFrame(), null);\n\n // 1. ObjEntities\n Collection<ObjEntity> addedOE = new ArrayList<>(newOE);\n addedOE.removeAll(originalOE);\n for (ObjEntity e : addedOE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.ADD);\n mediator.fireObjEntityEvent(entityEvent);\n }\n\n Collection<ObjEntity> removedOE = new ArrayList<>(originalOE);\n removedOE.removeAll(newOE);\n for (ObjEntity e : removedOE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.REMOVE);\n mediator.fireObjEntityEvent(entityEvent);\n }\n\n // 2. DbEntities\n Collection<DbEntity> addedDE = new ArrayList<>(newDE);\n addedDE.removeAll(originalDE);\n for(DbEntity e: addedDE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.ADD);\n mediator.fireDbEntityEvent(entityEvent);\n }\n\n Collection<DbEntity> removedDE = new ArrayList<>(originalDE);\n removedDE.removeAll(newDE);\n for(DbEntity e: removedDE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.REMOVE);\n mediator.fireDbEntityEvent(entityEvent);\n }\n\n // 3. queries\n Collection<QueryDescriptor> addedQueries = new ArrayList<>(newQueries);\n addedQueries.removeAll(originalQueries);\n for(QueryDescriptor q: addedQueries) {\n queryEvent.setQuery(q);\n queryEvent.setId(MapEvent.ADD);\n mediator.fireQueryEvent(queryEvent);\n }\n\n Collection<QueryDescriptor> removedQueries = new ArrayList<>(originalQueries);\n removedQueries.removeAll(newQueries);\n for(QueryDescriptor q: removedQueries) {\n queryEvent.setQuery(q);\n queryEvent.setId(MapEvent.REMOVE);\n mediator.fireQueryEvent(queryEvent);\n }\n\n mediator.fireDataMapDisplayEvent(new DataMapDisplayEvent(Application\n .getFrame(), map, (DataChannelDescriptor) mediator\n .getProject()\n .getRootNode(), mediator.getCurrentDataNode()));\n }\n else {\n // fix DataMap name, as there maybe a map with the same name already\n ConfigurationNode root = mediator.getProject().getRootNode();\n map.setName(NameBuilder\n .builder(map, root)\n .baseName(map.getName())\n .name());\n\n // side effect of this operation is that if a node was created, this DataMap\n // will be linked with it...\n mediator.addDataMap(Application.getFrame(), map);\n }\n }", "public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}", "void updateInformation();", "public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }", "public void updateInfo() {\n\t}", "private void refreshMapAndFrame()\n\t{\n\t\tMapAccess.refresh();\n\t\tFrameMap.refresh();\n\t}", "public void update(){}", "public void update(){}", "@Override\n\tpublic boolean update(Eleve o) {\n\t\tmap.replace(o.getId(), o);\n\t\treturn true;\n\t}", "@Override\n public void refreshDataEntries() {\n }", "void setMapChanged();", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "public void repaintMap() {\r\n\t\tpolygonMap.repaint();\r\n\t}", "@Override\n public void update() {\n updateBuffs();\n }", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "@Override\n\tpublic void changementMap(String dataName) {\n\t\talgo.setDataName(dataName);\n\t}", "public void setData(Map<E, String> data) {\n\t\tthis.data = data;\n\t}", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "public void updateMarkers() {\n\t\tArrayList<Parking> items = getMarkersForLocation();\n\t\tfor (Parking item : items) {\n\t\t\tint id = item.getParkingId();\n\t\t\tParking inHashItem = parkingsArray.get(id);\n\t\t\tparkingsArray.delete(id);\n\t\t\t// if the item already exists, update the position\n\t\t\tif (inHashItem != null) {\n\t\t\t\tLog.d(\"Markers\", \"An old item\");\n\t\t\t\tparkingsArray.put(id, inHashItem); // put it at the end\n\t\t\t} else {\n\t\t\t\tLog.d(\"Markers\", \"A new item\");\n\t\t\t\titem.addMarkerToMap(map);\n\t\t\t\tparkingsArray.put(id, item);\n\t\t\t}\n\t\t}\n\n\t\t// remove extras\n\t\tremoveOldMarkers();\n\t}", "@Override\r\n\tpublic void update(String[] getdata) {\n\r\n\t}", "public void updateData() {\n\t\tcal = eventsData.getCalendar();\n\t\tfirstDayOfWeek = eventsData.getFirstDayOfWeek();\n\t\tcurrentDayOfMonth = eventsData.getDayNumber();\n\t\tnumberOfDays = eventsData.getNumberOfDays();\n\t\tnumberOfWeeks = eventsData.getNumberOfWeeks();\n\t\tyear = eventsData.getYearNumber();\n\t\tmonth = eventsData.getMonthNumber();\n\t\tday = eventsData.getDayNumber();\n\t\tweek = eventsData.getDayOfWeek();\n\t}", "public void update() {\n\t\tfor (Entry<String, Integer> entry : countMap.entrySet()) {\n\t\t\tcountMap.put(entry.getKey(), 0);\n\t\t}\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tCell c = newGrid[i][j];\n\t\t\t\tc.setRow(i);\n\t\t\t\tc.setCol(j);\n\t\t\t\tblocks[i][j].setFill(c.getColor());\n\t\t\t\tcurrentGrid[i][j] = newGrid[i][j];\n\t\t\t}\n\t\t}\n\t\tempty(newGrid);\n\t}", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "@Override\n\tpublic void update(Map<String, Object> params)\n\t{\n\t}", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "public void reloadData() {\n\t\tinitializeStormData();\n\t\tsuper.reloadData();\n\t}", "void setData (Object newData) { /* package access */ \n\t\tdata = newData;\n\t}", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "void update(Information info);", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "@Override\n\tpublic void update(Factory factory) {\n\t\tmapper.update(factory);\n\t}", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "public abstract Map<Integer, QuantDataset> updatedDatasets();", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n\tpublic void update() { }", "public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}", "public void update() {\n manager.update();\n }", "public int updateMap(NodePositionsSet myMap){\r\n\t\t/*check updated ID*/\r\n\t\tif(myID == 0){\r\n\t\t\t//core.Debug.p(\"must set myID in global map before updating\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tthis.myMap = myMap;\r\n\t\tsynced=-1;\r\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "public void update()\r\n {\n for (MapObject mo : gameData.getMap().getObjects())\r\n {\r\n mo.getAI().advance();\r\n }\r\n \r\n // update the UI\r\n for (UIElement uiEl : ui.getUIElements())\r\n {\r\n uiEl.update();\r\n }\r\n\r\n // Move the map objects\r\n movHandler.moveObjects();\r\n\r\n // Refresh the screen position\r\n Player player = gameData.getPlayer();\r\n this.centerScreen((int) player.getX() + Tile.TILESIZE / 2, (int) player.getY() + Tile.TILESIZE / 2);\r\n }", "public void updateView() {\n if (mData.isEmpty()) {\n Logger.d(TAG, \"The mData is empty\");\n return;\n }\n Set<View> viewSet = mData.keySet(); // keySet() returns [] if map is\n // empty\n Iterator<View> viewIterator = viewSet.iterator();\n if (viewIterator == null) {\n Logger.d(TAG, \"The viewIterator is null\");\n return;\n }\n while (viewIterator.hasNext()) {\n View view = viewIterator.next();\n if (view == null) {\n Logger.d(TAG, \"The view is null\");\n } else {\n Object obj = mData.get(view);\n if (obj == null) {\n Logger.d(TAG, \"The value is null\");\n } else {\n if (obj instanceof ChatsStruct) {\n ChatsStruct chatStruct = (ChatsStruct) obj;\n updateChats(view, chatStruct);\n } else if (obj instanceof InvitationStruct) {\n InvitationStruct inviteStruct = (InvitationStruct) obj;\n updateInvitations(view, inviteStruct);\n } else {\n Logger.d(TAG, \"Unknown view type\");\n }\n }\n }\n }\n }", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "public void reloadMarkers() {\n this.markers.reload();\n }", "public void updateMapsRecords(){\n\n // The file to save the maps records\n File file= new File(MAPS_FILE_PATH);\n Document document = DocumentHelper.createDocument();\n Element rootElement = document.addElement(\"xml\");\n if(mapsList==null)\n return;\n for(GridMap themap:mapsList){\n rootElement.add(themap.encode());\n }\n FileOperator.fileWriter(file,document);\n }", "private void refresh() {\n updatePopulationInfo();\n\n // Update current production info\n updateProductionInfo();\n\n // Update the building grid\n updateBuildingInfo();\n\n // Update the warehouse display\n updateWarehouse();\n\n // Update the list of ships/carriers in port\n updateInPortInfo();\n\n // Update the list of cargo on the selected carrier\n updateCargoInfo();\n }", "protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }", "private void updateMhoLocationList() {\n\n\t\t//clear all the mhos in mhoLocations\n\t\tmhoLocations.clear();\n\n\t\t//add the locations of all the mhos in mhoLocations\n\t\tfor (int i = 1; i < 11; i++)\n\t\t\tfor (int j = 1; j < 11; j++) \n\t\t\t\tif(newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmhoLocations.add(i);\n\t\t\t\t\tmhoLocations.add(j);\n\t\t\t\t}\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@Override\n public void update() {\n }", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "public void update() {}", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "@PUT\n @Consumes({\"application/xml\", \"application/json\"})\n public void put(SourceInterestMapConverter data) {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n EntityManager em = persistenceSvc.getEntityManager();\n updateEntity(getEntity(), data.resolveEntity(em));\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "public int updateDictData(SysDictData dictData);", "@Override\r\n\tpublic void newsRepUpdate(Map<String, String> map) throws Exception {\n\t\tdao.newsRepUpdate(map);\r\n\t}" ]
[ "0.7504593", "0.7046188", "0.69422835", "0.68715173", "0.67658097", "0.6646253", "0.6462808", "0.63436484", "0.63288593", "0.6315352", "0.6268527", "0.6187115", "0.61448777", "0.6141365", "0.6141365", "0.6141365", "0.61380386", "0.6111018", "0.61049825", "0.61046904", "0.6087477", "0.6084546", "0.6078589", "0.59751636", "0.59552675", "0.59487927", "0.5946751", "0.59363925", "0.5921475", "0.59117573", "0.5906591", "0.5905516", "0.58971083", "0.5877877", "0.5877877", "0.58774793", "0.5865985", "0.58613753", "0.5842097", "0.5842097", "0.57941973", "0.578795", "0.5771961", "0.57286084", "0.5727298", "0.57237285", "0.5720075", "0.5691942", "0.5686729", "0.56843466", "0.56801623", "0.56637913", "0.56631666", "0.56624216", "0.5661883", "0.5661883", "0.5661883", "0.5661883", "0.5661883", "0.565701", "0.5650102", "0.56500524", "0.56441295", "0.56441295", "0.5635648", "0.56193286", "0.5616948", "0.5608508", "0.56045586", "0.55956", "0.5595173", "0.55908245", "0.55886275", "0.5579602", "0.5575189", "0.5574001", "0.5570307", "0.5555119", "0.5542618", "0.5542618", "0.5542618", "0.5542618", "0.5542618", "0.5542618", "0.55354285", "0.55347234", "0.5530759", "0.5525464", "0.5511902", "0.5508216", "0.5508216", "0.5508216", "0.5508216", "0.5501983", "0.54987276", "0.54987276", "0.54979837", "0.54899347", "0.5487385", "0.54737085", "0.5457127" ]
0.0
-1
Returns the size of this map in meters.
public double sizeMeters() { return this.size_meters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMapSize() {\n return mapSize;\n }", "public int GetMapSize() {\n\t\treturn m_mapSize;\n\t}", "public double dimensionsToMeters() {\n\t\tdouble heightMeters = heightInInches / 39.370;\n\t\tdouble widthMeters = widthInInches / 39.370;\n\n\t\treturn areaInMeters = heightMeters * widthMeters;\n\t}", "public int getLengthInCentiMeters()\r\n\t{\r\n\t\treturn length;\r\n\t}", "public Point2D.Float getSize() {\r\n\t\treturn size;\r\n\t}", "public Dimension getMapSize() {\n \t\treturn new Dimension(15, 13);\n \t}", "public double getSize() {\n return size_;\n }", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public double getSize() {\n return size_;\n }", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "public double getWidthInMillimeters()\n {\n return MILLIMETERS * width;\n }", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "public float getSize() {\n\t\treturn size;\n\t}", "public XYPoint getMapSize();", "public double getSize() {\n return getElement().getSize();\n }", "public float getSize() {\n return size;\n }", "public int getMazeSize() \r\n\t{\r\n\t\treturn this.size;\r\n\t}", "public static Integer getMapWidth() {\n\t\treturn MAPWIDTH;\n\t}", "public double getWidth() {\n return location.width();\n }", "public long getSize() {\n\t\treturn Math.abs(getXSize() * getYSize() * getZSize());\n\t}", "public double getSize() \n {\n return size;\n }", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public float getSize()\n {\n return size;\n }", "public int getSize() {\n\t\treturn WORLD_SIZE;\n\t}", "public int getTileSize() {\r\n\t\treturn tSize;\r\n\t}", "public final Vector2f getSize() {\r\n return size;\r\n }", "public Vector2i getTileSize() {\n return new Vector2i(getTileWidth(), getTileHeight());\n }", "public long getSize() {\n return mSize;\n }", "public final double megabytes()\n\t{\n\t\treturn kilobytes() / 1024.0;\n\t}", "private void calculateMapSize() {\n calculateMapSize(true);\n }", "public double getMySize() {\n\t\treturn size;\n\t}", "public double getVelocitySize() {\r\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\r\n }", "public int getDiameterInMicrometers() {\n return diameterInMicrometers;\n }", "public final Point getSize() {\r\n return new Point(config.width, config.height);\r\n }", "public Dimension getSize() {\n\t\treturn size.getCopy();\n\t}", "public Vector2i getSize() {\n return new Vector2i(getWidth(), getHeight());\n }", "public int getTileSize() {\r\n\t\treturn this.tileSize;\r\n\t}", "public final double kilobytes()\n\t{\n\t\treturn value / 1024.0;\n\t}", "public static int getMazeSize() {\n\t\t\treturn mazeSize;\n\t\t}", "public Point getSize();", "public Size getSize() {\n return size;\n }", "public double getHeightInMillimeters()\n {\n return MILLIMETERS * height;\n }", "public Vector2i getSizeInTiles() {\n return new Vector2i(getWidthInTiles(), getHeightInTiles());\n }", "public static Integer getMapHeight() {\n\t\treturn MAPHEIGHT;\n\t}", "double getSize();", "public int getApproximateSize() {\r\n return approximateSize;\r\n }", "public int getSize() {\n\n\treturn getSectors().size() * getUnitSize(); // 254 byte sectors\n }", "public double lenght() {\r\n\t\treturn Math.sqrt(this.x * this.x +\r\n\t\t\t\t\t\t this.y * this.y +\r\n\t\t\t\t\t\t this.z * this.z);\r\n\t}", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public float getPixelSize() {\n\n\t\tfloat pixelSize = 0;\n\t\tfloat zoom = getFloat(ADACDictionary.ZOOM);\n\n\t\t// Get calibration factor (CALB)\n\t\tString calString = extrasMap.get(ExtrasKvp.CALIB_KEY);\n\n\t\t// Some wholebody images have height > width. Typically 1024x512.\n\t\t// Crocodile eats the biggest.\n\t\tshort height = getHeight();\n\t\tshort width = getWidth();\n\t\tshort dim = height > width ? height : width;\n\n\t\tif (dim > 0 && calString != null) {\n\n\t\t\ttry {\n\n\t\t\t\tfloat cal = Float.parseFloat(calString);\n\n\t\t\t\t// Now calculate the pixel size\n\t\t\t\tpixelSize = (1024 * cal) / (dim * zoom);\n\n\t\t\t} catch (NumberFormatException e) {\n\n\t\t\t\tlogger.log(\"Unable to parse calibration factor\");\n\t\t\t\tpixelSize = getRoughPixelSize();\n\n\t\t\t}\n\t\t} else {\n\t\t\tpixelSize = getRoughPixelSize();\n\t\t}\n\n\t\treturn pixelSize;\n\n\t}", "public int getSize() {\n\t\treturn dist.length;\n\t}", "public Dimension getSize()\n\t{\n\t\treturn new Dimension(image.getWidth(),image.getHeight());\n\t}", "public long getSize() {\n return size.get();\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public Number getSizeP() {\n return (Number)getAttributeInternal(SIZEP);\n }", "public Dimension3d getSize() {\n return size;\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "public static int getSIZE() {\n return SIZE;\n }", "public Vector2i getSizeInChunks() {\n return new Vector2i(getWidthInChunks(), getHeightInChunks());\n }", "public long getSize() {\r\n return size;\r\n }", "public int getLength() {\n return mySize.getLength();\n }", "public int getSize() {\n return this.radius;\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 Vector2i getActualSizeInTiles() {\n return new Vector2i(getActualWidthInTiles(), getActualHeightInTiles());\n }", "public int getWidth() {\n return mySize.getWidth();\n }", "double getDistanceInMiles();", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public long length() {\n return kmers_num;\n }", "public int size() {\r\n return this.map.size();\r\n }", "public int getSize() {\r\n return this.radius;\r\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "public double length () {\n return Math.sqrt(lengthSquared());\n }", "public double length() {\n return Math.sqrt(\n (Math.pow(getX(), 2)) +\n (Math.pow(getY(), 2)) +\n (Math.pow(getZ(), 2))\n );\n }", "public long getSize() {\n return size;\n }", "public Point getSize() {\n\t\treturn p_screenSize;\n\t}", "public static int getMapWidth() {\r\n\t\treturn 7;\r\n\t}", "Dimension getSize();", "Dimension getSize();", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public int getSize() {\n\t\treturn width + length;\n\t}", "public double length() {\n\t\treturn Math.sqrt(x * x + y * y + z * z + w * w);\n\t}", "public double getFeatureSize() {\n\t\t\treturn featureDensity.length;\n\t\t}", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public int getSize() {\n return rows * cols;\n }", "public String getSize() {\r\n return size;\r\n }", "public double getWidthInInches()\n {\n return width;\n }", "public double getOutputSizeInBytes()\n {\n return totalSize;\n }", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "public final int getSize() {\n return size;\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public native float kbGetMapXSize();", "public static int getMapHeight() {\r\n\t\treturn 7;\r\n\t}", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }" ]
[ "0.73888737", "0.72907484", "0.7243793", "0.7236129", "0.720857", "0.7110622", "0.7058024", "0.7038073", "0.70243645", "0.6945528", "0.69386125", "0.6898892", "0.6884472", "0.6858033", "0.68542546", "0.682452", "0.68004763", "0.67877036", "0.6786768", "0.6757076", "0.6737117", "0.6733596", "0.6724938", "0.66933435", "0.6659017", "0.66570014", "0.66536796", "0.6648442", "0.6629781", "0.66177964", "0.66157156", "0.6602107", "0.6592876", "0.6589422", "0.6584896", "0.65824664", "0.65808034", "0.65370506", "0.65360534", "0.65306306", "0.6510614", "0.6503294", "0.64864546", "0.6481531", "0.64810234", "0.647529", "0.64671534", "0.6460916", "0.6459777", "0.6458185", "0.64498067", "0.6445703", "0.64297396", "0.6425058", "0.6419331", "0.64072347", "0.64068574", "0.63889194", "0.6384413", "0.6382291", "0.6364074", "0.63602227", "0.6358067", "0.6357951", "0.6356047", "0.6356047", "0.6356047", "0.6356047", "0.6343237", "0.63187385", "0.63120556", "0.63040435", "0.6303931", "0.63028955", "0.6298717", "0.6287509", "0.6286729", "0.62810695", "0.62772566", "0.6274296", "0.6273831", "0.62711924", "0.626171", "0.626171", "0.6255542", "0.62495047", "0.62450933", "0.62424606", "0.62391067", "0.62391067", "0.6227132", "0.6219435", "0.62186486", "0.6217938", "0.62176585", "0.62132084", "0.6212904", "0.6209539", "0.62036383", "0.6191435" ]
0.81284297
0
TODO Autogenerated method stub
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.cold_tab, container, false); TextView textView = (TextView)view.findViewById(R.id.textView1); s1="The common cold is a viral infection of your upper respiratory tract — your nose and throat. Most people recover from a common cold in about a week or two. If symptoms don't improve, see your doctor."; textView.setText(s1); return view; }
{ "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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
need to reset the loader too because otherwise it will think the image is still loaded.
public void onRecycled() { imageLoader.resetLoadState(); UIHelper.recycleImageViewContent(mImageView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n //mLoader.reset();\n start();\n }", "@Override\n\tpublic void onLoaderReset(Loader<ContentResponse> loader) {\n\t\t\n\t}", "@Override\n\tpublic void onLoaderReset(Loader<ContentResponse> loader) {\n\t\t\n\t}", "@Override\n public void onLoaderReset(Loader<ArrayList<Movie>> loader) {\n }", "protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }", "@Override\n public void onLoaderReset(Loader<List<Link>> loader) {\n }", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> loader) {\n\n\t}", "@Override\r\n\tpublic void onLoaderReset(Loader<Cursor> mLoader) {\n\t\t\r\n\t}", "@Override public void onLoaderReset(Loader<Cursor> loader) {\n\t\t}", "@Override\n protected void onReset() {\n // Ensure the loader has been stopped.\n onStopLoading();\n // At this point we can release the resources.\n if (mCursor != null) {\n ReleaseResources(mCursor);\n mCursor = null;\n }\n }", "protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }", "public void setImageLoader(ImageLoader imageLoader) {\n/* 248 */ this.loader = imageLoader;\n/* */ }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n\n\n }", "@Override\n public void onLoaderReset(Loader<List<Pokemon>> loader) {\n mAdapter.clear();\n }", "@Override\n public void onLoaderReset(@NonNull Loader<Cursor> loader) {\n\n }", "private ImageLoader() {}", "@Override\n public void onLoaderReset(Loader<Cursor> arg0) {\n\n }", "@Override\n public void onLoaderReset(Loader<Cursor> arg0) {\n\n }", "@Override\n public void onLoaderReset(Loader<List<TutorialModel>> loader) {\n mTutorialAdapter.clear();\n progressDialog.toggleDialog(false);\n }", "@Override\n\tpublic void onReset() {\n\t\tonStopLoading();\n\n\t\t// At this point we can release the resources associated with 'mData'.\n\t\tif (mData != null) {\n\t\t\tonReleaseResources(mData);\n\t\t\tmData = null;\n\t\t}\n\t\t// The Loader is being reset so we need to unregister Observer\n\t\tunregisterObserver();\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader)\n {\n// mFlavorAdapter.swapCursor(null);\n }", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release resources\n if( mData != null ) {\n releaseResources( mData );\n mData = null;\n }\n\n // The loader is being reset, so we should stop monitoring for changes\n if( mObserver != null ) {\n resolver.unregisterContentObserver( mObserver );\n mObserver = null;\n }\n }", "@Override\n public void onLoaderReset(Loader<List<EarthQuake>> loader) {\n updateUI(null,\"No earthQUakeFound\");\n\n }", "@Override\n public void onLoaderReset(Loader<Cursor> arg0) {\n\n\n }", "@Override\n\tpublic void refresh(){\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "@Override \n\t protected void onReset() {\n\t super.onReset();\n\n\t // Ensure the loader is stopped\n\t onStopLoading();\n\t \n\t mChildList = null;\n\t }", "@Override \n\t protected void onReset() {\n\t super.onReset();\n\n\t // Ensure the loader is stopped\n\t onStopLoading();\n\t \n\t mChildList = null;\n\t }", "@Override\n public void onLoaderReset(Loader<List<VehiclesTotalRunningCosts>> loader) {\n /*\n * We aren't using this method in this application, but we are required to Override\n * it to implement the LoaderCallbacks<List<DashboardReviewsListItem>> interface\n */\n }", "public static void initImageLoader() {\n }", "public void reload() {\n mHandle = new Texture(mBitmap, mMinMode, mMagMode, mWrapS, mWrapT).getHandle();\n }", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (imageLoader != null) {\n\t\t\timageLoader.clearMemoryCache();\n\t\t}\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mSubredditsAdapter.swapCursor(null);\n }", "@Override\n public void onLoaderReset(Loader<ArrayList<Reviews>> loader) {\n\n }", "@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n imageViewUIL.setImageBitmap(loadedImage);\n imageViewUIL.setAnimation(anim);\n }", "@Override\n public void onLoaderReset(Loader<Cursor> cursorLoader) {\n // Nothing to do here\n }", "@Override\n public void onLoaderReset(Loader<ArrayList<SingleMovieReview>> loader) {\n Log.i(LOG_TAG, \"onLoaderReset\");\n mAdapterR = new MovieReviewsAdapter(reviewsList);\n }", "private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "@Override\n public void onLoaderReset(Loader<List<StockPicking>> loader) {\n mAdapter.clear();\n }", "@Override\n public void onLoaderReset(Loader<List<EarthQuake>> loader) {\n mAdapter.clear();\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader){\r\n //mDetailCursor = null;\r\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader) {\n mLocationCursor.close();\r\n mLocationCursor = null;\r\n }", "public void onLoaderReset(Loader<List<Book>> loader) {\n mAdapter.clear();\n }", "@Override\n public void onLoaderReset(Loader<ArrayList<NewsItem>> loader) {\n newsAdapter.clear();\n }", "@Override\n\tpublic void onLoaderReset(Loader<List<NewsEntry>> arg0)\n\t{\n\t\t\n\t}", "@Override\n protected void onReset() {\n super.onReset();\n\n // Ensure the loader is stopped\n onStopLoading();\n\n // At this point we can release the resources associated with 'apps' if needed.\n if (mData != null) {\n onReleaseResources(mData);\n mData = null;\n }\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n // Clear the Cursor we were using with another call to the swapCursor()\n adapter.swapCursor(null);\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader) {\n\r\n }", "@Override\n public void onLoaderReset(Loader loader) {\n mAdapter.swapCursor(null);\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n this.goalAdapter.swapCursor(null);\n }", "@MainThread\n @Override\n protected void onReset() {\n super.onReset();\n\n onStopLoading();\n\n releaseResources(mResult);\n mResult = null;\n\n doProgressSafe(false);\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader) {\n mCursorAdapter.swapCursor(null);\r\n\r\n }", "public void onLoaderReset(Loader<Cursor> loader) {\n awardsGridViewAdapter.swapCursor(null);\n }", "public void setLoader(Loader loader)\r\n {\r\n _loader = loader;\r\n }", "public void run() {\n sight.setImageBitmap(bmp);\n // old = null;\n }", "@Override\n public void onLoaderReset(Loader<List<Book>> loader) {\n mAdapter.clear();\n }", "public CoreImageHandler() {\n loaded = new ConcurrentHashMap<URL, CoreImage>();\n }", "void onLoaderFinished();", "@Override\n public void onLoaderReset(Loader<ArrayList<Book>> loader) {\n adapter.clear();\n Log.i(LOG_TAG,\"onLoaderReset\");\n }", "private void loadNormal(Context ctx, ImageLoader img) {\r\n RequestOptions options = getCommonOptions(img);\r\n\r\n Glide.with(ctx).load(img.getUrl()).apply(options).into(img.getImgView());\r\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mPurseAdapter.swapCursor(null);\n }", "public void clearScriptPath() {\r\n loader = null;\r\n }", "@Override\n public void onLoaderReset(android.support.v4.content.Loader loader) {\n adapter.swapCursor(null);\n }", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> loader) {\n\t\tsetListAdapter(null);\n\t}", "@Override\r\n public void onLoaderReset(Loader<List<News>> loader) {\n mAdapter.clear();\r\n }", "@Override\n\tpublic void onPrepareLoad(Drawable arg0) {\n\t\t\n\t}", "private void initialBuild() {\n hiddenButton = new JToolButton(\"If you see me, we're screwed\", false);\n\n buttonGroup = new ButtonGroup();\n buttonGroup.add(hiddenButton);\n\n // create the loading image\n FileLoader fileLookup = new FileLoader(1);\n Toolkit tk = getToolkit();\n\n // lookup the folder image so it will be in the cache already\n try {\n Object[] iconURL = fileLookup.getFileURL(FOLDER_IMAGE); \n \n //now process the raw data into a buffer\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n byte[] buf = new byte[1024];\n for (int readNum; (readNum = ((InputStream)iconURL[1]).read(buf)) != -1;) {\n bos.write(buf, 0, readNum); \n }\n byte[] bytes = bos.toByteArray(); \n InputStream in = new ByteArrayInputStream(bytes);\n folderImage = javax.imageio.ImageIO.read(in); \n\n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n\n\n // lookup the loading image so it will be in the cache\n try {\n \n Object[] iconURL = fileLookup.getFileURL(LOADER_IMAGE);\n loadingImage = new ImageIcon((java.net.URL)iconURL[0]);\n \n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n \n // lookup the not found image so it will be in the cache\n try {\n Object[] iconURL = fileLookup.getFileURL(NOT_FOUND_IMAGE);\n \n //now process the raw data into a buffer\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n byte[] buf = new byte[1024];\n for (int readNum; (readNum = ((InputStream)iconURL[1]).read(buf)) != -1;) {\n bos.write(buf, 0, readNum); \n }\n byte[] bytes = bos.toByteArray(); \n InputStream in = new ByteArrayInputStream(bytes);\n notFoundImage = javax.imageio.ImageIO.read(in); \n \n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n\n addToolGroup(rootToolGroup);\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mCursorAdapter.swapCursor(null);\n }", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> arg0) {\n\t // This is called when the last Cursor provided to onLoadFinished()\n\t // above is about to be closed. We need to make sure we are no\n\t // longer using it.\n\t\tmForecastAdapter.swapCursor(null); // Release previous cursor so can be properly handled\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mAdapter.swapCursor(null);\n }", "@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n\n MemoryCache cache = ImageLoader.getInstance().getMemoryCache();\n cache.put(imageUri, loadedImage);\n holder.img.setImageBitmap(loadedImage);\n }", "protected abstract Image loadImage();", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> loader) {\n\t\tmAdapter.swapCursor(null);\n\t}", "public void loadImage() {\n\t\ttry {\n\t\t\tcurrImage = ImageIO.read(new File(INPUT_DIR,fileNames.get(fileCounter)));\n\t\t\tcurrImageOrigDim = new Dimension(currImage.getWidth(), currImage.getHeight());\n\t\t\tlabel4.setText(\"Processing: \" + fileNames.get(fileCounter));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Resize to Frame\n\t\tdouble imgHt = currImage.getHeight();\n\t\tdouble imgWt = currImage.getWidth();\n\t\tdouble wRatio = FRAME_SIZE/imgWt;\n\t\tdouble hRatio = FRAME_SIZE/imgHt;\n\t\taspectR = Math.min(wRatio,hRatio);\n\t\tcurrImage = getScaledInstance(currImage, (int)(aspectR*imgWt), (int)(aspectR*imgHt));\n\t\tcurrImageBounds = new Rectangle(0, 0, currImage.getWidth(), currImage.getHeight());\n\t\trepaint();\n\t}", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release the resources associated with 'mData'.\n if (mData != null) {\n releaseResources(mData);\n mData = null;\n }\n }", "@Override\r\n\t\tpublic void onLoaderReset(android.content.Loader<List<User>> arg0) {\n\t\t\t\r\n\t\t}", "public void preload() {\n\t\ttry {\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\",\n\t\t\t\t\tResourceLoader.getResourceAsStream(file));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tloaded = true;\n\t}", "@Override\n public void onDocumentFinish() {\n if (mImageLoader != null) {\n mImageLoader.clearResources();\n }\n }", "public void onLoaderReset(Loader<Cursor> arg0) {\n \t adapter.swapCursor(null);\n \t\t\n \t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n adapter.swapCursor(null);\n }", "@Override\r\n\t\t\t\tpublic void onLoadCompleted(PhotoView arg0,\r\n\t\t\t\t\t\tString arg1, Bitmap arg2,\r\n\t\t\t\t\t\tBitmapDisplayConfig arg3, BitmapLoadFrom arg4) {\n\t\t\t\t\tspinner.setVisibility(View.GONE);\r\n\t\t\t\t\targ0.setImageBitmap(arg2);\r\n\t\t\t\t}", "protected void onStartLoading() { forceLoad();}", "private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void loadStateImages() {\n\t\tif (imageFilename[0][0] != null)\n\t\t\tthis.addStateImage(imageFilename[0][0], 0, 0);\n\t\tif (imageFilename[0][1] != null)\n\t\t\tthis.addStateImage(imageFilename[0][1], 1, 0);\n\t\tif (imageFilename[1][0] != null)\n\t\t\tthis.addStateImage(imageFilename[1][0], 0, 1);\n\t\tif (imageFilename[1][1] != null)\n\t\t\tthis.addStateImage(imageFilename[1][1], 1, 1);\n\t}", "@Override\n public void onLoaderReset(@NonNull Loader<List<newslist>> loader) {\n mAdapter.clear();\n }", "@Override\r\n public void onLoaderReset(Loader<List<NewsList>> loader) {\n adapter.clear();\r\n }", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}", "public void onLoadFinished(Loader<Boolean> loader, Boolean bool) {\n this.f3014d.setEnabled(false);\n m();\n if (this.f3011a) {\n Toast.makeText(this, R.string.toast_removed_from_virus_white_list, 0).show();\n }\n }", "public void imageLoader(File file)\n{\n float ratio;\n if (file == null)\n {\n return;\n } else\n {\n try\n {\n PImage img = loadImage(file.getAbsolutePath());\n //if(img.width < 300)\n //{\n // img.resize(300,img.height);\n // if(img.height/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n //if(img.height < 300)\n //{\n // img.resize(img.width, 300);\n // if(img.width/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n if(img.height/((float)img.width)>3)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.width*2.5f));\n }\n if(img.height/((float)img.width)<0.25f)\n {\n ratio = 1.0f;\n if(img.height < 400)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.height*2.5f),(int)(ratio*img.height));\n }\n if(img.width < 400 || img.height < 400)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n if(img.height < 400 && img.height < img.width)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.height));\n }\n m.getInputImageManager().setImage(img);\n m.getInputImageManager().setResizedImage(m.getInputImageManager().resizeToFit(img, width-150, height-20));\n if(m.getOutputImageManager().getMosaic()!= null)\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getOutputImageManager().getMosaic().getLastSeenImage(), m.getOutputImageManager().getMosaic().getTiles());\n }\n else\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getInputImageManager().getImage(), m.getTileManager().getTiles());\n }\n m.getOutputImageManager().getMosaic().setMiniatures();\n }\n catch(NullPointerException e)\n {\n println(e);\n }\n }\n}", "void onLoaderLoading();", "public void unloaded(){\n\t\tloaded=false;\n\t}", "@Override\r\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n \tLog.v(\"catch\",view+\"\");\r\n \ttry{\r\n if (loadedImage != null && view!=null) { \r\n ImageView imageView = (ImageView) view; \r\n // imageView.setImageBitmap(loadedImage);\r\n // 是否第一次显示 \r\n boolean firstDisplay = !displayedImages.contains(imageUri); \r\n if (firstDisplay) { \r\n // 图片淡入效果 \r\n FadeInBitmapDisplayer.animate(imageView, 800); \r\n displayedImages.add(imageUri); \r\n \r\n/* \t ViewGroup.LayoutParams params = imageView.getLayoutParams(); \r\n \t params.height =loadedImage.getHeight(); \r\n \t ((MarginLayoutParams)params).setMargins(10, 10, 10, 10);\r\n \t imageView.setLayoutParams(params);*/ \r\n } \r\n } \r\n \t}catch(Exception e){\r\n \t\tLog.v(\"catch1\",e.getMessage());\r\n \t}\r\n }", "@Override\n\t\t\t\t\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\t\t \t\t\t\tDrawable drawable = iv_details_poster.getDrawable();\n\t\t \t\t\t\tBitmap bitmap = ImageUtil.drawableToBitmap(drawable);\n\t\t \t\t\t\tBitmap bit = Reflect3DImage.skewImage(bitmap, 60);\n\t\t \t\t\t\tiv_details_poster.setImageBitmap(bit);\n\t\t\t\t\t\t}", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release the resources associated with 'mData'.\n if (mResult != null) {\n mResult = null;\n }\n\n }", "void onLocationChanged()\n\t{\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mNameEditText.setText(\"\");\n mDescriptionEditText.setText(\"\");\n mPriceEditText.setText(\"\");\n mQuantityEditText.setText(\"\");\n mImageView.setImageDrawable(null);\n\n }", "public void clearLoadingPanel(){\n this.loadingPanel.clear();\n }", "@Override\n protected void onReset() {\n super.onReset();\n // Ensure the loader is stopped\n onStopLoading();\n // At this point we can release the resources associated with 'apps'\n // if needed.\n if (mData != null) {\n onReleaseResources(mData);\n mData = null;\n }\n unregisterObserver();\n }", "private void loadImage(){\n Log.d(getString(R.string.app_name), \"photoURL: \" + photoURL);\n String hash = photoURL.substring(0, photoURL.lastIndexOf(\".\"));\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(hash.getBytes());\n hash = bytesToHex(md.digest());\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n// File cachedFile = new File(getCacheDir(), photoURL.substring(0, photoURL.lastIndexOf(\".\")));\n File cachedFile = new File(getCacheDir(), hash);\n if(cachedFile.exists()) {\n //load image from cache\n Glide.with(getApplicationContext())\n .load(cachedFile)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n// .crossFade()\n .into(picture);\n// TileBitmapDrawable.attachTileBitmapDrawable(picture, getCacheDir() + \"/\" + photoURL.split(\"\\\\.\")[0], null, null);\n setupPictureClickListener();\n\n postImageLoaded();\n } else {\n //download image\n setupReloadButtonListener();\n initImageLoader();\n }\n }", "public void updateLayer() {\n bufferedImage = null;\n repaint();\n panelResized();\n }", "@Override\n\t\t\t\t\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t \t\t\t\tDrawable drawable = iv_details_poster.getDrawable();\n\t\t \t\t\t\tBitmap bitmap = ImageUtil.drawableToBitmap(drawable);\n\t\t \t\t\t\tBitmap bit = Reflect3DImage.skewImage(bitmap, 60);\n\t\t \t\t\t\tiv_details_poster.setImageBitmap(bit);\n\t\t\t\t\t\t}" ]
[ "0.7104945", "0.7096418", "0.7096418", "0.7092767", "0.7078348", "0.7047718", "0.6975965", "0.68957627", "0.6893821", "0.6836298", "0.6786924", "0.6676495", "0.66292596", "0.6570703", "0.65568006", "0.6555143", "0.6552963", "0.6552963", "0.6551529", "0.6529917", "0.6512223", "0.65081096", "0.6507881", "0.6498079", "0.6493237", "0.6458724", "0.6458724", "0.6445192", "0.6402375", "0.6402358", "0.6392521", "0.63791305", "0.63717234", "0.63673556", "0.63519776", "0.6342298", "0.6331883", "0.63316363", "0.6314662", "0.6308193", "0.6300253", "0.6290492", "0.6288089", "0.6274761", "0.62744564", "0.6267806", "0.6266627", "0.6262989", "0.6257337", "0.6254369", "0.6239887", "0.62376535", "0.62236106", "0.6210313", "0.620332", "0.6196612", "0.6195162", "0.61896527", "0.6188286", "0.6187698", "0.61756104", "0.616387", "0.615817", "0.61559594", "0.61507034", "0.6147984", "0.61377263", "0.6137447", "0.61374265", "0.61344135", "0.6133226", "0.61252457", "0.61249274", "0.61231595", "0.61128014", "0.6099276", "0.60932934", "0.6088926", "0.6081336", "0.6059009", "0.60544056", "0.6052725", "0.6051484", "0.6043517", "0.6040691", "0.6029449", "0.60166645", "0.6014865", "0.60118484", "0.60110396", "0.60095185", "0.6002204", "0.5998547", "0.59984034", "0.5997561", "0.59922236", "0.5983464", "0.59823656", "0.5981352", "0.59790635", "0.5974915" ]
0.0
-1
Inflate the view for this view holder
@Override public ReviewHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater myInflater = LayoutInflater.from(parent.getContext()); View thisItemsView = myInflater.inflate(R.layout.review_list_item_layout, parent, false); return new ReviewHolder(thisItemsView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_detail, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.information_view, container, false);\n mFillContentCallback.invoke(view);\n\n return view;\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n Fabric.with(getContext(), new Crashlytics());\r\n View view = inflater.inflate(R.layout.fragment_open_ticket_general_enquiries_department, container, false);\r\n unbinder = ButterKnife.bind(this, view);\r\n\r\n\r\n intialize();\r\n return view;\r\n }", "public ViewHolder(View view) {\n super(view);\n mView = view;\n mIdView = (TextView) view.findViewById(R.id.id);\n mContentView = (TextView) view.findViewById(R.id.content);\n mIconView = (ImageView) view.findViewById(R.id.browserIcon);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View itemView = inflater.inflate(R.layout.fragment_weather_5_day, container, false);\n\n unbinder = ButterKnife.bind(this, itemView);\n\n getForecastInfo();\n\n return itemView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n configGlobals();\n configView(inflater, container);\n configRecycler();\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}", "public ViewHolder(View view) {\n super(view);\n mView = view;\n mIdView = (TextView) view.findViewById(R.id.item_number);\n mContentView = (TextView) view.findViewById(R.id.content);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView mInfoView = (View) inflater.inflate(R.layout.layout_infopager,\r\n\t\t\t\tcontainer, false);\r\n\t\ttvInfoContent = (TextView) mInfoView.findViewById(R.id.tv_meetinginfo);\r\n\t\treturn mInfoView;\r\n\t}", "public ViewHolder(View itemView) {\n super(itemView);\n tvNature = (TextView)itemView.findViewById(R.id.item_name);\n tvAmountNature = (TextView)itemView.findViewById(R.id.item_amount);\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView Ename = (TextView) view.findViewById(R.id.Ename);\n TextView Designation = (TextView) view.findViewById(R.id.Designation);\n TextView Salary = (TextView) view.findViewById(R.id.Salary);\n // Extract properties from cursor\n String ename = cursor.getString(cursor.getColumnIndexOrThrow(\"ename\"));\n String designation = cursor.getString(cursor.getColumnIndexOrThrow(\"designation\"));\n int salary = cursor.getInt(cursor.getColumnIndexOrThrow(\"salary\"));\n\n ImageView imgView =(ImageView)view.findViewById(R.id.ImageView01);\n\n\n imgView.setImageResource(R.drawable.ic_launcher);\n\n\n\n\n\n // Populate fields with extracted properties\n Ename.setText(ename);\n Designation.setText(designation);\n Salary.setText(String.valueOf(salary));\n }", "private View creatView(ViewGroup parent) {\n\t\tView convertView;\n\t\tViewHolder vh = new ViewHolder();\n\t\tconvertView = LayoutInflater.from(mContext).inflate(R.layout.message_function_layout, parent, false);\n\t\tvh.mImageView = (ImageView)convertView.findViewById(R.id.message_function_btn);\n\t\tvh.mTextView = (TextView)convertView.findViewById(R.id.message_function_name);\n\t\tconvertView.setTag(vh);\n\t\treturn convertView;\n\t}", "@Override\n public void prepareView() {\n }", "public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bus_single_item_shop, container, false);\n\n\n AndroidSupportInjection.inject(this);\n ButterKnife.bind(this, view);\n\n //TODO take care of the progressBar\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_actuator_info, container, false);\n ButterKnife.bind(this, view);\n mContext = getActivity().getApplicationContext();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tower_parameter, container, false);\n bind = ButterKnife.bind(this,view);\n EventBus.getDefault().register(this);\n initRecycleView();\n initView();\n initRotationAngle();\n initHookup();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_info, container, false);\n ButterKnife.bind(this, view);\n textViewAuthor.setText(photoItem.getAuthorName());\n buttonInfoClose.setOnClickListener(button -> {\n listener.onInfoClosePress();\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_incident_description, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_show_info, container, false);\n ButterKnife.bind(this,view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_important_information, container, false);\n ButterKnife.bind(this, view);\n\n presenter.getViewElements();\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.read_layout,container,false);\n mContext = view.getContext();\n if(readPresenter ==null)\n readPresenter = new ReadPresenter(getContext(),this);\n initUI(view);\n return view;\n\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onCreateView---------\");\n\t\tview = inflater.inflate(getContentViewId(),container,false);\n\t\tunbinder = ButterKnife.bind(this,view);\n\t\tinitView(savedInstanceState);\n\t\treturn view;\n\t}", "public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ItemDetailBinding binding = DataBindingUtil.inflate(inflater,\n R.layout.fragment_entry_detail,\n container,\n false);\n TensionEntryVM tvm = new TensionEntryVM(new TensionEntryEntity(),\n ((App) getActivity().getApplication()).getDaoSession());\n binding.setVm(tvm);\n View view = binding.getRoot();\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_che_yuan_list, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n\tprotected BaseViewHolder<JSONObject> getHolderView(View layout) {\n\t\treturn new HolidayMealsViewHolder(layout);\n\t}", "public ViewHolder(View view) {\n super(view);\n mView = view;\n mTextviewTeamNumber = (TextView) view.findViewById(R.id.textviewTeamNumber);\n mImageViewTeamLogo = (ImageView) view.findViewById(R.id.imageViewTeamLogo);\n mTextViewTeamName = (TextView) view.findViewById(R.id.textViewTeamName);\n mTextViewPlayedGameNumber = (TextView) view.findViewById(R.id.textViewPlayedGameNumber);\n mTextViewTotalPoint = (TextView) view.findViewById(R.id.textViewTotalPoint);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_other_collect, container, false);\n ButterKnife.bind(this, view);\n getData();\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_image, container, false);\n ButterKnife.bind(this, view);\n\n Glide.with(view).load(imageUrl).into(imageViewDetails);\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n\t\tmBinding = DataBindingUtil.inflate(inflater, R.layout.fg_news_ent, container, false);\n\n\t\tinitView();\n\t\treturn mBinding.getRoot();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_lcl_detail, container, false);\n ButterKnife.bind(this,view);\n initView();\n return view;\n }", "@Nullable\n @Override\n @CallSuper\n public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) {\n View view = getView();\n if (view == null) {\n view = inflater.inflate(getContentLayout(), container, false);\n }\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.weather_frag, container, false);\n //Initiate all of my textviews to populate them with the data we receive from the JSON object\n cF = (TextView)rootView.findViewById(R.id.city_field);\n uF = (TextView)rootView.findViewById(R.id.updated_field);\n dF = (TextView)rootView.findViewById(R.id.details_field);\n cTF = (TextView)rootView.findViewById(R.id.current_temperature_field);\n wI = (TextView) rootView.findViewById(R.id.weather_icon);\n\n layout = (RelativeLayout) rootView.findViewById(R.id.weatherbackground);\n\n wI.setTypeface(wF);\n\n Toolbar toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar);\n TextView mTitle = (TextView) toolbar.findViewById(R.id.toolbar_title);\n mTitle.setText(\"Weather\");\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "@Override\n\tpublic View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n\t Bundle savedInstanceState) {\n\t\tView rootView = inflater.inflate(R.layout.fragment_info_listview, container, false);\n\t\tButterKnife.bind(this, rootView);\n\t\treturn rootView;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.description_booth_details, container, false);\n\t\t\n\t\tmBoothNameView = (TextView) view.findViewById(R.id.description_details_location);\n\t\tmBoothImageView = (ImageView) view.findViewById(R.id.description_details_image);\n\t\tmBoothContactEmailView = (TextView) view.findViewById(R.id.description_details_contact_email);\n\t\tmBoothContactWebsiteView = (TextView) view.findViewById(R.id.description_details_contact_website);\n\t\tmBoothTagListView = (TagListView) view.findViewById(R.id.description_details_tag_list);\n\t\tmBoothDescriptionView = (WebView) view.findViewById(R.id.description_details_description_content);\n\t\tmBoothDescriptionView.getSettings().setBuiltInZoomControls(true);\n\t\t\n\t\treturn view;\n\t}", "public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n\n /* designation_txt = (TextView) itemView.findViewById(R.id.designation_txt);\n name_txt = (TextView) itemView.findViewById(R.id.name_txt);\n number_txt = (TextView) itemView.findViewById(R.id.number_txt);*/\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_data_visible, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n String placeId = getArguments().getString(\"placeId\");\n final View itemView = inflater.inflate(R.layout.place_card, container, false);\n PlaceController.getPlace(placeId, this);\n cardView = itemView.findViewById(R.id.placeCard);\n placeName = itemView.findViewById(R.id.placeName);\n openingStatus = itemView.findViewById(R.id.openingStatus);\n lastUpdated = itemView.findViewById(R.id.lastUpdatedInfo);\n occupancyBar = itemView.findViewById(R.id.occupancyCircular);\n trackingSwitch = itemView.findViewById(R.id.trackSwitch);\n itemView.setVisibility(View.INVISIBLE);\n return itemView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_art, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (InitializeDineOrderActivity) getActivity();\n View view = inflater.inflate(R.layout.fragment_items_added_success, container, false);\n unbinder = ButterKnife.bind(this, view);\n //animate(imageView);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_summary_lkp, container, false);\n\n ButterKnife.bind(this, view);\n\n return view;\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.activity_person_info, container, false);\n }", "private void inflateViewForItem(Item item) {\n\n //Inflate Layout\n ItemCardBinding binding = ItemCardBinding.inflate(getLayoutInflater());\n\n //Bind Data\n binding.imageView.setImageBitmap(item.bitmap);\n binding.title.setText(item.label);\n binding.title.setBackgroundColor(item.color);\n\n //Add it to the list\n b.list.addView(binding.getRoot());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_detail_jadwal_dokter, container, false);\n initView();\n tampilDataDetail();\n return view;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mTvMain = (TextView) findViewById(R.id.tv_main);\n this.mTvSub = (TextView) findViewById(R.id.tv_second);\n this.mIvIcon = (ImageView) findViewById(R.id.iv_icon);\n this.mIvIcon.setVisibility(8);\n this.mTvSub.setMovementMethod(ScrollingMovementMethod.getInstance());\n }", "public ViewHolder(View rootView) {\n super(rootView);\n tvCityName = (TextView) rootView.findViewById(R.id.tv_view_city_list_item_city_name);\n }", "@NonNull\n View buildView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent);", "public ViewHolder(View itemView) {\n tvGrupo = (TextView) itemView.findViewById(R.id.tvGrupo);\n tvNCD = (TextView) itemView.findViewById(R.id.tvNCD);\n tvACD = (TextView) itemView.findViewById(R.id.tvACD);\n ivCD = (ImageView) itemView.findViewById(R.id.ivCD);\n }", "protected void setupView(Context context, final ViewGroup parent) {\n\n\t\tLayoutInflater inflater = (LayoutInflater) context\n\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflater.inflate(R.layout.map_popup_layout, parent);\n\t\timage = (ImageView) v.findViewById(R.id.statusImgOnMAP);\n\t\tBitmap weatherImg = UtilityFunctions.StringToBitMap(\"\");\n\t\tif(weatherImg!=null)\n\t\t\timage.setImageBitmap(weatherImg);\n\t\theader = (TextView) v.findViewById(R.id.locationHeaderOnMap);\n\t\ttitle1 = (TextView) v.findViewById(R.id.descripOnMap);\n\t\ttitle2 = (TextView) v.findViewById(R.id.dateOnMap);\n\t\ttitle3 = (TextView) v.findViewById(R.id.minTempOnMapValue);\n\t\ttitle4 = (TextView) v.findViewById(R.id.maxTempOnMapValue);\n\n\t}", "private void initView(Context context) {\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0);\n\t\tmContainer = (LinearLayout)LayoutInflater.from(context).inflate(R.layout.pullable_refresh, null);\n\t\taddView(mContainer, params);\n\t\tsetGravity(Gravity.BOTTOM);\n\t\t\n\t\trefreshArrowView = (ImageView)findViewById(R.id.pull_down_arrow);\n\t\trefreshingView = (ImageView)findViewById(R.id.pull_down_refreshing_view);\n\t\trefreshStateTextView = (TextView)findViewById(R.id.pull_down_state_text);\n\t\t\n\t\trotateAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.reverse_anim);\n\t\trefreshingAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.rotating);\n\t\tLinearInterpolator lir = new LinearInterpolator();\n\t\trotateAnimation.setInterpolator(lir);\n\t\trefreshingAnimation.setInterpolator(lir);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_trending, container, false);\n unbinder = ButterKnife.bind(this, view);\n setUnBinder(unbinder, view);\n trendingPresenter = new TrendingPresenter(getContext(), this);\n setUp(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_bao_yang_scx, container, false);\n unbinder = ButterKnife.bind(this, view);\n init();\n }\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = getThisView(inflater,container);\n return view;\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n\n //'this' refers to the LinearLayout, cause we are currently in LinearLayout\n\n //access the day UI element\n mTextDate = (TextView) this.findViewById(R.id.tv_day);\n\n //access the month UI element\n mTextMonth = (TextView) this.findViewById(R.id.tv_month);\n\n //access the year UI element\n mTextYear = (TextView) this.findViewById(R.id.tv_year);\n\n //setOnTouchListener on the UI elements\n\n mTextDate.setOnTouchListener(this);\n mTextMonth.setOnTouchListener(this);\n mTextYear.setOnTouchListener(this);\n\n //get the current date from the Calendar\n int date = mCalendar.get(Calendar.DATE);\n\n //get current month\n int month = mCalendar.get(Calendar.MONTH);\n\n //get current year\n int year = mCalendar.get(Calendar.YEAR);\n\n //pass the date, month and year to update method which will update the UI\n update(date, month, year, 0, 0, 0);\n\n\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n tv_slider_icon = (TextView) findViewById(R.id.slider_icon);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) {\n mRootView = inflater.inflate(R.layout.fragment_player, container, false);\n\n // find views for station name and image and playback indicator\n mStationNameView = (TextView) mRootView.findViewById(R.id.player_textview_stationname);\n mStationMetadataView = (TextView) mRootView.findViewById(R.id.player_textview_station_metadata);\n mStationImageView = (ImageView) mRootView.findViewById(R.id.player_imageview_station_icon);\n mPlaybackIndicator = (ImageView) mRootView.findViewById(R.id.player_playback_indicator);\n mStationMenuView = (ImageButton) mRootView.findViewById(R.id.player_item_more_button);\n\n // add listener to station info view for clipboard copy\n View stationInfoView = mRootView.findViewById(R.id.player_layout_station_info);\n stationInfoView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n copyToClipboard(COPY_STATION_ALL);\n }\n });\n\n // get views for station data sheet\n View stationDataLayout = mRootView.findViewById(R.id.info_icon_layout);\n mStationDataSheet = mRootView.findViewById(R.id.station_data_sheet);\n mStationDataSheetNameLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_name_layout);\n mStationDataSheetMetadataLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_metadata_layout);\n mStationDataSheetStreamUrlLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_stream_url_layout);\n mStationDataSheetName = (TextView) mRootView.findViewById(R.id.station_data_sheet_name);\n mStationDataSheetMetadata = (TextView) mRootView.findViewById(R.id.station_data_sheet_metadata);\n mStationDataSheetStreamUrl = (TextView) mRootView.findViewById(R.id.station_data_sheet_stream_url);\n mStationDataSheetMimeTypeLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_mime_type_layout);\n mStationDataSheetChannelCountLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_channel_count_layout);\n mStationDataSheetSampleRateLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_sample_rate_layout);\n mStationDataSheetBitRateLayout = (LinearLayout) mRootView.findViewById(R.id.station_data_sheet_bitrate_layout);\n\n // set up and show station data sheet\n mStationDataSheetBehavior = BottomSheetBehavior.from(mStationDataSheet);\n mStationDataSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n mStationDataSheetBehavior.setBottomSheetCallback(getStationDataSheetCallback());\n stationDataLayout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (mStationDataSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {\n mStationDataSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n } else {\n mStationDataSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n }\n }\n });\n\n // attach listeners (for clipboard copy)\n mStationDataSheetMetadataLayout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // copy station metadata to clipboard\n copyToClipboard(COPY_STATION_METADATA);\n mStationDataSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n }\n });\n mStationDataSheetStreamUrlLayout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // copy stream URL to clipboard\n copyToClipboard(COPY_STREAM_URL);\n mStationDataSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n }\n });\n\n // initially hide additional metadata views\n mStationMetadataView.setVisibility(View.GONE);\n mStationDataSheetMetadataLayout.setVisibility(View.GONE);\n\n // screen-specific adjustments\n if (mTwoPane) {\n // show three dots menu in tablet mode\n mStationMenuView.setVisibility(View.VISIBLE);\n // attach three dots menu\n mStationMenuView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mActivity, view);\n popup.inflate(R.menu.menu_list_list_item);\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n return handleMenuClick(item, false);\n }\n });\n popup.show();\n }\n });\n } else {\n mActivity.setTitle(R.string.title_fragment_player);\n }\n\n // construct big playback button\n mPlaybackButton = (ImageButton)mRootView.findViewById(R.id.player_button_playback);\n mPlaybackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // handle tap on big playback button\n handlePlaybackButtonClick();\n }\n });\n\n return mRootView;\n }", "public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n\n EmpirePortrait= (ImageView) itemView.findViewById(R.id.EmpirePortrait);\n nameTextView = (TextView) itemView.findViewById(R.id.EmpireName);\n deleteButton = (ImageButton) itemView.findViewById(R.id.EmpireDelete);\n FlagView = (ImageView) itemView.findViewById(R.id.EmpireFlag);\n ViewButton = (Button) itemView.findViewById(R.id.viewButton);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard_category_pager, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bubble, container, false);\n unbinder = ButterKnife.bind(this, view);\n\n netView.setOnValueTouchListener(new ValueTouchListener());\n generateData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n inflate = inflater.inflate(R.layout.fragment_kecheng, container, false);\n bind = ButterKnife.bind(this, inflate);\n initView();\n initData();\n initListener();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "public ViewHolder(View view){\n super(view);\n\n artImage = view.findViewById(R.id.thumbnail);\n title = view.findViewById(R.id.headline_title);\n byline = view.findViewById(R.id.byline);\n addDate = view.findViewById(R.id.date_added);\n subText = view.findViewById(R.id.sub_text);\n view.setOnClickListener(this);\n\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n View view = inflater.inflate(R.layout.bottom_sheet, container, false);\n calendarGroup = view.findViewById(R.id.calendar_group);\n calendarView = view.findViewById(R.id.calendar_view);\n calendarButton = view.findViewById(R.id.today_calendar_button);\n enterTodo = view.findViewById(R.id.enter_todo_et);\n saveButton = view.findViewById(R.id.save_todo_button);\n priorityButton = view.findViewById(R.id.priority_todo_button);\n priorityRadioGroup = view.findViewById(R.id.radioGroup_priority);\n Chip todayChip = view.findViewById(R.id.today_chip);\n todayChip.setOnClickListener(this);\n Chip tommorowChip = view.findViewById(R.id.tomorrow_chip);\n tommorowChip.setOnClickListener(this);\n Chip nextWeekChip = view.findViewById(R.id.next_week_chip);\n nextWeekChip.setOnClickListener(this);\n priority = Priority.LOW;\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mRootView = inflater.inflate(R.layout.fragment_plans, container, false);\n ButterKnife.bind(this, mRootView);\n return mRootView;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n\n return inflater.inflate(R.layout.model_detail_layout, container, false);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tView rootView = inflater.inflate(R.layout.fragment_exploredetails,\n\t\t\t\tcontainer, false);\n\n\t\tWindowManager wm = (WindowManager) getActivity().getSystemService(\n\t\t\t\tContext.WINDOW_SERVICE);\n\t\tDisplay display = wm.getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tscreenWidth = size.x;\n\t\tscreenHeight = size.y / 2;\n\n\t\tplace_title = (TextView) rootView.findViewById(R.id.place_title);\n\t\ttext_walk = (TextView) rootView.findViewById(R.id.text_walk);\n\t\ttext_duration = (TextView) rootView.findViewById(R.id.text_duration);\n\t\ttext_accessible = (TextView) rootView.findViewById(R.id.text_);\n\t\ttxt_eventdetails = (TextView) rootView\n\t\t\t\t.findViewById(R.id.txt_eventdetails);\n\t\timg_imagedetls = (ImageView) rootView.findViewById(R.id.img_imagedetls);\n\t\ttext_time = (TextView) rootView.findViewById(R.id.text_time);\n\t\tdynamic_innerlayout = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.dynamic_innerlayout);\n\t\ttvStartTheTrail = (TextView) rootView\n\t\t\t\t.findViewById(R.id.tvStartTheTrail);\n\t\trlBannerImage = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.rlBannerImage);\n\t\tpageTitle = (String) getActivity().getIntent().getExtras()\n\t\t\t\t.get(\"PAGETITLE\");\n\n\t\tif (pageTitle.equals(\"Facilities\")) {\n\t\t\ttext_time.setVisibility(View.VISIBLE);\n\t\t\tdynamic_innerlayout.setVisibility(View.GONE);\n\t\t} else {\n\t\t\ttext_time.setVisibility(View.GONE);\n\t\t\tdynamic_innerlayout.setVisibility(View.VISIBLE);\n\t\t}\n\n\t\tif (LLDCApplication.selectedModel.getModelType() == LLDCApplication.TRAILS) {\n\t\t\t/*\n\t\t\t * if (LLDCApplication.isInsideThePark || LLDCApplication.isDebug) {\n\t\t\t * tvStartTheTrail.setVisibility(View.VISIBLE); } else {\n\t\t\t * tvStartTheTrail.setVisibility(View.GONE); }\n\t\t\t */\n\t\t\ttvStartTheTrail.setVisibility(View.VISIBLE);\n\t\t\tmExploreDetailsFragHandler.sendEmptyMessageDelayed(1101, 300000);\n\t\t} else {\n\t\t\ttvStartTheTrail.setVisibility(View.GONE);\n\t\t}\n\n\t\timg_imagedetls.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tif (pageTitle.equals(\"Trails\")) {\n\t\t\t\t\tif (!LLDCApplication.isInsideThePark\n\t\t\t\t\t\t\t&& !LLDCApplication.isDebug) {\n\t\t\t\t\t\tLLDCApplication\n\t\t\t\t\t\t\t\t.onShowToastMesssage(\n\t\t\t\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\t\t\t\"Navigation will not function as it appears you are outside of the park or your GPS is not active.\");\n\t\t\t\t\t} else if (LLDCApplication.selectedModel.getWyapoitnList()\n\t\t\t\t\t\t\t.size() > 0) {\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\t\tMapNavigationActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"PAGETITLE\", \"Trails\");\n\t\t\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLLDCApplication.onShowToastMesssage(getActivity(),\n\t\t\t\t\t\t\t\t\"Trail data is not present.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tonLoadData();\n\t\treturn rootView;\n\t}", "public ViewHolder (View view){\n super(view);\n jView = view;\n //tvJoin = (TextView) view.findViewById(R.id.tvGroup);\n tvGroupTitle = view.findViewById(R.id.tvGroupTitle);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_adddatacat, container, false);\n\n }", "@Override\n public ListadoHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n //INFLATE A VIEW FROM XML\n View v= LayoutInflater.from(parent.getContext()).inflate(R.layout.listado_card_item,null);\n\n //HOLDER\n ListadoHolder holder=new ListadoHolder(v);\n\n return holder;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.titleIconContainer = findViewById(C1167R.C1170id.watch_next_info_icon_title_container);\n this.message = findViewById(C1167R.C1170id.watch_next_info_message);\n Resources res = getContext().getResources();\n this.selectedMessageWidth = res.getDimensionPixelSize(C1167R.dimen.watch_next_info_card_selected_message_width);\n this.selectedCardHeight = res.getDimensionPixelSize(C1167R.dimen.program_default_height);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_post_property_screen, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n context = getActivity().getApplicationContext();\n View inflaterview = inflater.inflate(R.layout.fragment_order_detail, container, false);\n collectName = (TextView)inflaterview.findViewById(R.id.txtResName);\n collectAddress = (TextView)inflaterview.findViewById(R.id.txtResAddress);\n collectPhone = (TextView)inflaterview.findViewById(R.id.txtResPhone);\n deliverAddress = (TextView)inflaterview.findViewById(R.id.txtDeliverAddress);\n deliverPhone = (TextView)inflaterview.findViewById(R.id.txtDeliverPhone);\n layItem = (LinearLayout)inflaterview.findViewById(R.id.layoutItem);\n btnRequest = (Button)inflaterview.findViewById(R.id.btnRequest);\n btnMap = (Button)inflaterview.findViewById(R.id.btnMap);\n txtordercode = (TextView)inflaterview.findViewById(R.id.txtOrderCode);\n txtdelicharge = (TextView)inflaterview.findViewById(R.id.txtDelivcharge);\n txttotalamount = (TextView)inflaterview.findViewById(R.id.txtTotalAmount);\n return inflaterview;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n HashMap<String, String> map = new HashMap<String, String>();\n //FILL\n for (int i = 0; i < players.length; i++) {\n map = new HashMap<String, String>();\n map.put(\"Player\", players[i]);\n map.put(\"Desc\", desc[i]);\n map.put(\"Image\", Integer.toString(images[i]));\n map.put(\"Imagemain\", Integer.toString(imagemain[i]));\n data.add(map);\n }\n //KEYS IN MAP\n String[] from = {\"Player\",\"Desc\", \"Image\"};\n //IDS OF VIEWS\n int[] to = {R.id.textView3, R.id.nameTxt, R.id.imageView1};\n//ADAPTER\n adapter = new SimpleAdapter(getActivity(), data, R.layout.model, from, to);\n setListAdapter(adapter);\n return super.onCreateView(inflater, container, savedInstanceState);\n }", "@Override\n public void baseSetContentView() {\n View layout = View.inflate(this, R.layout.crm_vistor_signaddinfo, mContentLayout);\n mContext = this;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n unbinder = ButterKnife.bind(this, rootView);\n mLayoutInflater = inflater;\n return rootView;\n }", "public ViewHolder(View itemView) {\n super(itemView);\n productDetails = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_product_details);\n price = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_MRP);\n sp = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_SP);\n //qty = (Spinner) itemView.findViewById(R.id.category_item_layout_for_view_product_qty);\n productImage = (ImageView) itemView.findViewById(R.id.category_item_layout_for_view_product_image);\n addToCart = (TextView) itemView.findViewById(R.id.category_item_layout_for_view_product_addToCart);\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.logo = findViewById(C1167R.C1170id.channel_logo);\n this.logoTitle = findViewById(C1167R.C1170id.logo_title);\n this.actionsHint = findViewById(C1167R.C1170id.actions_hint);\n this.sponsoredChannelBackground = findViewById(C1167R.C1170id.sponsored_channel_background);\n this.channelViewMainLinearLayout = findViewById(C1167R.C1170id.main_linear_layout);\n }", "protected abstract\n @NonNull\n V inflateViewHolder(View view, @LayoutRes int layoutId);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_privacy_politic, container, false);\n unbinder = ButterKnife.bind(this, view);\n setTexto();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_leader_description, container, false);\n\n TextView nameHolder = (TextView) view.findViewById(R.id.name);\n TextView titleHolder = (TextView) view.findViewById(R.id.title);\n ImageView image =(ImageView) view.findViewById(R.id.thumbnail);\n\n nameHolder.setText(name);\n titleHolder.setText(title);\n image.setImageResource(img);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_product_detail, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }" ]
[ "0.65197283", "0.6508329", "0.64836866", "0.6442396", "0.64179033", "0.6352227", "0.63414615", "0.63053733", "0.62962323", "0.627644", "0.62752205", "0.62726307", "0.6251509", "0.6247363", "0.62452275", "0.62389654", "0.6219901", "0.6219632", "0.62109476", "0.6209159", "0.62019384", "0.6185588", "0.6178476", "0.61702573", "0.6169261", "0.6168552", "0.6164075", "0.6150561", "0.61491936", "0.6149022", "0.6148104", "0.61399555", "0.6132933", "0.6130581", "0.61299515", "0.6121097", "0.6118814", "0.6112854", "0.6108385", "0.6107434", "0.6104482", "0.6103257", "0.60944414", "0.60928357", "0.60822064", "0.6077368", "0.6066371", "0.60661817", "0.60564107", "0.60537124", "0.6051611", "0.6050191", "0.6049161", "0.6047056", "0.6046226", "0.6045145", "0.6036727", "0.60305804", "0.6028589", "0.6026378", "0.6001547", "0.60008824", "0.5999659", "0.5996141", "0.59895355", "0.5988105", "0.59792954", "0.5974679", "0.5973541", "0.5971374", "0.59652096", "0.59609365", "0.59581107", "0.59518397", "0.5946589", "0.5946379", "0.5941637", "0.5937215", "0.5935233", "0.5929977", "0.5928793", "0.5925937", "0.5920075", "0.59195507", "0.59184843", "0.591655", "0.5914447", "0.59065384", "0.5905319", "0.5902518", "0.58994454", "0.589672", "0.5892334", "0.58911055", "0.58889985", "0.5888703", "0.5888319", "0.5884948", "0.58843637", "0.5883175", "0.5881641" ]
0.0
-1
to be used in tests (beware: there could be more work items) TODO move to a test class
public static AccessCertificationWorkItemType findWorkItem(AccessCertificationCaseType _case, int stageNumber, int iteration, String reviewerOid) { return _case.getWorkItem().stream() .filter(wi -> wi.getStageNumber() == stageNumber && norm(wi.getIteration()) == iteration && ObjectTypeUtil.containsOid(wi.getAssigneeRef(), reviewerOid)) .findFirst().orElse(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t\n\t\t\t}", "private void test() {\n\n\t}", "protected abstract void work();", "@Test\n public void testGenerateWorkItems() {\n\n ArrayList<Integer> lFileIdx = new ArrayList<>( Arrays.asList( 10, 20, 30, 37 ) );\n List<String> lExpectedWorkItemKeys = new ArrayList<String>();\n\n iBulkLoadDataService.generateWorkItems( lFileIdx, WAREHOUSE_STOCK_LEVEL, iFileImportKey );\n\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( \"type\", WORK_TYPE );\n QuerySet lQs = QuerySetFactory.getInstance().executeQuery( \"utl_work_item\", lArgs, \"data\" );\n\n // assert whether the no of work items created for particular data set is correct.\n assertEquals( \"Number of work items\", 4, lQs.getRowCount() );\n\n while ( lQs.next() ) {\n lExpectedWorkItemKeys.add( lQs.getString( \"data\" ) );\n }\n\n int lStartingIdx = 1;\n String lActualWorkItemKey = null;\n\n for ( int j = 0; j < lFileIdx.size(); j++ ) {\n\n lActualWorkItemKey = new MxKeyBuilder( iFileImportKey, WAREHOUSE_STOCK_LEVEL, lStartingIdx,\n lFileIdx.get( j ) ).build().toValueString();\n\n // assert whether the created work items are in the correct format to excute.\n assertEquals( lExpectedWorkItemKeys.get( j ), lActualWorkItemKey );\n lStartingIdx = lFileIdx.get( j ) + 1;\n }\n\n }", "public void testLoadOrder() throws Exception {\n }", "protected abstract Item createTestItem2();", "protected abstract Item createTestItem1();", "@Test\n void completeItemsAsString() {\n\n }", "private TestsResultQueueEntry() {\n\t\t}", "@Test\n void completeItemsAsString() {\n }", "protected abstract Item createTestItem3();", "@Override\r\n\tpublic void worked(int work) {\n\t}", "protected void runBeforeIteration() {}", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "protected TestBench() {}", "public void work() {\n\t}", "public void work() {\n\t}", "@Test\r\n\tpublic void testOrderPerform() {\n\t}", "public void testGetInsDyn() {\n }", "@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }", "private test5() {\r\n\t\r\n\t}", "@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDescription(\"A short description\");\n ShoppingList list = factory.validateAndCommit();\n\n // Times go on\n\n ShoppingList list2 = api.find(list.getId());\n\n // Test\n\n assertEquals(list.getId(), list2.getId());\n assertEquals(list.getName(), list2.getName());\n assertEquals(list.getDescription(), list2.getDescription());\n }", "public void smell() {\n\t\t\n\t}", "@Test\n void buildWaredDrobeTest() {\n WaredDrobeBuilder waredDrobeBuilder = new WaredDrobeBuilder();\n WaredDrobe waredDrobe = waredDrobeBuilder.build();\n List<String>partlist=waredDrobe.getParts();\n\n List<String>steps = Arrays.asList(\"bottom\",\"side\",\"side\",\"back\",\"top\",\"shelf\",\"shelf\",\"shelf\",\"shelf\",\n \"shelf\",\"shelf\",\"shelf\",\"shelf\",\"door\",\"door\");\n assertEquals(steps,partlist);\n\n\n\n\n }", "public void testWriteOrders() throws Exception {\n }", "@Test\n public void shouldProcessData() throws Exception {\n }", "@Override\n\t\tpublic void worked(int arg0) {\n\n\t\t}", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Test\n public void others(){\n Item item = itemService.getItem(50);\n System.out.println(item);\n\n }", "public void testGetStartValue2() {\n TaskSeriesCollection c = createCollection2();\n TaskSeriesCollection c3 = createCollection3();\n }", "@Test\n public void shoppingListSavesLocally() throws Exception {\n }", "public void testGetStartValue() {\n TaskSeriesCollection c = createCollection1();\n TaskSeriesCollection c3 = createCollection3();\n }", "public void testGetSeriesKey() {\n TaskSeriesCollection c = createCollection1();\n }", "public void working()\n {\n \n \n }", "@Test\n public void testListStorageBinInformation2() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 90L;\n String result = \"\";\n try {\n FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n } catch (Exception ex) {\n result = ex.getMessage();\n }\n assertEquals(\"Factory is not found!\", result);\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "public void testSetBasedata() {\n }", "@Test\n void displayIncompleteTasks() {\n }", "@Test\n public void iterator() {\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "@Test\n\tpublic void hasWorkstationTest(){\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder = makeOrder(new ModelA());\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder2 = makeOrder(new ModelB());\n//\t\tOrder testOrder3 = makeOrder(new ModelC());\n//\t\tOrder testOrder4 = makeOrder(new ModelX());\n//\t\tcmcSystem.logInUser(2);\n//\t\tOrder testOrder5 = makeOrder(new ModelY());\n\t\tcmcSystem.logInUser(1);\n\t\tassemblyLine.setStatus(Status.OPERATIONAL, 1);\n\t\tassertTrue(assemblyLine.supports(testOrder));\n\t\tassertTrue(assemblyLine.supports(testOrder2));\n//\t\tassertFalse(assemblyLine.supports(testOrder3));\n//\t\tassertFalse(assemblyLine.supports(testOrder4));\n//\t\tassertFalse(assemblyLine.supports(testOrder5));\n\t}", "@Override\n public void test() {\n \n }", "@Override\n public void runTest() {\n }", "public void testGetRowKey() {\n TaskSeriesCollection c = createCollection1();\n }", "public void testGetBasedata() {\n }", "@Test\n public void searchTrueTest() {\n assertThat(4, is(this.queue.search(\"work4\")));\n assertThat(1, is(this.queue.search(\"work1\")));\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice02() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test //This is integration test\r\n\tpublic void testCalculatePrice03() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\texspectedFoodList.add(new Appetizer(\"Beef Enchailada\",Food.foodType.MAINDISH, \"100\"));\t\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test //This is integration test\r\n\tpublic void testCalculatePrice04() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\texspectedFoodList.add(new Appetizer(\"Beef Enchailada\",Food.foodType.MAINDISH, \"100\"));\t\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void myWork() {\n\t\t\n\t}", "@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Test\n public void testGetSizeOfCheckoutList() {\n }", "@Test\n public void testSaveCurrentWork() throws FileNotFoundException {\n \n OrderOperations instance = new OrderOperations();\n int orderNumber = 1;\n String date = \"03251975\";\n String customerName = \"Barack\";\n String state = \"MI\";\n String productType = \"Wood\";\n double area = 700;\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n DAOInterface testInterface = (DAOInterface) ctx.getBean(\"productionMode\");\n String productInfo, taxes;\n try {\n productInfo = testInterface.readFromDisk(\"productType.txt\");\n } catch (FileNotFoundException e) {\n productInfo = \"\";\n }\n\n try {\n taxes = testInterface.readFromDisk(\"taxes.txt\");\n } catch (FileNotFoundException e) {\n taxes = \"\";\n }\n instance.addOrder(customerName, date, state, productType, area, taxes, productInfo);\n instance.saveCurrentWork(date, testInterface);\n Scanner in = new Scanner(new BufferedReader(new FileReader(\"orders_03251975.txt\")));\n String inString;\n String[] inArray;\n inString = in.nextLine();\n inArray = inString.split(\",\");\n assertEquals(\"Barack\", inArray[1]);\n assertEquals(\"Wood\", inArray[4]);\n \n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test\r\n public void test_performLogic_Accuracy4() throws Exception {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(500);\r\n doc.setContestId(1);\r\n doc.setFileName(\"test.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n }", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "private FlyWithWings(){\n\t\t\n\t}", "@Test\n\tpublic void addTaskOutput(){\n\t}", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "public interface UnifiedOrderTaskTests {\n\n}", "protected OpinionFinding() {/* intentionally empty block */}", "public void testGetItem() throws RepositoryException{\n String path = \"path\";\n MockControl resultMock = MockControl.createControl(Item.class);\n Item result = (Item) resultMock.getMock();\n \n sessionControl.expectAndReturn(session.getItem(path), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getItem(path), result);\n \n }", "protected void runBeforeIterations() {}", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "@Test\n public void testAddToWaitList() throws Exception {\n }", "@Test\n public void testDAM30905001() {\n // this case uses forEach element for updating ToDos.\n testDAM30702001();\n }", "@Override\n public void testCreateRequestListSomeFilteredBySourceSystem(){\n }", "protected void setupLocal() {}", "private void runBest() {\n }", "private stendhal() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "public void testOperation();", "@Test\n public void testAddACopy() {\n }", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.testListContains();\n }", "@Test\n\tpublic abstract void testTransform4();", "@Test\n public void test_getSub_1() throws Exception {\n }", "@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }", "public void testCtorSuccess() {\r\n new FileSystemPersistence(10);\r\n }", "@Test\n public void getStuff() {\n \n Assert.assertEquals(wService.work(), \"Parker\");\n Assert.assertEquals(aService.age(), 25);\n }", "private Util() { }", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Test\n public void testFindByName() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add item\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input1).init(tracker);\n\n // find item\n\n String action2 = \"4\";\n\n Input input2 = new StubInput(new String[]{action2, name, yes});\n new StartUI(input2).init(tracker);\n\n }", "@Test\n public void testGetManifestationsByWorkId() {\n System.out.println(\"getManifestationsByWorkId\");\n String id = \"w1\";\n DataDeichmanAdapterMock instance = new DataDeichmanAdapterMock();\n int expResult = 3;\n Model result = instance.getManifestationsByWorkId(id);\n result.write(System.out);\n assertNotNull(result);\n assertFalse(result.isEmpty());\n //assertEquals(expResult, result.size());\n }", "@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}", "public void testCtor() {\r\n new FileSystemPersistence();\r\n }", "@BeforeClass\n\tpublic static void generatingItems() {\n\t\tfor (Item i : allItems) {\n\t\t\tif (i.getType().equals(\"spores engine\")) {\n\t\t\t\titem4 = i;\n\t\t\t}\n\t\t}\n\t\tltsTest = new LongTermStorage();\n\t\tltsTest1 = new LongTermStorage();\n\t}", "@Test\n public void mainFlowTest() {\n type.insert();\n engineer.insert();\n\n Equipment equipment1 = new Equipment(\"equipment1\", type.getId(), model, location, installTime1);\n Equipment equipment2 = new Equipment(\"equipment2\", type.getId(), model, location, installTime2);\n equipment1.insert();\n equipment2.insert();\n\n Plan plan1 = new Plan(\"plan1\", type.getId(), 30, \"large\", \"checking\");\n Plan plan2 = new Plan(\"plan2\", type.getId(), 60, \"small\", \"repairing\");\n plan1.insert();\n plan2.insert();\n\n Record record1 = new Record(\"r1\", plan1.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 1).getTime(), 2, \"换过滤网\");\n Record record2 = new Record(\"r2\", plan2.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 31).getTime(), 1, \"发动机清理\");\n Record record3 = new Record(\"r3\", plan1.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 5).getTime(), 3, \"cleaning\");\n Record record4 = new Record(\"r4\", plan2.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2016, 0, 4).getTime(), 2, \"tiny repairing\");\n record1.insert();\n record2.insert();\n record3.insert();\n record4.insert();\n\n // test the correctness of 10 days tasks\n List<Task> tenDayTasks = MaintenanceOperation.getTenDaysTask(DateUtils.getCalendar(2015, 11, 30).getTime());\n assertEquals(\"wrong with 10 days' tasks\", 2, tenDayTasks.size());\n\n // test the total maintenance time\n int time1 = MaintenanceOperation.getTotalMaintenanceTime(equipment1.getId());\n assertEquals(\"wrong with total time of equipment 1\", 3, time1);\n int time2 = MaintenanceOperation.getTotalMaintenanceTime(equipment2.getId());\n assertEquals(\"wrong with total time of equipment 2\", 5, time2);\n\n // test the total maintenance time of certain type\n int time3 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time3);\n int time4 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 1, time4);\n int time5 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 3, time5);\n int time6 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time6);\n }", "public void mo38850q() {\n }", "@Override\n\tpublic void saveTestingData() {\n\t\t\n\t}", "@Test\n void testPartA_Example4() {\n assertEquals(33583, Day01.getFuelNeededForMass(100756));\n }" ]
[ "0.60663354", "0.5940071", "0.5866355", "0.58451045", "0.5707518", "0.55820644", "0.55306756", "0.5523824", "0.5518172", "0.55068505", "0.5506795", "0.54956126", "0.548872", "0.54839057", "0.5450659", "0.540866", "0.5392894", "0.53705686", "0.53705686", "0.536708", "0.5361351", "0.53559345", "0.5346131", "0.5344598", "0.53428864", "0.5340177", "0.5329905", "0.53279066", "0.53262585", "0.5320952", "0.5309241", "0.5308999", "0.5303247", "0.5300932", "0.5299551", "0.52906734", "0.5290539", "0.52705866", "0.5267332", "0.5263079", "0.52617466", "0.5261376", "0.525596", "0.52508545", "0.52506113", "0.52486986", "0.52401054", "0.5235621", "0.5233187", "0.5232557", "0.52305984", "0.5230557", "0.522636", "0.52256376", "0.5213632", "0.52105576", "0.5198207", "0.5195272", "0.51947784", "0.5190214", "0.51882756", "0.5186196", "0.51855123", "0.5183294", "0.5179898", "0.51776356", "0.5175526", "0.5167471", "0.5163918", "0.5163379", "0.51612574", "0.51603955", "0.5146336", "0.5144613", "0.51441664", "0.5138175", "0.51352763", "0.5128327", "0.51273715", "0.5118376", "0.510915", "0.5108464", "0.5105933", "0.5103739", "0.5102984", "0.510118", "0.50982475", "0.5097209", "0.5097033", "0.5095036", "0.5093996", "0.5092415", "0.50918704", "0.50842977", "0.5082326", "0.50817966", "0.50816166", "0.5081439", "0.5081145", "0.5080041", "0.5078399" ]
0.0
-1
TODO rework signalling problems
public static void checkStageDefinitionConsistency(List<AccessCertificationStageDefinitionType> stages) { int count = stages.size(); boolean[] numberPresent = new boolean[count]; for (AccessCertificationStageDefinitionType stage : stages) { int num = stage.getNumber(); if (num < 1 || num > count) { throw new IllegalStateException("Invalid stage number: " + num + " (stage count: " + count +")"); } if (numberPresent[num-1]) { throw new IllegalStateException("Stage with number " + num + " is defined multiple times"); } numberPresent[num-1] = true; } // maybe redundant test for (int i = 0; i < numberPresent.length; i++) { if (!numberPresent[i]) { throw new IllegalStateException("Stage with number " + (i+1) + " was not defined"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized void sendLifeSign() {\n if (socketLayer.isConnected() && nextLifeSignToSend < System.currentTimeMillis()) {\n int oldTimeOut = 0;\n try {\n oldTimeOut = socketLayer.getSocketToPartner().getSoTimeout();\n socketLayer.getSocketToPartner().setSoTimeout(5000);\n socketLayer.writeMsg(BaseCommTag.REQ_LIFE_SIGN.name());\n // exactly one read - the response should be\n // BaseCommTag.RESP_LIFE_SIGN\n // if not the server has ignored the REQ_LIFE_SIGN message\n // in this version this circumstance is ignored\n LocalLog.info(\"LifeTimer sendLifeSign\");\n socketLayer.readMsg(true);\n } catch (ActionFailedException afx) {\n LocalLog.error(\"Senden des LifeSigns. Verbindung zu Service wird unterbrochen.\", afx);\n stopped = true;\n } catch (SocketException sx) {\n LocalLog.error(\"Senden des LifeSigns. Verbindung zu Service wird unterbrochen.\", sx);\n stopped = true;\n }\n\n try {\n // error case\n if (stopped) {\n closedByLifeSignSystem = true;\n socketLayer.close();\n } else {\n // ok - timeout reset to original value\n socketLayer.getSocketToPartner().setSoTimeout(oldTimeOut);\n }\n } catch (Exception e) {\n // nothing to do\n }\n }\n }", "@Suspendable\n @Override\n protected void checkTransaction(SignedTransaction stx) throws FlowException {\n }", "void sendSignChangeToPlayer(Player player, Location location, byte data);", "public static void main(String[] args) throws AddressFormatException {\n\n// generateMultisig();\n String getSignedTransaction = signFirstTime();\n String rawtx = signSecondTime(getSignedTransaction);\n\n System.out.println(\"rawtx ->\"+ rawtx);\n }", "@Override\n public int getSignal() {\n return signal & 0xFF;\n }", "void OnSignalLost();", "private void checkLastLifeSign() {\n // > 0 means that client has already connected and meanwhile sent\n // one or more messages and the lifesign system is activated\n if (nextLifeSignAwaited > 0 && nextLifeSignAwaited < System.currentTimeMillis()) {\n // lifesign not in time\n System.out.println(\"Kein lifesign erhalten\");\n lifeSignSucceeded = true;\n stopped = true;\n try {\n socketLayer.close();\n } catch (Exception ex) {\n // nothing to do\n }\n }\n }", "java.lang.String getSignal();", "boolean k2h_set_bumup_debug_signal_user1();", "private static void signonToMaster() {\r\n /* The first that we expect is a request to sign on: */\r\n SocketMessage sm = socket_to_master.getMessage();\r\n\r\n /* The master wants to make sure that we are not talking to a stale master: */\r\n if (sm.getMessageNum() == sm.SEND_SIGNON_INFO_TO_MASTER) {\r\n /* OS is also determined in InfoFromHost.getInfoForMaster(), but it was */\r\n /* found that I will need the OS earlier. Old code has not been removed */\r\n String data[] = new String[SocketMessage.SIGNON_INFO_SIZE];\r\n data[0] = master_ip;\r\n data[1] = slave_name;\r\n data[2] = System.getProperty(\"os.name\");\r\n data[3] = System.getProperty(\"os.arch\");\r\n data[4] = \"\" + common.getProcessId();\r\n data[5] = \"\" + System.currentTimeMillis();\r\n\r\n sm.setData(data);\r\n socket_to_master.putMessage(sm);\r\n } else\r\n common.failure(\"Unexpected message number during signon: \" + sm.getMessageNum());\r\n\r\n /* The next one is good or bad news: */\r\n sm = socket_to_master.getMessage();\r\n if (sm.getMessageNum() == sm.KILL_SLAVE_SIGNON_ERROR)\r\n common.failure(\"Signon to master failed\");\r\n\r\n if (sm.getMessageNum() != sm.SEND_SIGNON_SUCCESSFUL)\r\n common.failure(\"Unexpected message number during signon: \" + sm.getMessageNum());\r\n owner_id = master_pid = ((Integer) sm.getData()).intValue();\r\n\r\n /* Confirm that we received the successful message: */\r\n socket_to_master.putMessage(sm);\r\n }", "boolean isSignal();", "boolean hasSignal();", "Signal getSignal();", "static void call_when_sign(String passed){\n\t\tif(S)\n\t\t\tcomplete_call_req(passed.substring(3));\n\t}", "@Override\n \t\t\t\t\tpublic void run() {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tRedstoneControlSign.getControlSign(block.getLocation());\n \t\t\t\t\t\t} catch (SMSException e) {\n \t\t\t\t\t\t\tMiscUtil.errorMessage(player, e.getMessage());\n \t\t\t\t\t\t}\n \t\t\t\t\t}", "private void connectWithMainloopLock() throws java.io.IOException {\n /*\n r28 = this;\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 == 0) goto L_0x000d;\n L_0x000c:\n return;\n L_0x000d:\n r13 = r28.getFormat();\n r13 = (javax.media.format.AudioFormat) r13;\n r24 = r13.getSampleRate();\n r0 = r24;\n r0 = (int) r0;\n r19 = r0;\n r11 = r13.getChannels();\n r20 = r13.getSampleSizeInBits();\n r6 = -1;\n r0 = r19;\n if (r0 != r6) goto L_0x0038;\n L_0x0029:\n r24 = org.jitsi.impl.neomedia.MediaUtils.MAX_AUDIO_SAMPLE_RATE;\n r26 = -4616189618054758400; // 0xbff0000000000000 float:0.0 double:-1.0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 == 0) goto L_0x0038;\n L_0x0031:\n r24 = org.jitsi.impl.neomedia.MediaUtils.MAX_AUDIO_SAMPLE_RATE;\n r0 = r24;\n r0 = (int) r0;\n r19 = r0;\n L_0x0038:\n r6 = -1;\n if (r11 != r6) goto L_0x003c;\n L_0x003b:\n r11 = 1;\n L_0x003c:\n r6 = -1;\n r0 = r20;\n if (r0 != r6) goto L_0x0043;\n L_0x0041:\n r20 = 16;\n L_0x0043:\n r4 = 0;\n r12 = 0;\n r0 = r28;\n r6 = r0.pulseAudioSystem;\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r9 = r28.getClass();\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r9 = r9.getName();\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r23 = \"phone\";\n r0 = r19;\n r1 = r23;\n r4 = r6.createStream(r0, r11, r9, r1);\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r0 = r28;\n r0.channels = r11;\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n L_0x0060:\n if (r12 == 0) goto L_0x0075;\n L_0x0062:\n r16 = new java.io.IOException;\n r16.<init>();\n r0 = r16;\n r0.initCause(r12);\n throw r16;\n L_0x006d:\n r17 = move-exception;\n r12 = r17;\n goto L_0x0060;\n L_0x0071:\n r18 = move-exception;\n r12 = r18;\n goto L_0x0060;\n L_0x0075:\n r24 = 0;\n r6 = (r4 > r24 ? 1 : (r4 == r24 ? 0 : -1));\n if (r6 != 0) goto L_0x0083;\n L_0x007b:\n r6 = new java.io.IOException;\n r9 = \"stream\";\n r6.<init>(r9);\n throw r6;\n L_0x0083:\n r6 = r19 / 100;\n r6 = r6 * r11;\n r9 = r20 / 8;\n r10 = r6 * r9;\n r6 = r10 * 2;\n r0 = r28;\n r0.fragsize = r6;\t Catch:{ all -> 0x00bc }\n r6 = r10 * 10;\n r6 = new byte[r6];\t Catch:{ all -> 0x00bc }\n r0 = r28;\n r0.buffer = r6;\t Catch:{ all -> 0x00bc }\n r6 = -1;\n r9 = -1;\n r23 = -1;\n r24 = -1;\n r0 = r28;\n r0 = r0.fragsize;\t Catch:{ all -> 0x00bc }\n r25 = r0;\n r0 = r23;\n r1 = r24;\n r2 = r25;\n r7 = org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_new(r6, r9, r0, r1, r2);\t Catch:{ all -> 0x00bc }\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 != 0) goto L_0x00cd;\n L_0x00b4:\n r6 = new java.io.IOException;\t Catch:{ all -> 0x00bc }\n r9 = \"pa_buffer_attr_new\";\n r6.<init>(r9);\t Catch:{ all -> 0x00bc }\n throw r6;\t Catch:{ all -> 0x00bc }\n L_0x00bc:\n r6 = move-exception;\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r9 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r9 != 0) goto L_0x00cc;\n L_0x00c9:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_unref(r4);\n L_0x00cc:\n throw r6;\n L_0x00cd:\n r22 = new org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource$PulseAudioStream$2;\t Catch:{ all -> 0x011a }\n r0 = r22;\n r1 = r28;\n r0.m2469init();\t Catch:{ all -> 0x011a }\n r0 = r22;\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_set_state_callback(r4, r0);\t Catch:{ all -> 0x011a }\n r0 = r28;\n r6 = org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource.this;\t Catch:{ all -> 0x011a }\n r6 = r6.getLocatorDev();\t Catch:{ all -> 0x011a }\n r9 = 8193; // 0x2001 float:1.1481E-41 double:4.048E-320;\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_connect_record(r4, r6, r7, r9);\t Catch:{ all -> 0x011a }\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 == 0) goto L_0x00f3;\n L_0x00ee:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x0109 }\n r7 = 0;\n L_0x00f3:\n r0 = r28;\n r6 = r0.pulseAudioSystem;\t Catch:{ all -> 0x0109 }\n r9 = 2;\n r21 = r6.waitForStreamState(r4, r9);\t Catch:{ all -> 0x0109 }\n r6 = 2;\n r0 = r21;\n if (r0 == r6) goto L_0x0125;\n L_0x0101:\n r6 = new java.io.IOException;\t Catch:{ all -> 0x0109 }\n r9 = \"stream.state\";\n r6.<init>(r9);\t Catch:{ all -> 0x0109 }\n throw r6;\t Catch:{ all -> 0x0109 }\n L_0x0109:\n r6 = move-exception;\n r0 = r28;\n r0 = r0.stream;\t Catch:{ all -> 0x011a }\n r24 = r0;\n r26 = 0;\n r9 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r9 != 0) goto L_0x0119;\n L_0x0116:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_disconnect(r4);\t Catch:{ all -> 0x011a }\n L_0x0119:\n throw r6;\t Catch:{ all -> 0x011a }\n L_0x011a:\n r6 = move-exception;\n r24 = 0;\n r9 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r9 == 0) goto L_0x0124;\n L_0x0121:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x00bc }\n L_0x0124:\n throw r6;\t Catch:{ all -> 0x00bc }\n L_0x0125:\n r0 = r28;\n r6 = r0.readCallback;\t Catch:{ all -> 0x0109 }\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_set_read_callback(r4, r6);\t Catch:{ all -> 0x0109 }\n r6 = org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource.SOFTWARE_GAIN;\t Catch:{ all -> 0x0109 }\n if (r6 != 0) goto L_0x0168;\n L_0x0132:\n r0 = r28;\n r6 = r0.gainControl;\t Catch:{ all -> 0x0109 }\n if (r6 == 0) goto L_0x0168;\n L_0x0138:\n r24 = org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_new();\t Catch:{ all -> 0x0109 }\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n r14 = 1;\n r0 = r28;\n r6 = r0.gainControl;\t Catch:{ all -> 0x0195 }\n r15 = r6.getLevel();\t Catch:{ all -> 0x0195 }\n r0 = r28;\n r0.setStreamVolume(r4, r15);\t Catch:{ all -> 0x0195 }\n r0 = r28;\n r0.gainControlLevel = r15;\t Catch:{ all -> 0x0195 }\n r14 = 0;\n if (r14 == 0) goto L_0x0168;\n L_0x0157:\n r0 = r28;\n r0 = r0.cvolume;\t Catch:{ all -> 0x0109 }\n r24 = r0;\n org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_free(r24);\t Catch:{ all -> 0x0109 }\n r24 = 0;\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n L_0x0168:\n r0 = r28;\n r0.stream = r4;\t Catch:{ all -> 0x0109 }\n r0 = r28;\n r0 = r0.stream;\t Catch:{ all -> 0x011a }\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 != 0) goto L_0x017b;\n L_0x0178:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_disconnect(r4);\t Catch:{ all -> 0x011a }\n L_0x017b:\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 == 0) goto L_0x0184;\n L_0x0181:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x00bc }\n L_0x0184:\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 != 0) goto L_0x000c;\n L_0x0190:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_unref(r4);\n goto L_0x000c;\n L_0x0195:\n r6 = move-exception;\n if (r14 == 0) goto L_0x01a9;\n L_0x0198:\n r0 = r28;\n r0 = r0.cvolume;\t Catch:{ all -> 0x0109 }\n r24 = r0;\n org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_free(r24);\t Catch:{ all -> 0x0109 }\n r24 = 0;\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n L_0x01a9:\n throw r6;\t Catch:{ all -> 0x0109 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource$PulseAudioStream.connectWithMainloopLock():void\");\n }", "@Override\n\tprotected void onInterruption() throws SimControlException {\n\t\t\n\t}", "public interface IFingerprintServiceReceiver extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements android.service.fingerprint.IFingerprintServiceReceiver\n{\nprivate static final java.lang.String DESCRIPTOR = \"android.service.fingerprint.IFingerprintServiceReceiver\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an android.service.fingerprint.IFingerprintServiceReceiver interface,\n * generating a proxy if needed.\n */\npublic static android.service.fingerprint.IFingerprintServiceReceiver asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof android.service.fingerprint.IFingerprintServiceReceiver))) {\nreturn ((android.service.fingerprint.IFingerprintServiceReceiver)iin);\n}\nreturn new android.service.fingerprint.IFingerprintServiceReceiver.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_onEnrollResult:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nint _arg1;\n_arg1 = data.readInt();\nthis.onEnrollResult(_arg0, _arg1);\nreturn true;\n}\ncase TRANSACTION_onAcquired:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nthis.onAcquired(_arg0);\nreturn true;\n}\ncase TRANSACTION_onProcessed:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nthis.onProcessed(_arg0);\nreturn true;\n}\ncase TRANSACTION_onError:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nthis.onError(_arg0);\nreturn true;\n}\ncase TRANSACTION_onRemoved:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nthis.onRemoved(_arg0);\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements android.service.fingerprint.IFingerprintServiceReceiver\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n@Override public void onEnrollResult(int fingerprintId, int remaining) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(fingerprintId);\n_data.writeInt(remaining);\nmRemote.transact(Stub.TRANSACTION_onEnrollResult, _data, null, android.os.IBinder.FLAG_ONEWAY);\n}\nfinally {\n_data.recycle();\n}\n}\n@Override public void onAcquired(int acquiredInfo) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(acquiredInfo);\nmRemote.transact(Stub.TRANSACTION_onAcquired, _data, null, android.os.IBinder.FLAG_ONEWAY);\n}\nfinally {\n_data.recycle();\n}\n}\n@Override public void onProcessed(int fingerprintId) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(fingerprintId);\nmRemote.transact(Stub.TRANSACTION_onProcessed, _data, null, android.os.IBinder.FLAG_ONEWAY);\n}\nfinally {\n_data.recycle();\n}\n}\n@Override public void onError(int error) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(error);\nmRemote.transact(Stub.TRANSACTION_onError, _data, null, android.os.IBinder.FLAG_ONEWAY);\n}\nfinally {\n_data.recycle();\n}\n}\n@Override public void onRemoved(int fingerprintId) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(fingerprintId);\nmRemote.transact(Stub.TRANSACTION_onRemoved, _data, null, android.os.IBinder.FLAG_ONEWAY);\n}\nfinally {\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_onEnrollResult = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_onAcquired = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_onProcessed = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_onError = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_onRemoved = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\n}\npublic void onEnrollResult(int fingerprintId, int remaining) throws android.os.RemoteException;\npublic void onAcquired(int acquiredInfo) throws android.os.RemoteException;\npublic void onProcessed(int fingerprintId) throws android.os.RemoteException;\npublic void onError(int error) throws android.os.RemoteException;\npublic void onRemoved(int fingerprintId) throws android.os.RemoteException;\n}", "public final void mo31286b() {\n this.f13976a.lock();\n try {\n this.f13979d = 1000;\n this.f13981f.signal();\n } finally {\n this.f13976a.unlock();\n }\n }", "public interface SignallingAction extends Action {\n}", "GasData receiveGasData();", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}", "public final void b() {\n /*\n r9 = this;\n r0 = 0\n java.lang.Object[] r1 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r3 = f53268a\n java.lang.Class[] r6 = new java.lang.Class[r0]\n java.lang.Class r7 = java.lang.Void.TYPE\n r4 = 0\n r5 = 55519(0xd8df, float:7.7799E-41)\n r2 = r9\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7)\n if (r1 == 0) goto L_0x0025\n java.lang.Object[] r2 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r4 = f53268a\n r5 = 0\n r6 = 55519(0xd8df, float:7.7799E-41)\n java.lang.Class[] r7 = new java.lang.Class[r0]\n java.lang.Class r8 = java.lang.Void.TYPE\n r3 = r9\n com.meituan.robust.PatchProxy.accessDispatch(r2, r3, r4, r5, r6, r7, r8)\n return\n L_0x0025:\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r0 = com.ss.android.ugc.aweme.live.alphaplayer.e.g\n monitor-enter(r0)\n r1 = 1\n r9.h = r1 // Catch:{ all -> 0x0044 }\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r1 = com.ss.android.ugc.aweme.live.alphaplayer.e.g // Catch:{ all -> 0x0044 }\n r1.notifyAll() // Catch:{ all -> 0x0044 }\n L_0x0030:\n boolean r1 = r9.f53269b // Catch:{ all -> 0x0044 }\n if (r1 != 0) goto L_0x0042\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r1 = com.ss.android.ugc.aweme.live.alphaplayer.e.g // Catch:{ InterruptedException -> 0x003a }\n r1.wait() // Catch:{ InterruptedException -> 0x003a }\n goto L_0x0030\n L_0x003a:\n java.lang.Thread r1 = java.lang.Thread.currentThread() // Catch:{ all -> 0x0044 }\n r1.interrupt() // Catch:{ all -> 0x0044 }\n goto L_0x0030\n L_0x0042:\n monitor-exit(r0) // Catch:{ all -> 0x0044 }\n return\n L_0x0044:\n r1 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0044 }\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.live.alphaplayer.e.i.b():void\");\n }", "public void signalProtocolVerified() {\n // this update order below must stay in reverse order with access order in SingleProtocolEncode#onWrite\n isDecoderVerifiedProtocol = true;\n isDecoderReceivedProtocol = true;\n // This channel can become null when SingleProtocolEncoder is not active handler of the outbound\n // pipeline, when the previous MemberProtocolEncoder doesn't replace itself with SingleProtocolEncoder\n // yet. In this case, this outboundPipeline().wakeup() call can be ignored since it is not possible\n // to enter the blocked state from the path that isDecoderReceivedProtocol check is performed.\n if (channel != null) {\n channel.outboundPipeline().wakeup();\n }\n }", "void signal();", "public boolean signRequired() {\n\t\treturn false;\n\t}", "public void onNotifyEvent(int r8, android.os.Bundle r9) {\n /*\n r7 = this;\n r0 = r7.mListenerLock;\n monitor-enter(r0);\n r1 = r7.mNotifyListener;\t Catch:{ all -> 0x00df }\n r2 = 12001; // 0x2ee1 float:1.6817E-41 double:5.9293E-320;\n if (r1 == 0) goto L_0x00d8;\n L_0x0009:\n r1 = new android.os.Bundle;\t Catch:{ all -> 0x00df }\n r1.<init>();\t Catch:{ all -> 0x00df }\n r3 = 3005; // 0xbbd float:4.211E-42 double:1.4847E-320;\n r4 = -2301; // 0xfffffffffffff703 float:NaN double:NaN;\n r5 = 2103; // 0x837 float:2.947E-42 double:1.039E-320;\n r6 = 3002; // 0xbba float:4.207E-42 double:1.483E-320;\n if (r8 == r2) goto L_0x00a8;\n L_0x0018:\n switch(r8) {\n case 12004: goto L_0x009e;\n case 12005: goto L_0x0094;\n default: goto L_0x001b;\n };\t Catch:{ all -> 0x00df }\n L_0x001b:\n switch(r8) {\n case 12007: goto L_0x008b;\n case 12008: goto L_0x0081;\n case 12009: goto L_0x0077;\n default: goto L_0x001e;\n };\t Catch:{ all -> 0x00df }\n L_0x001e:\n switch(r8) {\n case 12011: goto L_0x006f;\n case 12012: goto L_0x0065;\n case 12013: goto L_0x005d;\n case 12014: goto L_0x0055;\n case 12015: goto L_0x004d;\n default: goto L_0x0021;\n };\t Catch:{ all -> 0x00df }\n L_0x0021:\n switch(r8) {\n case 12030: goto L_0x0043;\n case 12031: goto L_0x003b;\n default: goto L_0x0024;\n };\t Catch:{ all -> 0x00df }\n L_0x0024:\n r3 = \"EVT_MSG\";\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00df }\n r4.<init>();\t Catch:{ all -> 0x00df }\n r5 = \"UNKNOWN event = \";\n r4.append(r5);\t Catch:{ all -> 0x00df }\n r4.append(r8);\t Catch:{ all -> 0x00df }\n r4 = r4.toString();\t Catch:{ all -> 0x00df }\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n goto L_0x0092;\n L_0x003b:\n r3 = \"EVT_MSG\";\n r5 = \"所有拉流地址尝试失败,可以放弃治疗\";\n r1.putString(r3, r5);\t Catch:{ all -> 0x00df }\n goto L_0x006c;\n L_0x0043:\n r3 = -2302; // 0xfffffffffffff702 float:NaN double:NaN;\n r4 = \"EVT_MSG\";\n r5 = \"获取加速拉流地址失败\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n goto L_0x00b1;\n L_0x004d:\n r3 = \"EVT_MSG\";\n r4 = \"启动网络重连\";\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n goto L_0x007e;\n L_0x0055:\n r4 = \"EVT_MSG\";\n r5 = \"写数据错误,网络连接断开\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n goto L_0x00b1;\n L_0x005d:\n r4 = \"EVT_MSG\";\n r5 = \"读数据错误,网络连接断开\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n goto L_0x00b1;\n L_0x0065:\n r3 = \"EVT_MSG\";\n r5 = \"经多次自动重连失败,放弃连接\";\n r1.putString(r3, r5);\t Catch:{ all -> 0x00df }\n L_0x006c:\n r3 = -2301; // 0xfffffffffffff703 float:NaN double:NaN;\n goto L_0x00b1;\n L_0x006f:\n r3 = \"EVT_MSG\";\n r4 = \"连接服务器失败\";\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n goto L_0x00a5;\n L_0x0077:\n r3 = \"EVT_MSG\";\n r4 = \"服务器拒绝连接请求\";\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n L_0x007e:\n r3 = 2103; // 0x837 float:2.947E-42 double:1.039E-320;\n goto L_0x00b1;\n L_0x0081:\n r3 = 2002; // 0x7d2 float:2.805E-42 double:9.89E-321;\n r4 = \"EVT_MSG\";\n r5 = \"开始拉流\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n goto L_0x00b1;\n L_0x008b:\n r3 = \"EVT_MSG\";\n r4 = \"连接结束\";\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n L_0x0092:\n r3 = r8;\n goto L_0x00b1;\n L_0x0094:\n r3 = 3003; // 0xbbb float:4.208E-42 double:1.4837E-320;\n r4 = \"EVT_MSG\";\n r5 = \"RTMP服务器握手失败\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n goto L_0x00b1;\n L_0x009e:\n r3 = \"EVT_MSG\";\n r4 = \"连接服务器失败\";\n r1.putString(r3, r4);\t Catch:{ all -> 0x00df }\n L_0x00a5:\n r3 = 3002; // 0xbba float:4.207E-42 double:1.483E-320;\n goto L_0x00b1;\n L_0x00a8:\n r3 = 2001; // 0x7d1 float:2.804E-42 double:9.886E-321;\n r4 = \"EVT_MSG\";\n r5 = \"已连接服务器\";\n r1.putString(r4, r5);\t Catch:{ all -> 0x00df }\n L_0x00b1:\n r4 = \"\";\n if (r9 == 0) goto L_0x00bd;\n L_0x00b5:\n r4 = \"EVT_MSG\";\n r5 = \"\";\n r4 = r9.getString(r4, r5);\t Catch:{ all -> 0x00df }\n L_0x00bd:\n if (r4 == 0) goto L_0x00ca;\n L_0x00bf:\n r9 = r4.isEmpty();\t Catch:{ all -> 0x00df }\n if (r9 != 0) goto L_0x00ca;\n L_0x00c5:\n r9 = \"EVT_MSG\";\n r1.putString(r9, r4);\t Catch:{ all -> 0x00df }\n L_0x00ca:\n r9 = \"EVT_TIME\";\n r4 = com.tencent.liteav.basic.util.TXCTimeUtil.getTimeTick();\t Catch:{ all -> 0x00df }\n r1.putLong(r9, r4);\t Catch:{ all -> 0x00df }\n r9 = r7.mNotifyListener;\t Catch:{ all -> 0x00df }\n r9.onNotifyEvent(r3, r1);\t Catch:{ all -> 0x00df }\n L_0x00d8:\n monitor-exit(r0);\t Catch:{ all -> 0x00df }\n if (r8 != r2) goto L_0x00de;\n L_0x00db:\n r7.reportNetStatusInternal();\n L_0x00de:\n return;\n L_0x00df:\n r8 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x00df }\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.liteav.network.TXCStreamDownloader.onNotifyEvent(int, android.os.Bundle):void\");\n }", "void tryFireSignal(int mScreenY){\n int msCount = 0;\n for (MalwareApp mApp: mMalwareAppGroup) {\n if (mApp.mSignal.isAlive())\n msCount++;\n }\n\n // now check if any MalwareApp wants to Fire Signal alternating from start (i) or last (j)\n for (MalwareApp mApp : mMalwareAppGroup) {\n if (!mApp.mSignal.isAlive() && mApp.isAlive()) {\n if (mApp.mSignal.msType.getShootTime() < (System.nanoTime() - mApp.mSignal.msType.signalTime)/1000000000) {\n if (msCount < 3) {\n mApp.fireSignal(mScreenY);\n msCount++;\n } else {\n mApp.mSignal.msType.reset(System.nanoTime());\n }\n }\n }\n }\n\n }", "public void process(Object signal)\r\n/* 25: */ {\r\n/* 26:23 */ System.out.println(\"Cause observed!\");\r\n/* 27: */ }", "public abstract void isASRRejection(long ms);", "void keySequenceSoftFailure();", "void keySequenceHardFailure();", "boolean readSignature(Integer[] sig) {\n Scales.sendByte((byte) 's');\n\t /* Get actual signature */\n sig[2] = Scales.getByte();\n sig[1] = Scales.getByte();\n sig[0] = Scales.getByte();\n return true;\n }", "private static void m200a() {\r\n Object obj = AuthTask.f155a;\r\n synchronized (obj) {\r\n try {\r\n obj.notify();\r\n } catch (Exception e) {\r\n }\r\n }\r\n }", "@Override\n\tpublic void visit(SendRSAKey srsak) {\n\t\t\n\t}", "static void call_when_sign_not(String passed){\n\t\tif(!S)\n\t\t\tcomplete_call_req(passed.substring(3));\n\t}", "boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }", "@Override\n public void a(boolean bl2) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(\"com.google.android.gms.signin.internal.ISignInService\");\n int n2 = 0;\n if (bl2) {\n n2 = 1;\n }\n parcel.writeInt(n2);\n this.a.transact(4, parcel, parcel2, 0);\n parcel2.readException();\n return;\n }\n finally {\n parcel2.recycle();\n parcel.recycle();\n }\n }", "private void catch_up(int regency) {\n\n logger.debug(\"Verifying STOPDATA info\");\n ObjectOutputStream out = null;\n ByteArrayOutputStream bos = null;\n\n CertifiedDecision lastHighestCID = lcManager.getHighestLastCID(regency);\n\n int currentCID = lastHighestCID.getCID() + 1;\n HashSet<SignedObject> signedCollects = null;\n byte[] propose = null;\n int batchSize = -1;\n\n // normalize the collects and apply to them the predicate \"sound\"\n if (lcManager.sound(lcManager.selectCollects(regency, currentCID))) {\n\n logger.debug(\"Sound predicate is true\");\n\n signedCollects = lcManager.getCollects(regency); // all original collects that the replica has received\n\n Decision dec = new Decision(-1); // the only purpose of this object is to obtain the batchsize,\n // using code inside of createPropose()\n\n propose = tom.createPropose(dec);\n batchSize = dec.batchSize;\n \n try { // serialization of the CATCH-UP message\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n\n out.writeObject(lastHighestCID);\n\n\t\t//TODO: Missing: serialization of the proof?\n out.writeObject(signedCollects);\n out.writeObject(propose);\n out.writeInt(batchSize);\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n logger.info(\"Sending SYNC message for regency \" + regency);\n\n // send the CATCH-UP message\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.SYNC, regency, payload));\n\n finalise(regency, lastHighestCID, signedCollects, propose, batchSize, true);\n\n } catch (IOException ex) {\n logger.error(\"Could not serialize message\", ex);\n }\n }\n }", "@Override\n\tpublic void visit(SendSymmetricKey ssyk) {\n\t\t\n\t}", "private static void wxSignTest(){\n\t\t\n\t\tString sb=\"appid=wx791233ecd4e71c3f&attach=91_40090_3999&mch_id=1220845901&openid=oc9Xijt__DS0SyGDGqGnUPxSkDWQ&cash_fee=7600&fee_type=CNY\"+\n\t\t\t\t\"&time_end=20150831172810&bank_type=BOC_DEBIT&nonce_str\"+\n\t\t\t\t\"=5K8264ILTKCH16CQ2502SI8ZNMTM67VS&total_fee=7600&trade_type=JSAPI&result_code=SUCCESS&return_code=SUCCESS&is_subscribe=Y&out_trade_\"+\n\t\t\t\t\"no=2015083100400904657685188272&transaction_id=1007950222201508310755172159&key=48d15a39462fbe06f6391328ff685954\";\n\t\t\tString sign = DigestUtils.md5Hex(sb).toUpperCase();\n\t\t\tSystem.out.println(\"sign=\"+sign);\t\n\t}", "public synchronized void m29983k() {\n if (this.f23294u.isEmpty()) {\n if (this.f23286B == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (this.f23286B.f23372f == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeat \");\n }\n m29967a(-1, this.f23286B);\n if ((f23266a > 0 && f23266a % 3 == 0) || f23266a == 2) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7056i.m30212h(C6973b.m29776f());\n }\n });\n }\n }\n m29985m();\n C6860a.m29257b(C6973b.m29776f());\n C7059f.m30231a(C6973b.m29776f()).mo34155a();\n m29980i();\n if (XGPushConfig.isLocationEnable(C6973b.m29776f())) {\n if (f23264F == 0) {\n f23264F = C7055h.m30167a(C6973b.m29776f(), Constants.LOC_REPORT_TIME, 0);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23264F == 0 || Math.abs(currentTimeMillis - f23264F) > ((long) f23281p)) {\n final JSONObject reportLocationJson = CustomDeviceInfos.getReportLocationJson(C6973b.m29776f());\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7046a.m30130b(C6973b.m29776f(), \"location\", reportLocationJson);\n }\n });\n f23264F = currentTimeMillis;\n C7055h.m30171b(C6973b.m29776f(), Constants.LOC_REPORT_TIME, currentTimeMillis);\n }\n }\n }", "public void m1870b() {\n /*\n r3 = this;\n r2 = 1;\n r0 = \"DCVpnService\";\n r1 = \"stopVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n monitor-enter(r3);\n r0 = r3.f1317a;\t Catch:{ all -> 0x0045 }\n if (r0 != 0) goto L_0x0016;\n L_0x000d:\n r0 = \"DCVpnService\";\n r1 = \"stopVPN: already stopped\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0045 }\n monitor-exit(r3);\t Catch:{ all -> 0x0045 }\n L_0x0015:\n return;\n L_0x0016:\n r0 = 0;\n r3.f1317a = r0;\t Catch:{ all -> 0x0045 }\n monitor-exit(r3);\t Catch:{ all -> 0x0045 }\n r0 = r3.f1318c;\n if (r0 != 0) goto L_0x0026;\n L_0x001e:\n r0 = r3.f1319d;\n if (r0 != 0) goto L_0x0026;\n L_0x0022:\n r0 = r3.f1320e;\n if (r0 == 0) goto L_0x0035;\n L_0x0026:\n r3.f1321f = r2;\n r0 = \"DCVpnService\";\n r1 = \"fini\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n com.ppu.fba.NativeWrapper.jni_dickj();\n r3.m1867d();\n L_0x0035:\n r0 = r3.f1322g;\n if (r0 == 0) goto L_0x0041;\n L_0x0039:\n r0 = r3.f1322g;\t Catch:{ Exception -> 0x0048 }\n r0.close();\t Catch:{ Exception -> 0x0048 }\n L_0x003e:\n r0 = 0;\n r3.f1322g = r0;\n L_0x0041:\n r3.stopForeground(r2);\n goto L_0x0015;\n L_0x0045:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0045 }\n throw r0;\n L_0x0048:\n r0 = move-exception;\n goto L_0x003e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.b():void\");\n }", "private void doSignOn(XLinkSessionWrapper sessionWrapper)\n\t\t\tthrows XLinkISO8583Exception, IOException {\n\t\tISOMsg request = new ISOMsg();\n\t\ttry {\n\t\t\tNetworkMgtUtil.createSignOnMessage(request, sessionWrapper.getNextRequestId());\n\t\t\tlog.info(\"Sending Sign On\");\n\t\t\tXLinkISO8583Util.logISOMsg(request);\n\t\t\tsessionWrapper.send(request);\n\t\t\tISOMsg response = sessionWrapper.getChannel().receive();\n\t\t\tlog.info(\"Sign On response received\");\n\t\t\tif (response != null) {\n\t\t\t\tXLinkISO8583Util.logISOMsg(response);\n\t\t\t\tString signOnCheck = (String) response.getValue(XLinkISO8583Constant.FIELD_RESPONSE_CODE);\n\t\t\t\t//TODO: More validations required to check whether the proper response for the request.\n\t\t\t\tlog.info(\"Validating SignOn Response.\");\n\t\t\t\tif (signOnCheck != null && !signOnCheck.equalsIgnoreCase(XLinkISO8583Constant.RESPONSE_CODE_SUCCESS)) {\n\t\t\t\t\tlog.error(\"Sign On failed. Non Success reponse from X-Link\");\n\t\t\t\t\tthrow new XLinkISO8583Exception(\n\t\t\t\t\t\t\t\"error while performing sign-on disconnecting\");\n\t\t\t\t} else {\n\t\t\t\t\tsessionWrapper.setSignOn(true);\n\t\t\t\t\tlog.info(\"Signon done\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthrow new XLinkISO8583Exception(\n\t\t\t\t\t\t\"error while performing sign-on disconnecting\");\n\t\t\t}\n\t\t} catch (ISOException e) {\n\t\t\tthrow new XLinkISO8583Exception(\"error while performing do-signOn\",\n\t\t\t\t\te);\n\t\t}\n\n\t}", "public void internal_event(){\n logical_clock = logical_clock + 1;\n System.out.println(\"Internal Event Clock:\" +logical_clock);\n //encrypt(logical_clock);\n }", "public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}", "public double getSignal() {return _signal;}", "boolean hasSig();", "private void validateFermatPacketSignature(FermatPacket fermatPacketReceive){\n\n System.out.println(\" WsCommunicationVPNClient - validateFermatPacketSignature\");\n\n /*\n * Validate the signature\n */\n boolean isValid = AsymmectricCryptography.verifyMessageSignature(fermatPacketReceive.getSignature(), fermatPacketReceive.getMessageContent(), vpnServerIdentity);\n\n System.out.println(\" WsCommunicationVPNClient - isValid = \" + isValid);\n\n /*\n * if not valid signature\n */\n if (!isValid){\n throw new RuntimeException(\"Fermat Packet received has not a valid signature, go to close this connection maybe is compromise\");\n }\n\n }", "@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }", "public void broadcast(android.os.Message r11) {\n /*\n r10 = this;\n monitor-enter(r10);\n r9 = r10.mReg;\t Catch:{ all -> 0x0036 }\n if (r9 != 0) goto L_0x0007;\n L_0x0005:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n L_0x0006:\n return;\n L_0x0007:\n r4 = r11.what;\t Catch:{ all -> 0x0036 }\n r5 = r10.mReg;\t Catch:{ all -> 0x0036 }\n r3 = r5;\n L_0x000c:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 < r4) goto L_0x002f;\n L_0x0010:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 != r4) goto L_0x0034;\n L_0x0014:\n r7 = r3.targets;\t Catch:{ all -> 0x0036 }\n r8 = r3.targetWhats;\t Catch:{ all -> 0x0036 }\n r2 = r7.length;\t Catch:{ all -> 0x0036 }\n r0 = 0;\n L_0x001a:\n if (r0 >= r2) goto L_0x0034;\n L_0x001c:\n r6 = r7[r0];\t Catch:{ all -> 0x0036 }\n r1 = android.os.Message.obtain();\t Catch:{ all -> 0x0036 }\n r1.copyFrom(r11);\t Catch:{ all -> 0x0036 }\n r9 = r8[r0];\t Catch:{ all -> 0x0036 }\n r1.what = r9;\t Catch:{ all -> 0x0036 }\n r6.sendMessage(r1);\t Catch:{ all -> 0x0036 }\n r0 = r0 + 1;\n goto L_0x001a;\n L_0x002f:\n r3 = r3.next;\t Catch:{ all -> 0x0036 }\n if (r3 != r5) goto L_0x000c;\n L_0x0033:\n goto L_0x0010;\n L_0x0034:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n goto L_0x0006;\n L_0x0036:\n r9 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n throw r9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.os.Broadcaster.broadcast(android.os.Message):void\");\n }", "private void signMessage() {\n\n String messageText = messageTextArea.getText();\n SecureCharSequence secureCharSequence = new SecureCharSequence(currentPassword.getPassword());\n String signMessage = this.address.signMessage(messageText, secureCharSequence);\n signature.setText(signMessage);\n\n }", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "public void securityMessageReceived(CallPeerSecurityMessageEvent event);", "public interface IGFVoiceWakeupListener extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate static final java.lang.String DESCRIPTOR = \"com.gofun.voice.IGFVoiceWakeupListener\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an com.gofun.voice.IGFVoiceWakeupListener interface,\n * generating a proxy if needed.\n */\npublic static com.gofun.voice.IGFVoiceWakeupListener asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.gofun.voice.IGFVoiceWakeupListener))) {\nreturn ((com.gofun.voice.IGFVoiceWakeupListener)iin);\n}\nreturn new com.gofun.voice.IGFVoiceWakeupListener.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\njava.lang.String descriptor = DESCRIPTOR;\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(descriptor);\nreturn true;\n}\ncase TRANSACTION_onBeginOfSpeech:\n{\ndata.enforceInterface(descriptor);\nthis.onBeginOfSpeech();\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onWakeup:\n{\ndata.enforceInterface(descriptor);\njava.lang.String _arg0;\n_arg0 = data.readString();\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.lang.String _arg2;\n_arg2 = data.readString();\nthis.onWakeup(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onVolumeChanged:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onVolumeChanged(_arg0);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onError:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onError(_arg0);\nreply.writeNoException();\nreturn true;\n}\ndefault:\n{\nreturn super.onTransact(code, data, reply, flags);\n}\n}\n}\nprivate static class Proxy implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n@Override public void onBeginOfSpeech() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_onBeginOfSpeech, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(sst);\n_data.writeString(id);\n_data.writeString(score);\nmRemote.transact(Stub.TRANSACTION_onWakeup, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onVolumeChanged(int volume) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(volume);\nmRemote.transact(Stub.TRANSACTION_onVolumeChanged, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onError(int code) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(code);\nmRemote.transact(Stub.TRANSACTION_onError, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_onBeginOfSpeech = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_onWakeup = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_onVolumeChanged = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_onError = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\n}\npublic void onBeginOfSpeech() throws android.os.RemoteException;\npublic void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException;\npublic void onVolumeChanged(int volume) throws android.os.RemoteException;\npublic void onError(int code) throws android.os.RemoteException;\n}", "void fireSignFailed(Throwable cause);", "public void mo723b(long j) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n obtain.writeLong(j);\n this.f822a.transact(24, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public interface SignalStateListener{\n\n void onSimStateChanged(boolean sim1Exist, boolean sim2Exist) ;\n\n void onSignalStrengthsChanged(int simId, SimSignalInfo signalInfo) ;\n }", "public void sendSignal(int sig) {\n try {\n dOut.writeInt(sig);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send number of players\");\n e.printStackTrace();\n }\n }", "static void return_when_sign(String passed){\n\t\tif(S)\n\t\t\tcomplete_return_requirements();\n\t}", "@Override\n protected boolean checkSeqResetSeqNum() {\n return false;\n }", "private void handleInvalidSimNotify(int r1, android.os.AsyncResult r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.handleInvalidSimNotify(int, android.os.AsyncResult):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.handleInvalidSimNotify(int, android.os.AsyncResult):void\");\n }", "protected void onBSLock() {\n\n }", "public final void run() {\n /*\n r7 = this;\n r1 = r7.zzasj;\n monitor-enter(r1);\n r0 = r7.zzasi;\t Catch:{ RemoteException -> 0x006e }\n r0 = r0.zzasc;\t Catch:{ RemoteException -> 0x006e }\n if (r0 != 0) goto L_0x0034;\n L_0x000b:\n r0 = r7.zzasi;\t Catch:{ RemoteException -> 0x006e }\n r0 = r0.zzgt();\t Catch:{ RemoteException -> 0x006e }\n r0 = r0.zzjg();\t Catch:{ RemoteException -> 0x006e }\n r2 = \"Failed to get user properties\";\n r3 = r7.zzagj;\t Catch:{ RemoteException -> 0x006e }\n r3 = com.google.android.gms.measurement.internal.zzas.zzbw(r3);\t Catch:{ RemoteException -> 0x006e }\n r4 = r7.zzads;\t Catch:{ RemoteException -> 0x006e }\n r5 = r7.zzadz;\t Catch:{ RemoteException -> 0x006e }\n r0.zzd(r2, r3, r4, r5);\t Catch:{ RemoteException -> 0x006e }\n r0 = r7.zzasj;\t Catch:{ RemoteException -> 0x006e }\n r2 = java.util.Collections.emptyList();\t Catch:{ RemoteException -> 0x006e }\n r0.set(r2);\t Catch:{ RemoteException -> 0x006e }\n r0 = r7.zzasj;\t Catch:{ all -> 0x0059 }\n r0.notify();\t Catch:{ all -> 0x0059 }\n monitor-exit(r1);\t Catch:{ all -> 0x0059 }\n L_0x0033:\n return;\n L_0x0034:\n r2 = r7.zzagj;\t Catch:{ RemoteException -> 0x006e }\n r2 = android.text.TextUtils.isEmpty(r2);\t Catch:{ RemoteException -> 0x006e }\n if (r2 == 0) goto L_0x005c;\n L_0x003c:\n r2 = r7.zzasj;\t Catch:{ RemoteException -> 0x006e }\n r3 = r7.zzads;\t Catch:{ RemoteException -> 0x006e }\n r4 = r7.zzadz;\t Catch:{ RemoteException -> 0x006e }\n r5 = r7.zzaeg;\t Catch:{ RemoteException -> 0x006e }\n r6 = r7.zzaqk;\t Catch:{ RemoteException -> 0x006e }\n r0 = r0.zza(r3, r4, r5, r6);\t Catch:{ RemoteException -> 0x006e }\n r2.set(r0);\t Catch:{ RemoteException -> 0x006e }\n L_0x004d:\n r0 = r7.zzasi;\t Catch:{ RemoteException -> 0x006e }\n r0.zzcy();\t Catch:{ RemoteException -> 0x006e }\n r0 = r7.zzasj;\t Catch:{ all -> 0x0059 }\n r0.notify();\t Catch:{ all -> 0x0059 }\n L_0x0057:\n monitor-exit(r1);\t Catch:{ all -> 0x0059 }\n goto L_0x0033;\n L_0x0059:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0059 }\n throw r0;\n L_0x005c:\n r2 = r7.zzasj;\t Catch:{ RemoteException -> 0x006e }\n r3 = r7.zzagj;\t Catch:{ RemoteException -> 0x006e }\n r4 = r7.zzads;\t Catch:{ RemoteException -> 0x006e }\n r5 = r7.zzadz;\t Catch:{ RemoteException -> 0x006e }\n r6 = r7.zzaeg;\t Catch:{ RemoteException -> 0x006e }\n r0 = r0.zza(r3, r4, r5, r6);\t Catch:{ RemoteException -> 0x006e }\n r2.set(r0);\t Catch:{ RemoteException -> 0x006e }\n goto L_0x004d;\n L_0x006e:\n r0 = move-exception;\n r2 = r7.zzasi;\t Catch:{ all -> 0x0095 }\n r2 = r2.zzgt();\t Catch:{ all -> 0x0095 }\n r2 = r2.zzjg();\t Catch:{ all -> 0x0095 }\n r3 = \"Failed to get user properties\";\n r4 = r7.zzagj;\t Catch:{ all -> 0x0095 }\n r4 = com.google.android.gms.measurement.internal.zzas.zzbw(r4);\t Catch:{ all -> 0x0095 }\n r5 = r7.zzads;\t Catch:{ all -> 0x0095 }\n r2.zzd(r3, r4, r5, r0);\t Catch:{ all -> 0x0095 }\n r0 = r7.zzasj;\t Catch:{ all -> 0x0095 }\n r2 = java.util.Collections.emptyList();\t Catch:{ all -> 0x0095 }\n r0.set(r2);\t Catch:{ all -> 0x0095 }\n r0 = r7.zzasj;\t Catch:{ all -> 0x0059 }\n r0.notify();\t Catch:{ all -> 0x0059 }\n goto L_0x0057;\n L_0x0095:\n r0 = move-exception;\n r2 = r7.zzasj;\t Catch:{ all -> 0x0059 }\n r2.notify();\t Catch:{ all -> 0x0059 }\n throw r0;\t Catch:{ all -> 0x0059 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.measurement.internal.zzep.run():void\");\n }", "private void sendReceiveRes(){\n\t}", "private void blockUntilDone(android.media.AudioTrack r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.speech.tts.BlockingAudioTrack.blockUntilDone(android.media.AudioTrack):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.speech.tts.BlockingAudioTrack.blockUntilDone(android.media.AudioTrack):void\");\n }", "private void generateSignature(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t/*\r\n\t\t * IMPORTANT: in all other APDUs the previous APDU type gets overwritten\r\n\t\t * in process() function; this is not the case here because the\r\n\t\t * information is needed when processing to verify the security\r\n\t\t * condition for non repudiation signature\r\n\t\t * \r\n\t\t * the previous APDU type has to be overwritten in every possible exit\r\n\t\t * path out of this function; therefore we check the security conditions\r\n\t\t * of the non repudiation signature as early as possible, but we have to\r\n\t\t * overwrite the previous APDU type in the 2 possible exceptions before\r\n\t\t */\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t// check P1 and P2\t\t\r\n\t\tif (buffer[ISO7816.OFFSET_P1] != (byte) 0x9E || buffer[ISO7816.OFFSET_P2] != (byte) 0x9A) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t}\r\n\t\t// generate signature without prepare signature results:\r\n\t\t// \"conditions of use not satisfied\"\r\n\t\tif (getSignatureType() == NO_SIGNATURE) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t/*\r\n\t\t * verify authentication information throw\r\n\t\t * \"security condition not satisfied\" if something is wrong\r\n\t\t */\r\n\t\t// check if previous APDU did a cardholder PIN verification\r\n\t\tif ((getSignatureType() == NON_REPUDIATION) && (getPreviousApduType() != VERIFY_CARDHOLDER_PIN)) {\r\n\t\t\tsetPreviousApduType(OTHER);\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t}\r\n\t\t// overwrite previous ADPU type as soon as possible\r\n\t\tsetPreviousApduType(OTHER);\r\n\r\n\t\t// it is impossible to generate basic signatures with this command\r\n\t\tif (getSignatureType() == BASIC)\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// check if cardholder PIN was entered correctly\r\n\t\tif (!cardholderPin.isValidated())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\tswitch (signatureAlgorithm) {\r\n\t\tcase ALG_MD5_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Md5Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_SHA1_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Sha1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\tcase ALG_PKCS1:\r\n\t\t\t////@ close [1/2]valid(); // auto\r\n\t\t\tgeneratePkcs1Signature(apdu, buffer);\r\n\t\t\t////@ open [1/2]valid(); // auto\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t\t// if T=1, store signature in sigBuffer so that it can latter be sent\r\n\t\tif (APDU.getProtocol() == APDU.PROTOCOL_T1) {\r\n\t\t\tJCSystem.beginTransaction();\r\n\t\t\t//@ open valid(); // todo (???)\r\n\t\t\tUtil.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);\r\n\t\t\t////@ close valid(); // auto\r\n\t\t\tJCSystem.commitTransaction();\r\n\t\t\t\r\n\t\t\t// in case T=0 protocol, send the signature immediately in a\r\n\t\t\t// response APDU\r\n\t\t} else {\r\n\t\t\t// send first 128 bytes (= 1024 bit) of buffer\r\n\t\t\tapdu.setOutgoingAndSend((short) 0, (short) 128);\r\n\t\t}\r\n\t}", "private void blockUntilCompletion(android.media.AudioTrack r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.speech.tts.BlockingAudioTrack.blockUntilCompletion(android.media.AudioTrack):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.speech.tts.BlockingAudioTrack.blockUntilCompletion(android.media.AudioTrack):void\");\n }", "public void mo55177a() {\n if (!C3815z4.m2010d().mo55979a(C3815z4.C3816a.SDK_STOPPED, false)) {\n C3490e3.m665e(\"SDK is not stopped\");\n return;\n }\n if (C3615m3.this.f1449h != null) {\n C3615m3.this.f1449h.register();\n }\n C3490e3.m665e(\"SDK stop is reverting\");\n C3815z4.m2010d().mo55985b(C3815z4.C3816a.SDK_STOPPED, false);\n C3754u5.m1743f().mo55866c(false);\n C3496e5.m699h().mo55349a(false);\n AnalyticsBridge.getInstance().reportRevertStopSdkEvent();\n C3815z4.m2010d().mo55984b(C3815z4.C3816a.MISSING_EVENTS, AnalyticsBridge.getInstance().exportPendingEventsToJson());\n C3815z4.m2010d().mo55984b(C3815z4.C3816a.MISSING_EVENTS_V2, AnalyticsBridge.getInstance().exportPendingV2EventsToJson());\n }", "com.google.protobuf.ByteString\n getSignalBytes();", "private void m1866c() {\n /*\n r10 = this;\n r2 = 0;\n r1 = 1;\n r0 = \"DCVpnService\";\n r3 = \"startVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n monitor-enter(r10);\n r0 = r10.f1317a;\t Catch:{ all -> 0x0065 }\n if (r0 == 0) goto L_0x0017;\n L_0x000e:\n r0 = \"DCVpnService\";\n r1 = \"startVPN: already started\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n L_0x0016:\n return;\n L_0x0017:\n r0 = 1;\n r10.f1317a = r0;\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n r0 = \"DCVpnService\";\n r3 = \"startVPN: about to build\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n r0 = com.ppu.fba.FirewallApplication.m1851a();\n r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0);\n r3 = \"data_caching_on\";\n r3 = r0.getBoolean(r3, r2);\n r4 = \"ad_blocking_on\";\n r4 = r0.getBoolean(r4, r1);\n r5 = \"malware_shield_on\";\n r6 = r0.getBoolean(r5, r2);\n if (r3 == 0) goto L_0x0068;\n L_0x003e:\n r5 = r1;\n L_0x003f:\n if (r4 == 0) goto L_0x006a;\n L_0x0041:\n r4 = r1;\n L_0x0042:\n if (r6 == 0) goto L_0x006c;\n L_0x0044:\n r0 = r1;\n L_0x0045:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x0054;\n L_0x0049:\n r3 = new com.ppu.fba.g;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x006e }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x006e }\n L_0x0054:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x00b6;\n L_0x0058:\n r10.f1317a = r2;\n r0 = \"DCVpnService\";\n r1 = \"builder failed: stopSelf() now\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n r10.stopSelf();\n goto L_0x0016;\n L_0x0065:\n r0 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n throw r0;\n L_0x0068:\n r5 = r2;\n goto L_0x003f;\n L_0x006a:\n r4 = r2;\n goto L_0x0042;\n L_0x006c:\n r0 = r2;\n goto L_0x0045;\n L_0x006e:\n r3 = move-exception;\n r3 = new com.ppu.fba.q;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x007b }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x007b }\n goto L_0x0054;\n L_0x007b:\n r3 = move-exception;\n r6 = \"state\";\n r7 = \"vpnFail\";\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"excEst: \";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n if (r9 != 0) goto L_0x00b1;\n L_0x0091:\n r3 = \"null\";\n L_0x0093:\n r3 = r8.append(r3);\n r3 = r3.toString();\n r8 = 0;\n r3 = com.google.analytics.tracking.android.MapBuilder.createEvent(r6, r7, r3, r8);\n r3 = r3.build();\n com.ppu.fba.p009d.Log1.LogAction(r3);\n r3 = com.ppu.fba.R.string.error_vpn_establish;\n r3 = android.widget.Toast.makeText(r10, r3, r1);\n r3.show();\n goto L_0x0054;\n L_0x00b1:\n r3 = r3.getMessage();\n goto L_0x0093;\n L_0x00b6:\n r3 = r10.m1868e();\n r10.startForeground(r1, r3);\n r3 = \"DCVpnService\";\n r6 = \"init\";\n com.ppu.fba.p009d.Log1.LogF1(r3, r6);\n r3 = r10.f1322g;\n r3 = r3.getFd();\n r6 = r10.getFilesDir();\n r6 = r6.getAbsolutePath();\n r0 = com.ppu.fba.NativeWrapper.jni_dicki(r3, r6, r5, r4, r0);\n if (r0 == 0) goto L_0x00e4;\n L_0x00d8:\n r0 = \"DCVpnService\";\n r2 = \"account_init failed!!!!!\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r2);\n r10.stopForeground(r1);\n goto L_0x0016;\n L_0x00e4:\n r10.f1321f = r2;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.d;\n r1.<init>(r10);\n r2 = \"t4\";\n r0.<init>(r1, r2);\n r10.f1324i = r0;\n r0 = r10.f1324i;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.e;\n r1.<init>(r10);\n r2 = \"t0\";\n r0.<init>(r1, r2);\n r10.f1323h = r0;\n r0 = r10.f1323h;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.f;\n r1.<init>(r10);\n r2 = \"t1\";\n r0.<init>(r1, r2);\n r10.f1319d = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.o;\n r1.<init>(r10);\n r2 = \"t2\";\n r0.<init>(r1, r2);\n r10.f1320e = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.p;\n r1.<init>(r10);\n r2 = \"t3\";\n r0.<init>(r1, r2);\n r10.f1318c = r0;\n r0 = r10.f1319d;\n r0.start();\n r0 = r10.f1320e;\n r0.start();\n r0 = r10.f1318c;\n r0.start();\n goto L_0x0016;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.c():void\");\n }", "public static boolean isSigned_p_sendts() {\n return true;\n }", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "public final synchronized void cIY() {\n int i = 0;\n synchronized (this) {\n AppMethodBeat.m2504i(4443);\n C4990ab.m7417i(\"MicroMsg.Voip.VoipDeviceHandler\", \"stopDev, recorder: %s\", this.kzb);\n int i2;\n if (this.kzf == kze) {\n C46317a.Loge(\"MicroMsg.Voip.VoipDeviceHandler\", \"devcie stoped already.\");\n i2 = this.kzi;\n synchronized (i2) {\n if (this.kzb != null) {\n C4990ab.m7412e(\"MicroMsg.Voip.VoipDeviceHandler\", \"status DEV_STOP, but recorder still not null!!\");\n this.kzb.mo4590EB();\n }\n }\n } else {\n C46317a.Logi(\"MicroMsg.Voip.VoipDeviceHandler\", \"stop device..\");\n this.kzf = kze;\n if (this.sQa != null) {\n C46317a.Logd(\"MicroMsg.Voip.VoipDeviceHandler\", \"stop videodecode thread..\");\n this.sQa.sQd = true;\n C7305d.xDG.remove(this.sQa);\n this.sQa = null;\n }\n this.kzh = 1;\n this.sPR = 0;\n this.kzk = 1;\n this.sPW = 1;\n this.kzl = 0;\n this.sPX = 0;\n this.kzg = 92;\n this.sPM = 0;\n this.sPN = 0;\n this.sPO = 1;\n this.sPP = 0;\n this.kzj = 0;\n this.sNl.sPp.sUo = cIX();\n this.sNl.sPp.sUp = cIs();\n v2protocal v2protocal = this.sNl.sPp;\n if (this.kzb == null || this.sNl.sPp.sVH.sQo != (byte) 1) {\n i2 = -2;\n } else {\n i2 = this.kzb.mo4594EO();\n }\n v2protocal.sUs = i2;\n v2protocal v2protocal2 = this.sNl.sPp;\n if (this.sPL != null && this.sNl.sPp.sVH.sQo == (byte) 1) {\n i = this.sPL.cIt();\n }\n v2protocal2.sUz = (int) ((((float) C1407g.m2946KK().getStreamVolume(i)) / ((float) C1407g.m2946KK().getStreamMaxVolume(i))) * 100.0f);\n Object obj = this.kzi;\n synchronized (obj) {\n if (!(this.sPL == null || this.kzb == null)) {\n C7305d.m12298f(new C35354a(this.sPL, this.kzb), \"VoipDeviceHandler_stopDev\");\n C4990ab.m7416i(\"MicroMsg.Voip.VoipDeviceHandler\", \"do stop record\");\n }\n AppMethodBeat.m2505o(4443);\n }\n }\n AppMethodBeat.m2505o(4443);\n }\n }", "@objid (\"00421152-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface Signal extends GeneralClass {\n /**\n * The metaclass simple name.\n */\n @objid (\"6c5c9692-5da5-4c17-8cf2-68f1ac5785f2\")\n public static final String MNAME = \"Signal\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"fa6c1313-30b7-4172-bea4-c38bb1ae403b\")\n public static final String MQNAME = \"Standard.Signal\";\n\n /**\n * Getter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();\n\n /**\n * Setter for attribute 'Signal.IsEvent'\n * \n * Metamodel description:\n * <i>Establishes if it is an event in the sense of event based systems : CORBA, Java, XWindow's, SGBDR.</i>\n */\n @objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);\n\n /**\n * Getter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"7652bc7c-103c-4e5a-a8fa-ee4e662fd446\")\n boolean isIsException();\n\n /**\n * Setter for attribute 'Signal.IsException'\n * \n * Metamodel description:\n * <i>Defines if it is an exception, as they exist in Java, C++, and so on.</i>\n */\n @objid (\"9ecad15f-7403-4692-8909-d35b3a624c86\")\n void setIsException(boolean value);\n\n /**\n * Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"022e5c44-f663-4da4-8639-9b68dd8c72fb\")\n EList<SendSignalAction> getSender();\n\n /**\n * Filtered Getter for relation 'Signal->Sender'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"ced63337-39ce-42f8-90bd-d077dff7d70f\")\n <T extends SendSignalAction> List<T> getSender(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f29e2e4a-e5e9-43fa-b193-525c198df148\")\n EList<Message> getUsage();\n\n /**\n * Filtered Getter for relation 'Signal->Usage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"32b6a3ff-7ef7-493d-9a41-7f72b2ccde96\")\n <T extends Message> List<T> getUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"5fbc4043-71c3-4fa2-8c35-72372f15ccb1\")\n EList<Transition> getSends();\n\n /**\n * Filtered Getter for relation 'Signal->Sends'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8de396e-ab02-483d-b196-1ed35eed0fa2\")\n <T extends Transition> List<T> getSends(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"9a83ac2d-0b09-43f4-8fe1-99b21824cd6b\")\n Parameter getPBase();\n\n /**\n * Setter for relation 'Signal->PBase'\n * \n * Metamodel description:\n * <i>Parameter that the Signal may represent.</i>\n */\n @objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);\n\n /**\n * Getter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();\n\n /**\n * Setter for relation 'Signal->OBase'\n * \n * Metamodel description:\n * <i>The Operation that the Signal may represent.</i>\n */\n @objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);\n\n /**\n * Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d7ed9b2c-9f72-4c27-953d-a33403c8913b\")\n EList<CommunicationMessage> getCommunicationUsage();\n\n /**\n * Filtered Getter for relation 'Signal->CommunicationUsage'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"940a558d-b540-4c08-9dac-bccf65aba0cc\")\n <T extends CommunicationMessage> List<T> getCommunicationUsage(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"a51f6fac-85fb-48fa-82df-d3b3861efe20\")\n EList<DataFlow> getDOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->DOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"c8f09e68-aa31-4979-af01-1efd506d638e\")\n <T extends DataFlow> List<T> getDOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();\n\n /**\n * Filtered Getter for relation 'Signal->EOccurence'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"2c133f02-d778-4c15-874c-c08e507222c0\")\n <T extends Event> List<T> getEOccurence(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"7c271445-4f62-40f6-a5cd-146acbb64048\")\n GeneralClass getBase();\n\n /**\n * Setter for relation 'Signal->Base'\n * \n * Metamodel description:\n * <i>Class that the Signal may represent.</i>\n */\n @objid (\"332a71dc-5b01-4699-b13d-7978d6dfd6de\")\n void setBase(GeneralClass value);\n\n /**\n * Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"47a6d36a-07a0-47b5-ac0d-05c42d9fcecf\")\n EList<AcceptSignalAction> getReceiver();\n\n /**\n * Filtered Getter for relation 'Signal->Receiver'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cbd0a8e5-49ed-47a7-945c-b91754b129e5\")\n <T extends AcceptSignalAction> List<T> getReceiver(java.lang.Class<T> filterClass);\n\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 }", "public java.lang.String getReceiveSign () {\r\n\t\treturn receiveSign;\r\n\t}", "public final void m55608a(@org.jetbrains.annotations.NotNull com.tinder.pushnotifications.usecase.NotifyPushServer.NotifyReason r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = \"request\";\n kotlin.jvm.internal.C2668g.b(r3, r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.NotifyReason.APP_OPENED;\n if (r3 != r0) goto L_0x000e;\n L_0x0009:\n r3 = r2.f46002b;\t Catch:{ SecurityException -> 0x000e }\n r3.cancelAll();\t Catch:{ SecurityException -> 0x000e }\n L_0x000e:\n r3 = r2.f46003c;\n r3 = r3.d();\n if (r3 == 0) goto L_0x005f;\n L_0x0016:\n r3 = r2.f46005e;\n r3 = r3.a();\n r3 = r3.getLanguage();\n r3 = rx.Single.a(r3);\n r0 = new com.tinder.pushnotifications.usecase.NotifyPushServer$a;\n r0.<init>(r2);\n r0 = (rx.functions.Func1) r0;\n r3 = r3.d(r0);\n r0 = new com.tinder.pushnotifications.usecase.NotifyPushServer$b;\n r0.<init>(r2);\n r0 = (rx.functions.Func1) r0;\n r3 = r3.c(r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.C17888c.f55780a;\n r0 = (rx.functions.Func1) r0;\n r3 = r3.a(r0);\n r0 = r2.f46001a;\n r0 = r0.notifyPushServerAppOpen();\n r3 = r3.b(r0);\n r0 = rx.schedulers.Schedulers.io();\n r3 = r3.b(r0);\n r0 = com.tinder.pushnotifications.usecase.NotifyPushServer.C18651d.f58120a;\n r0 = (rx.functions.Action0) r0;\n r1 = com.tinder.pushnotifications.usecase.NotifyPushServer.C18652e.f58121a;\n r1 = (rx.functions.Action1) r1;\n r3.a(r0, r1);\n L_0x005f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tinder.pushnotifications.usecase.NotifyPushServer.a(com.tinder.pushnotifications.usecase.NotifyPushServer$NotifyReason):void\");\n }", "public void performRecovery();", "protected void updateNextLifeSign() {\n nextLifeSignToSend = System.currentTimeMillis() + NotEOFConstants.LIFE_TIME_INTERVAL_CLIENT;\n }", "public static void main(String[] args) {\r\n\r\n String message = \"Hello, I'm Alice!\";\r\n // Alice's private and public key\r\n RSA rsaAlice = new RSA();\r\n rsaAlice.generateKeyPair();\r\n // Bob's private and public key\r\n RSA rsaBob = new RSA();\r\n rsaBob.generateKeyPair();\r\n // encrypted message from Alice to Bob\r\n BigInteger cipher = rsaAlice.encrypt(message, rsaBob.pubKey);\r\n // create digital signature by Alice\r\n BigInteger signature = rsaAlice.createSignature(message);\r\n\r\n // Bob decrypt message and verify signature\r\n String plain = rsaBob.decrypt(cipher, rsaBob.pubKey);\r\n boolean isVerify = rsaBob.verifySignature(plain, signature, rsaAlice.pubKey);\r\n\r\n if( isVerify )\r\n {\r\n System.out.println(\"Plain text : \" + plain);\r\n }\r\n\r\n /**\r\n * Part II. Two-part RSA protocol to receive\r\n * session key, with signature\r\n */\r\n\r\n // A's private and public key\r\n RSA rsaA = new RSA();\r\n rsaA.generateKeyPair();\r\n // B's private and public key\r\n RSA rsaB = new RSA();\r\n rsaB.generateKeyPair();\r\n\r\n BigInteger newSessionKey = new BigInteger(\"123456789123465\", 10);\r\n // create message by A\r\n BigInteger S = newSessionKey.modPow(rsaA.getPrivKeyD(), rsaA.pubKey[1]);\r\n BigInteger k1 = newSessionKey.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n BigInteger S1 = S.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n\r\n // --------- sending message to B --------- >>>\r\n\r\n // receive message by B and take new session key\r\n BigInteger k = k1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger Sign = S1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger verifyK = Sign.modPow(rsaA.pubKey[0], rsaA.pubKey[1]);\r\n\r\n if(verifyK.equals(k))\r\n {\r\n System.out.println(\"B receive new session key from A: \" + k.toString());\r\n }\r\n else\r\n {\r\n System.out.println(\"B receive FAKE session key from A: \" + k.toString());\r\n }\r\n\r\n }", "private static String signFirstTime() throws AddressFormatException\n {\n ECKey key1 = ECKey.fromPrivate(new BigInteger(\"64102401986961187973900162212679081334328198710146539384491794427145725009072\"));\n\n\n // Use the redeem script we have saved somewhere to start building the transaction\n Script redeemScript = new Script(hexStringToByteArray(\"5221021ae8964b8529dc3e52955f2cabd967e08c52008dbcca8e054143b668f3998f4a210306be609ef37366ab0f3dd4096ac23a6ee4d561fc469fa60003f799b0121ad1072102199f3d89fa00e6f55dd6ecdd911457d7264415914957db124d53bf0064963f3853ae\"));\n\n // Start building the transaction by adding the unspent inputs we want to use\n // The data is taken from blockchain.info, and can be found here: https://blockchain.info/rawtx/ca1884b8f2e0ba88249a86ec5ddca04f937f12d4fac299af41a9b51643302077\n Transaction spendTx = new Transaction(params);\n ScriptBuilder scriptBuilder = new ScriptBuilder();\n scriptBuilder.data(new String(\"a9145204ad7c5fa5a2491cd91c332e28c87221194ca087\").getBytes()); // Script of this output\n TransactionInput input = spendTx.addInput(new Sha256Hash(\"fed695bf5e2c15286956a7bd3464c5beb97ef064e1f9406eba189ea844733e7c\"), 1, scriptBuilder.build());\n\n // Add outputs to the person receiving bitcoins\n Address receiverAddress = new Address(params, \"n2cWhs5sbWFCwzuuWWsVM9ubPwykGtX75T\");\n Coin charge = Coin.valueOf(1000000); // 0.1 mBTC\n Script outputScript = ScriptBuilder.createOutputScript(receiverAddress);\n spendTx.addOutput(charge, outputScript);\n\n /*8888888888888888888888888888888888888888888888888888888888888*/\n\n // Sign the first part of the transaction using private key #1\n Sha256Hash sighash = spendTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);\n ECKey.ECDSASignature ecdsaSignature = key1.sign(sighash);\n TransactionSignature transactionSignarture = new TransactionSignature(ecdsaSignature, Transaction.SigHash.ALL, false);\n\n // Create p2sh multisig input script\n Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(Arrays.asList(transactionSignarture), redeemScript);\n\n // Add the script signature to the input\n input.setScriptSig(inputScript);\n System.out.println(byteArrayToHex(spendTx.bitcoinSerialize()));\n\n return byteArrayToHex(spendTx.bitcoinSerialize());\n }", "public static native long set(long msgArg, String signature, byte arg) throws BusException;", "public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);", "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 handshake() {\n Log.d(TAG, \"handshake: called\");\n\n if (takeBertyService()) {\n if (takeBertyCharacteristics()) {\n // Speed up connection\n requestMtu(PeerDevice.MAX_MTU);\n\n // send local PID\n if (!write(getPIDCharacteristic() ,mLocalPID.getBytes(), true)) {\n Log.e(TAG, String.format(\"handshake error: failed to send local PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n // get remote PID\n if (!read(getPIDCharacteristic())) {\n Log.e(TAG, String.format(\"handshake error: failed to read remote PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n return ;\n }\n }\n Log.e(TAG, String.format(\"handshake error: failed to find berty service: device=%s\", getMACAddress()));\n disconnect();\n }", "private synchronized void m16565c() {\n if (!(this.f14719b || this.f14723f.hasMessages(this.f14724g))) {\n this.f14723f.sendMessageDelayed(this.f14723f.obtainMessage(this.f14724g), 2000);\n }\n }", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "public void setSignal(jigl.signal.Signal sig) throws BadSignalException {\n\t\timage = getJavaSignal(sig);\n\t\tjsignal = sig;\n\t}", "@Override\n public void transferred(long num) {\n }", "@Override\n public void transferred(long num) {\n }", "public synchronized static void signal( byte code, Object src_obj, Exception e ) {\n if(e!=null) {\n if(e.getMessage()!=null)\n signal( code, src_obj, e.getMessage() );\n else\n signal( code, src_obj, e.toString() );\n }\n else\n signal( code, src_obj, \"<null exception>\" );\n\n if( displayExceptionStack && e!=null )\n out.println( \"EXCEPTION STACK: \"+getStackTrace(e) );\n }", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "protected void engineInitSign(java.security.PrivateKey r1) throws java.security.InvalidKeyException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.engineInitSign(java.security.PrivateKey):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.engineInitSign(java.security.PrivateKey):void\");\n }", "static /* synthetic */ void m68576q(C40031m c40031m) {\n AppMethodBeat.m2504i(4447);\n synchronized (c40031m.kzi) {\n try {\n C22458a c22458a = new C22458a();\n C46317a.Logi(\"MicroMsg.Voip.VoipDeviceHandler\", \" VoipDeivceHandler.GetAudioDeviceFmt, record samplerate:\" + c22458a.pug + \", framelen: \" + c22458a.sNh + \", ret:\" + c40031m.sNl.sPp.mo63273a(c22458a));\n c40031m.kzb = new C1292c(c22458a.pug, c22458a.channels, 1);\n c40031m.kzb.mo4598gG(c22458a.sNh);\n c40031m.kzb.mo4596br(true);\n c40031m.kzb.mo4591EJ();\n c40031m.kzb.cpB = -19;\n c40031m.kzb.mo4599v(1, false);\n c40031m.kzb.mo4595bq(true);\n c40031m.kzb.cpM = c40031m.kzo;\n if (!(c40031m.kzb.mo4592EL() || c40031m.kzb.cpq == 13)) {\n c40031m.kzj = 1;\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.m2505o(4447);\n }\n }\n C46317a.Logd(\"MicroMsg.Voip.VoipDeviceHandler\", \" VoipDeivceHandler.m_iAudioDevErr:\" + c40031m.kzj);\n c40031m.sNl.mo26287Ge(c40031m.kzj);\n c40031m.sNl.sPp.sVH.sQo = (byte) 1;\n }", "zzang mo29839S() throws RemoteException;", "private static String sign(String data, String key)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMac mac = Mac.getInstance(\"HmacSHA1\");\n\t\t\t\tmac.init(new SecretKeySpec(key.getBytes(), \"HmacSHA1\"));\n\t\t\t\treturn Base64.encodeBytes(mac.doFinal(data.getBytes(\"UTF-8\")));\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(new SignatureException(\"Failed to generate signature: \" + e.getMessage(), e));\n\t\t\t}\n\t\t}", "@EventHandler(priority = EventPriority.MONITOR)\r\n\tpublic void onSignChange(SignChangeEvent event) {\r\n\t\t\r\n\t\tfinal Player creator = (Player)event.getPlayer();\r\n\t\tfinal InputPlayer iplayer = bSignModule.GUI_API.getPlayer(creator);\r\n\t\tfinal Location signLocation = event.getBlock().getLocation();\r\n\t\t\r\n\t\tSign newSign = null;\r\n\t\t\r\n\t\tif (event.getLine(0).equalsIgnoreCase(\"--weblink--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.web\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new WebSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the web link to link to\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--command--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.command\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new CommandSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the command for this sign to execute\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--info--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.info\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new InfoSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the info message for this sign\"));\r\n\t\t}\r\n\t\t\r\n\t\tbSignModule.SIGNS.add(newSign);\r\n\t\t\r\n\t}", "@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}", "public void mo749s() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(18, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }" ]
[ "0.575773", "0.56415063", "0.5562833", "0.5542746", "0.5488382", "0.54747754", "0.5450289", "0.53918105", "0.53078663", "0.53077585", "0.53068656", "0.52864754", "0.52570665", "0.52406186", "0.51883847", "0.5184656", "0.5168759", "0.51605064", "0.5153652", "0.51378983", "0.51371086", "0.5113874", "0.5084362", "0.5080948", "0.50807685", "0.5077522", "0.5070772", "0.5057073", "0.504313", "0.502864", "0.5025864", "0.50202996", "0.5019105", "0.50180465", "0.50089824", "0.5003504", "0.50008076", "0.4994444", "0.49931136", "0.49916556", "0.4981715", "0.49622133", "0.4953895", "0.49496356", "0.49381468", "0.493173", "0.4927506", "0.4925552", "0.4919449", "0.4912185", "0.49117053", "0.49111888", "0.49088502", "0.48921263", "0.48877913", "0.48818177", "0.48787183", "0.48758695", "0.48650864", "0.4863812", "0.4860346", "0.48590374", "0.4855687", "0.48501268", "0.48467022", "0.48443276", "0.48439965", "0.48413494", "0.4833056", "0.48318225", "0.48285222", "0.4827021", "0.4826646", "0.4825921", "0.4824114", "0.4816314", "0.4813322", "0.4813285", "0.48128387", "0.4810684", "0.4809587", "0.48059967", "0.48026934", "0.48017946", "0.48005247", "0.48003352", "0.48001438", "0.4799097", "0.4797421", "0.4796549", "0.47953948", "0.47953948", "0.4790047", "0.47874218", "0.47785583", "0.47783762", "0.47683293", "0.47665638", "0.4765152", "0.47613007", "0.47567025" ]
0.0
-1
expects that the currentStageNumber is reasonable
public static AccessCertificationStageType findCurrentStage(AccessCertificationCampaignType campaign) { return findStage(campaign, campaign.getStageNumber()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStageNumber(Integer stageNumber) {\n this.stageNumber = stageNumber;\n }", "public Integer getStageNumber() {\n return stageNumber;\n }", "public void setStage(){\n if(id < 3)\n stage = 1;\n if(id >= 3 && id < 6)\n stage = 2;\n if(id >= 6 && id < 9)\n stage = 3;\n if(id >= 9)\n stage = 4;\n }", "@java.lang.Override\n public int getStageValue() {\n return stage_;\n }", "private void evaluateStage(){\n switch (currentStage){\n case EGG: if (getLifetime() >= ModelSettings.brood_lifetime_egg)\n currentStage = LARVAE;\n break;\n case LARVAE: if (getLifetime() >= ModelSettings.brood_lifetime_larvae)\n currentStage = PUPAE;\n break;\n case PUPAE: if (getLifetime() >= ModelSettings.brood_lifetime_pupae)\n System.out.println(\"This pupae is now an adult!\");\n //TODO trigger manager\n break;\n }\n }", "@java.lang.Override\n public int getStageValue() {\n return stage_;\n }", "String getStage();", "public void setStageProgression(float stageProgression)\n\t{\n\t\tthis.stageProgression = stageProgression;\n\t}", "public void setCurrStage(Vector4f currStage)\n\t{\n\t\tthis.currStage = currStage;\n\t}", "public int getCurrentStage() {\n return currentStage;\n }", "public void setStage(Stage currStage) \n\t{\n\t\t// We do not create a new stage because we want to reference of the stage being passed in\n\t\tcurrentStage = currStage;\n\t}", "@Override\r\n\tpublic void setStage(int stage) {\n\r\n\t}", "public void setStage(int stage) {\r\n\t\tthis.stage = stage;\r\n\t}", "java.lang.String getStageId();", "public void setCurrentStage(int s) {\n if (s < getMaxNumOfStages()) {\n currentStage = s;\n } else {\n currentStage = getMaxNumOfStages();\n }\n }", "public void setStageName(String stageName) {\n this.stageName = stageName;\n }", "public void next(){\n if(stageNum < (defineStageNum)) {\n stageNum++;\n }else {\n stageNum = startStageNum;\n }\n }", "public void nextStage() {\n\t\tcurrentStage.setActive(false);\n\t\tcurrentStageNumber++;\n\t\tchildren.add(currentStage = new Stage(this, StageLocations.mesta2, currentStageNumber));\n\t}", "public abstract Stage getNextStage(int score);", "String getStageName();", "public String getStageName() {\n return stageName;\n }", "@Override\n\tpublic java.lang.String getStage() {\n\t\treturn _scienceApp.getStage();\n\t}", "public String getCurrentStage() {\n return getProperty(Property.CURRENT_STAGE);\n }", "public void setStage(Stage currentStage)\n\t{\n\t\tthis.thisStage = currentStage;\n\t\tthisStage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent t) {\n\t\t\t\t//Platform.exit();\n\t\t\t}\n\t\t});\n\t}", "abstract boolean processStage(Stage stage, Object data);", "final Stage getLocalStage() {\n\t\t// retrnamos la etapa actual\n\t\treturn this.localStage;\n\t}", "public void addNewStage() {\n\t\tif (stage != 0 && getCurrentActions().isEmpty()) { // This should be validated by the command\n\t\t\tthrow new IllegalStateException(\"Cannot progress stage without actions\");\n\t\t}\n\n\t\tstage = amountOfStages\n\t\t\t\t+ 1; // The stage that is being edited may not be the latest so make sure not to duplicate\n\t\tamountOfStages++;\n\t\tstagesOfActions.putIfAbsent(stage, new LinkedHashMap<>());\n\t\tstageJsons.putIfAbsent(stage, new JsonObject());\n\t}", "public Builder setStageValue(int value) {\n stage_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }", "public Stage getStage() {\n return stage;\n }", "public void setStage(Stage ventana) {\n\t\t\n\t}", "public void setSTAGE(BigDecimal STAGE) {\r\n this.STAGE = STAGE;\r\n }", "public void setEditingStage(int stage) {\n\t\tif (amountOfStages < stage) {\n\t\t\tthrow new IllegalArgumentException(\"Attempting to switch to stage which does not exist\");\n\t\t}\n\n\t\tthis.stage = stage;\n\t}", "public Stage getStage() {\n return stage;\n }", "public Stage getStage() {\n return stage;\n }", "public Stage getStage() {\n return stage;\n }", "public void removeLatestStage() {\n\t\tamountOfStages--;\n\t\tstage = amountOfStages; // Prevent editing a removed stage\n\n\t\tint removedStage = amountOfStages + 1;\n\t\tstageJsons.remove(removedStage);\n\t\tstagesOfActions.remove(removedStage);\n\t}", "public void goToPreviousStagesActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, PreviousStagesActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "public ProcessingStage getStage();", "static String getStageFromBlockMeta(int meta){\n if(meta == 0)\n return \"1 of 8 (0%)\";\n\n if(meta == 1)\n return \"2 of 8 (14%)\";\n\n if(meta == 2)\n return \"3 of 8 (29%)\";\n\n if(meta == 3)\n return \"4 of 8 (43%)\";\n\n if(meta == 4)\n return \"5 of 8 (57%)\";\n\n if(meta == 5)\n return \"6 of 8 (71%)\";\n\n if(meta == 6)\n return \"7 of 8 (85%)\";\n\n if(meta == 7)\n return \"8 of 8 (100%)\";\n\n return \"Unknown\";\n }", "Object getMaterializationStage(Object groupID) throws Exception;", "private void moveToStage() {\n\n switch (host.getUnlockedStages()) {\n case 5:\n if (stage5Point.getTouch()) {\n host.setCurrentStage(5);\n removeOtherPointActors(stage5Point);\n moveAndZoomAction(stage5Point);\n break;\n }\n case 4:\n if (stage4Point.getTouch()) {\n host.setCurrentStage(4);\n removeOtherPointActors(stage4Point);\n moveAndZoomAction(stage4Point);\n break;\n }\n case 3:\n if (stage3Point.getTouch()) {\n host.setCurrentStage(3);\n removeOtherPointActors(stage3Point);\n moveAndZoomAction(stage3Point);\n break;\n }\n case 2:\n if (stage2Point.getTouch()) {\n host.setCurrentStage(2);\n removeOtherPointActors(stage2Point);\n moveAndZoomAction(stage2Point);\n break;\n }\n case 1:\n if (stage1Point.getTouch()) {\n host.setCurrentStage(1);\n removeOtherPointActors(stage1Point);\n moveAndZoomAction(stage1Point);\n break;\n }\n }}", "final void setLocalStage(final Stage newStage) {\n\t\t// almacenamos la nueva etapa\n\t\tthis.localStage = newStage;\n\t\t// mostramos un mensaje\n\t\tthis.getLogger().debug(\"Changing Local Stage to: \" + this.getLocalStage());\n\t}", "public void nextStage(){\n\t\tif (this.stage >= MAX_STAGES){\n\t\t\treturn;\n\t\t}\n\t\tthis.stage++;\n\t\trepaint(); // Update stage.\n\t}", "public void goToStageActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, StageActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "public void setStage(Stage stage) {\n\t\tthis.stage = stage;\n\t}", "public void endCurrentStage() {\n \n stages.getItem(currentStage - 1).setIsFinished(true);\n stages.getItem(currentStage - 1).setEndDate(super.getTimeFormat().format(LocalDateTime.now()));\n if (stages.getItem(currentStage - 1).isFinished()) {\n currentStage++;\n } else {\n System.out.println(\"Por favor, revise y emprenda acciones en su producción \" +\n \"para cumplir con los estándares de calidad, tome nuevos datos e intente de nuevo.\");\n }\n }", "com.google.protobuf.ByteString getStageIdBytes();", "public void setStageDescription(String stageDescription) {\n this.stageDescription = stageDescription;\n }", "String getStageClass();", "int getExecutionStageStateValue();", "@Override\r\n public StageDto updateStage(StageDto stageDto) {\n return null;\r\n }", "public void stageItem(int slotNum) {\n stagedItemSlotNum = slotNum;\n logger.debug(\"Item is staged\");\n if (!(selectedInventory.checkIfItemInSlot(slotNum))) {\n logger.debug(\"Item in the slot is empty\");\n stagedItem = null;\n } else {\n logger.debug(\"Item in the slot was not empty\");\n stagedItem = selectedInventory.getItemFromSlot(slotNum);\n stagedItemEmpty = false;\n }\n updateControllers();\n draw();\n }", "public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "private void addStage(Stage s) {\r\n\t\tstages[num_stages] = s;\r\n\t\tnum_stages++;\r\n\t}", "@Override\n\tpublic void setStage(java.lang.String stage) {\n\t\t_scienceApp.setStage(stage);\n\t}", "public Stage retrieveStage()\n {\n return gameStage;\n }", "public void setProdutoStage(Stage produtoStage) {\n\t\tthis.produtoStage = produtoStage;\n\t}", "private boolean isStageRequired(final String stage) {\n return mRegistrationResponse != null\n && isRequired(stage)\n && !isCompleted(stage);\n }", "@Override\r\n\tpublic void onStageComplete(int stage) {\n\t\tint x = 0 ; \r\n\t\tif (stage == 8 ) {\r\n\t\t\tStageTitle.setText(\"Stage \");\r\n\t\t\t\r\n\t\t\r\n\t\t\tStageTitle.setSize(StageTitle.getPreferredSize());\r\n\t\t\tStageTitle.setLocation((getWidth()-StageTitle.getWidth())/2, Title.getHeight()+40);\r\n\t\t\r\n\t\t\tStageNumber.setText(\"\"+16);\r\n\t\t\t\r\n\t\t\r\n\t\t\tStageNumber.setForeground(new Color(204, 0, 51)); \r\n\t\t\tStageNumber.setSize(StageNumber.getPreferredSize());\r\n\t\t\tStageNumber.setLocation(StageTitle.getX()+StageTitle.getWidth(), Title.getHeight()+40);\r\n\t\t\t\r\n\t\tStage8 = new JPanel() ; \t\t\r\n\t\tStage8.setLayout(new GridLayout(2, 4));\r\n\t\t \r\n\t\t\t\tfor (int i = 0 ; i < tournament.getTournamentMatch().length;i++) {\r\n\t\t\t\t\tMatchLayout temp = new MatchLayout(tournament.getTournamentMatch()[i], (Fighter)tournament.getTournamentMatch()[i].getPlayer1(), (Fighter)tournament.getTournamentMatch()[i].getPlayer2());\r\n\t\t\t\t\ttemp.setSize( getWidth()/4 , getHeight()/4);\r\n\t\t\t\t\ttemp.setOpaque(false);\r\n\t\t\t Stage8.add(temp) ; \r\n\t\t\t\t}\r\n\t\t\t\tStage8.setSize(Stage8.getPreferredSize());\r\n\t\t\t\tStage8.setOpaque(false);\r\n\t\t\t\tStage8.setLocation(getWidth()/2 - Stage8.getWidth()/2 ,getHeight()/2 -Stage8.getHeight()/4 ); \r\n\t\t\t\tadd(Stage8) ; \r\n\t\t\t\tStage16.setVisible(false );\r\n\t\t}\r\n\t\telse if (stage == 4 ) { \r\n\t\t\tStageTitle.setText(\"Stage \");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tStageTitle.setSize(StageTitle.getPreferredSize());\r\n\t\t\tStageTitle.setLocation((getWidth()-StageTitle.getWidth())/2, Title.getHeight()+40);\r\n\t\t\r\n\t\t\tStageNumber.setText(\"\"+8);\r\n\t\t\t\r\n\t\t\r\n\t\t\tStageNumber.setForeground(new Color(204, 0, 51)); \r\n\t\t\tStageNumber.setSize(StageNumber.getPreferredSize());\r\n\t\t\tStageNumber.setLocation(StageTitle.getX()+StageTitle.getWidth(), Title.getHeight()+40);\r\n\t\t\tStage4 = new JPanel() ; \r\n\t\t\tStage4.setOpaque(false);\r\n\t\t\tStage4.setLayout(new GridLayout(2, 2));\r\n\t\t\t \r\n\t\t\t\t\tfor (int i = 0 ; i < tournament.getTournamentMatch().length;i++) {\r\n\t\t\t\t\t\tMatchLayout temp = new MatchLayout(tournament.getTournamentMatch()[i], (Fighter)tournament.getTournamentMatch()[i].getPlayer1(), (Fighter)tournament.getTournamentMatch()[i].getPlayer2());\r\n\t\t\t\t\t\ttemp.setSize( getWidth()/2 , getHeight()/2);\r\n\t\t\t\t\t\ttemp.setOpaque(false);\r\n\t\t\t\t\t\tStage4.add(temp) ; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tStage4.setSize(Stage4.getPreferredSize());\r\n\t\t\t\t\t\r\n\t\t\t\t\tStage4.setLocation(getWidth()/2 - Stage4.getWidth()/2 ,getHeight()/2 -Stage4.getHeight()/2 ); \r\n\t\t\t\t\tadd(Stage4) ; \r\n\t\t\t\t\tStage8.setVisible(false );\r\n\t\t}\r\n\t\telse if (stage == 2 ) { \r\n\t\t\tStageTitle.setText(\"Semi Finals \");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tStageTitle.setSize(StageTitle.getPreferredSize());\r\n\t\t\tStageTitle.setLocation((getWidth()-StageTitle.getWidth())/2, Title.getHeight()+40);\r\n\t\t\r\n\t\t\tStageNumber.setText(\"\");\r\n\t\t\t\r\n\t\t\r\n\t\t\tStageNumber.setForeground(new Color(204, 0, 51)); \r\n\t\t\tStageNumber.setSize(StageNumber.getPreferredSize());\r\n\t\t\tStageNumber.setLocation(StageTitle.getX()+StageTitle.getWidth(), Title.getHeight()+40);\r\n\t\t\tStage2 = new JPanel() ; \r\n\t\t\tStage2.setOpaque(false); \r\n\t\t\tStage2.setLayout(new GridLayout(0, 2));\r\n\t\t\t \r\n\t\t\t\t\tfor (int i = 0 ; i < tournament.getTournamentMatch().length;i++) {\r\n\t\t\t\t\t\tMatchLayout temp = new MatchLayout(tournament.getTournamentMatch()[i], (Fighter)tournament.getTournamentMatch()[i].getPlayer1(), (Fighter)tournament.getTournamentMatch()[i].getPlayer2());\r\n\t\t\t\t\t\ttemp.setSize( getWidth()/2, getHeight()/2);\r\n\t\t\t\t\t\ttemp.setOpaque(false);\r\n\t\t\t\t\t\tStage2.add(temp) ; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tStage2.setSize(Stage2.getPreferredSize());\r\n\t\t\t\t\t\r\n\t\t\t\t\tStage2.setLocation(getWidth()/2 - Stage2.getWidth()/2 ,getHeight()/2 -Stage2.getHeight()/2 ); \r\n\t\t\t\t\tadd(Stage2) ; \r\n\t\t\t\t\tx++ ; \r\n\t\t\t\t\tStage4.setVisible(false );\r\n\t\t}\r\n\t\telse if (stage == 1 ) {\r\n StageTitle.setText(\"Finals \");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tStageTitle.setSize(StageTitle.getPreferredSize());\r\n\t\t\tStageTitle.setLocation((getWidth()-StageTitle.getWidth())/2, Title.getHeight()+40);\r\n\t\t\tStage1 = new JPanel() ; \r\n\t\t\tStage1.setOpaque(false );\r\n\t\t\tStage1.setLayout(new GridLayout(0, 1));\r\n\t\t\t System.out.println(tournament.getTournamentMatch().length);\r\n\t\t\t\t\tfor (int i = 0 ; i < tournament.getTournamentMatch().length;i++) {\r\n\t\t\t\t\t\tMatchLayout temp = new MatchLayout(tournament.getTournamentMatch()[i], (Fighter)tournament.getTournamentMatch()[i].getPlayer1(), (Fighter)tournament.getTournamentMatch()[i].getPlayer2());\r\n\t\t\t\t\t\ttemp.setSize( getWidth()/2, getHeight()/2);\r\n\t\t\t\t\t\ttemp.setOpaque(false);\r\n\t\t\t\t\t\tStage1.add(temp) ; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tStage1.setSize(Stage1.getPreferredSize());\r\n\t\t\t\t\tSystem.out.println(Stage1.getSize());\r\n\t\t\t\t\tStage1.setLocation(getWidth()/2 - Stage1.getWidth()/2 ,getHeight()/2 -Stage1.getHeight()/2 ); \r\n\t\t\t\t\tadd(Stage1) ; \r\n\t\t\t\t\tx++ ; \r\n\t\t\t\t\tStage2.setVisible(false );\r\n\t\t}\r\n\t\r\n\t}", "private void closeStage() {\n ImmutableSet<FlowTableOperation> stage = currentStage.build();\n if (!stage.isEmpty()) {\n listBuilder.add(stage);\n }\n }", "@Override\n\tpublic void buildStageByStyle(Stage stage, BaseController root) {\n\t\t\n\t}", "public void removeStage(int idx) {\r\n\t\tSystem.out.println(\"Removing stage # \" + idx);\r\n\t\tstages.remove(idx);\r\n\t\tSystem.out.println(\"Pipeline contains \" + stages.size() + \" stages\");\r\n\t}", "public void add_stage() {\r\n\t\tif (this.controller.getSelectedCatagory() == null)\r\n\t\t\treturn;\r\n\t\tString name = JOptionPane.showInputDialog(this,\r\n\t \t\"Choose a name for the stage\",\r\n\t \"Name Stage\", 1);\r\n\t if (name == null) {\r\n\t \treturn;\r\n\t }\r\n\t // If the stage cannot be added, inform the user\r\n\t\tif (!controller.addStage(name)) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A Stage with that name already exists\");\r\n\t\t}\r\n\t}", "public StagePosition makeStagePosition();", "public static String stageName(Stage s){\n return s.name();\n }", "public String getStageDescription() {\n return stageDescription;\n }", "@Test\n\tpublic void testStageProceed() {\n\t\t\n\t\tSystem.out.println(\"\\nTest case : Next stage\");\n\t\t\n\t\tStageScene test = new StageScene() ;\n\t\t\n\t\tassertEquals(0 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"Before frog reach stage 1's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\t\n\t\tGoal goal1 = new Goal(10,105) ;\n\t\t\n\t\tAnimal animal = new Animal(\"file:Resources/Frog/frogUp1.png\") ;\n\t\tanimal.setX(10) ;\n\t\tanimal.setY(105) ;\n\t\t\n\t\ttest.add(goal1) ;\n\t\ttest.add(animal) ;\n\t\t\n\t\tanimal.act(0);\n\t\t\n\t\ttest.createStageTimer();\n\t\t\n\t\tassertEquals(1 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"After frog reached stage 1's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\tSystem.out.println(\"Stage 1 is completed , proceed to stage 2\") ;\n\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before frog reach stage 2's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\t\n\t\tGoal goal2 = new Goal(140,105) ;\n\t\t\n\t\tanimal.setX(140) ;\n\t\tanimal.setY(105) ;\n\t\t\n\t\ttest.add(goal2);\n\t\t\n\t\tanimal.act(0);\n\t\t\n\t\tassertEquals(2 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"After frog reached stage 2's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\tSystem.out.println(\"Stage 2 is completed , proceed to stage 3\") ;\n\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before frog reach stage 3's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\t\n\t\tGoal goal3 = new Goal(265,105) ;\n\t\t\n\t\tanimal.setX(265) ;\n\t\tanimal.setY(105) ;\n\t\t\n\t\ttest.add(goal3);\n\t\t\n\t\tanimal.act(0);\n\t\t\n\t\tassertEquals(3 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"After frog reached stage 3's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\tSystem.out.println(\"Stage 3 is completed , proceed to stage 4\") ;\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before frog reach stage 4's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\t\n\t\tGoal goal4 = new Goal(393,105) ;\n\t\t\n\t\tanimal.setX(393) ;\n\t\tanimal.setY(105) ;\n\t\t\n\t\ttest.add(goal4);\n\t\t\n\t\tanimal.act(0);\n\t\t\n\t\tassertEquals(4 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"After frog reached stage 4's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\tSystem.out.println(\"Stage 4 is completed , proceed to stage 5\") ;\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before frog reach stage 5's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\t\n\t\tGoal goal5 = new Goal(520,105) ;\n\t\t\n\t\tanimal.setX(520) ;\n\t\tanimal.setY(105) ;\n\t\t\n\t\ttest.add(goal5);\n\t\t\n\t\tanimal.act(0);\n\t\t\n\t\tassertEquals(5 , StageScene.stageCompleted) ;\n\t\t\n\t\tSystem.out.println(\"After frog reached stage 5's goal :\") ;\n\t\tSystem.out.println(\"end : \" + StageScene.stageCompleted);\n\t\tSystem.out.println(\"Stage 5 is completed , end game\") ;\n\t}", "private void setPrimaryStage(Stage pStage) {\n GUI.pStage = pStage;\n }", "public BigDecimal getSTAGE() {\r\n return STAGE;\r\n }", "public Stage returnStage() {\n\t\t\treturn stage;\n\t\t}", "java.lang.String getExecutionStageName();", "private Optional<List<Stage>> toStages(Holder.Stage stage) {\n if (stage.isSyntheticStage()) {\n log.debug(\"Discarding synthetic stage\");\n return Optional.empty();\n }\n\n Status stageStatus =\n Status.valueOf(parseEnum(Status.getDescriptor(), stage.getStatus().toUpperCase()));\n Stage.Builder stageBuilder = Stage.newBuilder().setType(stage.getType()).setStatus(stageStatus);\n\n List<Stage> returnList = new ArrayList<>();\n String cloudProvider = stage.getContext().getCloudProvider();\n if (StringUtils.isNotEmpty(cloudProvider)) {\n stageBuilder.setCloudProvider(toCloudProvider(cloudProvider));\n returnList.add(stageBuilder.build());\n } else if (StringUtils.isNotEmpty(stage.getContext().getNewState().getCloudProviders())) {\n // Create and Update Application operations can specify multiple cloud providers in 1\n // operation.\n String[] cloudProviders = stage.getContext().getNewState().getCloudProviders().split(\",\");\n for (String cp : cloudProviders) {\n returnList.add(stageBuilder.clone().setCloudProvider(toCloudProvider(cp)).build());\n }\n } else {\n returnList.add(stageBuilder.build());\n }\n\n return Optional.of(returnList);\n }", "public boolean supportStage(final String stage) {\n return mSupportedStages.contains(stage);\n }", "public static int pointsForStage(int stage) {\n return (int)Math.round(RANK_START * Math.pow((1 + RANK_GROWTH_RATE),stage));\n }", "public int getNumberOfStages() {\r\n\t\treturn stages.length;\r\n\t}", "public static IStage getStage(String stageName)\n {\n return stageQueues_.get(stageName);\n }", "public String returnStageOfLife(){\n\t\treturn (String) stageofLifeBox.getSelectedItem();//Return the stage of life options\n\t}", "public final EObject ruleGroupStage() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n Token otherlv_7=null;\r\n Token otherlv_9=null;\r\n Token otherlv_11=null;\r\n Enumerator lv_type_3_0 = null;\r\n\r\n AntlrDatatypeRuleToken lv_maxNbGames_4_0 = null;\r\n\r\n AntlrDatatypeRuleToken lv_meetingsInSameGroup_5_0 = null;\r\n\r\n AntlrDatatypeRuleToken lv_meetingsWithOtherGroups_6_0 = null;\r\n\r\n EObject lv_groups_8_0 = null;\r\n\r\n EObject lv_groups_10_0 = null;\r\n\r\n\r\n\r\n \tenterRule();\r\n\r\n try {\r\n // InternalEsportDsl.g:1475:2: ( ( () otherlv_1= 'GroupStage' otherlv_2= ':' ( (lv_type_3_0= ruleGroupStageType ) ) ( (lv_maxNbGames_4_0= ruleEInt ) ) ( (lv_meetingsInSameGroup_5_0= ruleEInt ) ) ( (lv_meetingsWithOtherGroups_6_0= ruleEInt ) )? (otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')' )? ) )\r\n // InternalEsportDsl.g:1476:2: ( () otherlv_1= 'GroupStage' otherlv_2= ':' ( (lv_type_3_0= ruleGroupStageType ) ) ( (lv_maxNbGames_4_0= ruleEInt ) ) ( (lv_meetingsInSameGroup_5_0= ruleEInt ) ) ( (lv_meetingsWithOtherGroups_6_0= ruleEInt ) )? (otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')' )? )\r\n {\r\n // InternalEsportDsl.g:1476:2: ( () otherlv_1= 'GroupStage' otherlv_2= ':' ( (lv_type_3_0= ruleGroupStageType ) ) ( (lv_maxNbGames_4_0= ruleEInt ) ) ( (lv_meetingsInSameGroup_5_0= ruleEInt ) ) ( (lv_meetingsWithOtherGroups_6_0= ruleEInt ) )? (otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')' )? )\r\n // InternalEsportDsl.g:1477:3: () otherlv_1= 'GroupStage' otherlv_2= ':' ( (lv_type_3_0= ruleGroupStageType ) ) ( (lv_maxNbGames_4_0= ruleEInt ) ) ( (lv_meetingsInSameGroup_5_0= ruleEInt ) ) ( (lv_meetingsWithOtherGroups_6_0= ruleEInt ) )? (otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')' )?\r\n {\r\n // InternalEsportDsl.g:1477:3: ()\r\n // InternalEsportDsl.g:1478:4: \r\n {\r\n\r\n \t\t\t\tcurrent = forceCreateModelElement(\r\n \t\t\t\t\tgrammarAccess.getGroupStageAccess().getGroupStageAction_0(),\r\n \t\t\t\t\tcurrent);\r\n \t\t\t\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,26,FOLLOW_5); \r\n\r\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getGroupStageAccess().getGroupStageKeyword_1());\r\n \t\t\r\n otherlv_2=(Token)match(input,12,FOLLOW_26); \r\n\r\n \t\t\tnewLeafNode(otherlv_2, grammarAccess.getGroupStageAccess().getColonKeyword_2());\r\n \t\t\r\n // InternalEsportDsl.g:1492:3: ( (lv_type_3_0= ruleGroupStageType ) )\r\n // InternalEsportDsl.g:1493:4: (lv_type_3_0= ruleGroupStageType )\r\n {\r\n // InternalEsportDsl.g:1493:4: (lv_type_3_0= ruleGroupStageType )\r\n // InternalEsportDsl.g:1494:5: lv_type_3_0= ruleGroupStageType\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getTypeGroupStageTypeEnumRuleCall_3_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_11);\r\n lv_type_3_0=ruleGroupStageType();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"type\",\r\n \t\t\t\t\t\tlv_type_3_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.GroupStageType\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1511:3: ( (lv_maxNbGames_4_0= ruleEInt ) )\r\n // InternalEsportDsl.g:1512:4: (lv_maxNbGames_4_0= ruleEInt )\r\n {\r\n // InternalEsportDsl.g:1512:4: (lv_maxNbGames_4_0= ruleEInt )\r\n // InternalEsportDsl.g:1513:5: lv_maxNbGames_4_0= ruleEInt\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getMaxNbGamesEIntParserRuleCall_4_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_11);\r\n lv_maxNbGames_4_0=ruleEInt();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"maxNbGames\",\r\n \t\t\t\t\t\tlv_maxNbGames_4_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.EInt\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1530:3: ( (lv_meetingsInSameGroup_5_0= ruleEInt ) )\r\n // InternalEsportDsl.g:1531:4: (lv_meetingsInSameGroup_5_0= ruleEInt )\r\n {\r\n // InternalEsportDsl.g:1531:4: (lv_meetingsInSameGroup_5_0= ruleEInt )\r\n // InternalEsportDsl.g:1532:5: lv_meetingsInSameGroup_5_0= ruleEInt\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getMeetingsInSameGroupEIntParserRuleCall_5_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_27);\r\n lv_meetingsInSameGroup_5_0=ruleEInt();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"meetingsInSameGroup\",\r\n \t\t\t\t\t\tlv_meetingsInSameGroup_5_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.EInt\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1549:3: ( (lv_meetingsWithOtherGroups_6_0= ruleEInt ) )?\r\n int alt27=2;\r\n int LA27_0 = input.LA(1);\r\n\r\n if ( (LA27_0==RULE_INT||LA27_0==23) ) {\r\n alt27=1;\r\n }\r\n switch (alt27) {\r\n case 1 :\r\n // InternalEsportDsl.g:1550:4: (lv_meetingsWithOtherGroups_6_0= ruleEInt )\r\n {\r\n // InternalEsportDsl.g:1550:4: (lv_meetingsWithOtherGroups_6_0= ruleEInt )\r\n // InternalEsportDsl.g:1551:5: lv_meetingsWithOtherGroups_6_0= ruleEInt\r\n {\r\n\r\n \t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getMeetingsWithOtherGroupsEIntParserRuleCall_6_0());\r\n \t\t\t\t\r\n pushFollow(FOLLOW_9);\r\n lv_meetingsWithOtherGroups_6_0=ruleEInt();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tset(\r\n \t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\"meetingsWithOtherGroups\",\r\n \t\t\t\t\t\tlv_meetingsWithOtherGroups_6_0,\r\n \t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.EInt\");\r\n \t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1568:3: (otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')' )?\r\n int alt29=2;\r\n int LA29_0 = input.LA(1);\r\n\r\n if ( (LA29_0==13) ) {\r\n alt29=1;\r\n }\r\n switch (alt29) {\r\n case 1 :\r\n // InternalEsportDsl.g:1569:4: otherlv_7= '(' ( (lv_groups_8_0= ruleGroup ) ) (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )* otherlv_11= ')'\r\n {\r\n otherlv_7=(Token)match(input,13,FOLLOW_28); \r\n\r\n \t\t\t\tnewLeafNode(otherlv_7, grammarAccess.getGroupStageAccess().getLeftParenthesisKeyword_7_0());\r\n \t\t\t\r\n // InternalEsportDsl.g:1573:4: ( (lv_groups_8_0= ruleGroup ) )\r\n // InternalEsportDsl.g:1574:5: (lv_groups_8_0= ruleGroup )\r\n {\r\n // InternalEsportDsl.g:1574:5: (lv_groups_8_0= ruleGroup )\r\n // InternalEsportDsl.g:1575:6: lv_groups_8_0= ruleGroup\r\n {\r\n\r\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getGroupsGroupParserRuleCall_7_1_0());\r\n \t\t\t\t\t\r\n pushFollow(FOLLOW_8);\r\n lv_groups_8_0=ruleGroup();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\t\t\t\tif (current==null) {\r\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tadd(\r\n \t\t\t\t\t\t\tcurrent,\r\n \t\t\t\t\t\t\t\"groups\",\r\n \t\t\t\t\t\t\tlv_groups_8_0,\r\n \t\t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.Group\");\r\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t\t\t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // InternalEsportDsl.g:1592:4: (otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) ) )*\r\n loop28:\r\n do {\r\n int alt28=2;\r\n int LA28_0 = input.LA(1);\r\n\r\n if ( (LA28_0==14) ) {\r\n alt28=1;\r\n }\r\n\r\n\r\n switch (alt28) {\r\n \tcase 1 :\r\n \t // InternalEsportDsl.g:1593:5: otherlv_9= ',' ( (lv_groups_10_0= ruleGroup ) )\r\n \t {\r\n \t otherlv_9=(Token)match(input,14,FOLLOW_28); \r\n\r\n \t \t\t\t\t\tnewLeafNode(otherlv_9, grammarAccess.getGroupStageAccess().getCommaKeyword_7_2_0());\r\n \t \t\t\t\t\r\n \t // InternalEsportDsl.g:1597:5: ( (lv_groups_10_0= ruleGroup ) )\r\n \t // InternalEsportDsl.g:1598:6: (lv_groups_10_0= ruleGroup )\r\n \t {\r\n \t // InternalEsportDsl.g:1598:6: (lv_groups_10_0= ruleGroup )\r\n \t // InternalEsportDsl.g:1599:7: lv_groups_10_0= ruleGroup\r\n \t {\r\n\r\n \t \t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getGroupStageAccess().getGroupsGroupParserRuleCall_7_2_1_0());\r\n \t \t\t\t\t\t\t\r\n \t pushFollow(FOLLOW_8);\r\n \t lv_groups_10_0=ruleGroup();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t \t\t\t\t\t\t\tif (current==null) {\r\n \t \t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGroupStageRule());\r\n \t \t\t\t\t\t\t\t}\r\n \t \t\t\t\t\t\t\tadd(\r\n \t \t\t\t\t\t\t\t\tcurrent,\r\n \t \t\t\t\t\t\t\t\t\"groups\",\r\n \t \t\t\t\t\t\t\t\tlv_groups_10_0,\r\n \t \t\t\t\t\t\t\t\t\"org.xtext.example.mydsl1.EsportDsl.Group\");\r\n \t \t\t\t\t\t\t\tafterParserOrEnumRuleCall();\r\n \t \t\t\t\t\t\t\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 loop28;\r\n }\r\n } while (true);\r\n\r\n otherlv_11=(Token)match(input,15,FOLLOW_2); \r\n\r\n \t\t\t\tnewLeafNode(otherlv_11, grammarAccess.getGroupStageAccess().getRightParenthesisKeyword_7_3());\r\n \t\t\t\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n \tleaveRule();\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 }", "private Stage getPriorityStage(ArrayList<Transition> transitions, Stage ownerStage){\r\n\t\t\r\n\t\tStage prioritySettings = new Stage();\r\n\t\tprioritySettings.setTitle(\"Priority Settings\");\r\n\t\tprioritySettings.initOwner(ownerStage);\r\n\t\tprioritySettings.setWidth(400.0);\r\n\r\n\t\tVBox priorityContainer = new VBox(20);\r\n\t\tpriorityContainer.setAlignment(Pos.CENTER);\r\n\t\t\r\n\t\tGridPane transitionSettings = new GridPane();\r\n\t\ttransitionSettings.setAlignment(Pos.CENTER);\r\n\t\ttransitionSettings.setHgap(50.0);\r\n\t\ttransitionSettings.setVgap(10.0);\r\n\t\t\r\n\t\ttransitionSettings.addRow(0, new Text(\"Name\"), new Text(\"Transition Priority\"));\r\n\t\t\r\n\t\t\r\n\t\t//display rows with transition name a TextField for each transition\r\n\t\tfor(int i = 0; i < transitions.size(); i++)\r\n\t\t\ttransitionSettings.addRow(i+1, new Text(transitions.get(i).getName()),\r\n\t\t\t\t\t\t\t\t new TextField(\"\" + transitions.get(i).getPriority()));\r\n\t\t\r\n\t\t//center all nodes and set TextField sizes\r\n\t\tfor(Node node : transitionSettings.getChildren()){\r\n\t\t\tGridPane.setHalignment(node, HPos.CENTER);\r\n\t\t\t\r\n\t\t\tif((GridPane.getColumnIndex(node)!=0)&&(GridPane.getRowIndex(node)!=0))\r\n\t\t\t\t//contains TextField\r\n\t\t\t\t((TextField)node).setPrefColumnCount(5);\r\n\t\t}\r\n\t\t\r\n\t\tButton okButton = new Button(\"OK\");\r\n\t\t\r\n\t\t\r\n\t\tokButton.setOnAction(e ->{\r\n\t\t\tfor(Node node : transitionSettings.getChildren()){\r\n\t\t\t\tif((GridPane.getColumnIndex(node)!=0)&&(GridPane.getRowIndex(node)!=0)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//index of transition\r\n\t\t\t\t\tint transNum = GridPane.getRowIndex(node) - 1;\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set priority of current transition\r\n\t\t\t\t\t\tif((Integer.parseInt(((TextField)node).getText())) > 0)\r\n\t\t\t\t\t\t\ttransitions.get(transNum).setPriority(Integer.parseInt(((TextField)node).getText()));\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t//display error, invalid priority input entered\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tprioritySimulation = false;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tStage priorityError = new Stage();\r\n\t\t\t\t\t\t\tpriorityError.initOwner(prioritySettings);\r\n\t\t\t\t\t\t\tpriorityError.setTitle(\"Invalid Priority Number\");\r\n\t\t\t\t\t\t\tBorderPane errorPane = new BorderPane();\r\n\t\t\t\t\t\t\terrorPane.setPrefWidth(600.0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tButton errorOK = new Button(\"OK\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\terrorOK.setOnAction(t -> {\r\n\t\t\t\t\t\t\t\tpriorityError.close();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\terrorPane.setTop(new Label(\"Invalid priority input: Transition \" + transitions.get(transNum).getName() + \" priority not changed\"));\r\n\t\t\t\t\t\t\tBorderPane.setAlignment(errorPane.getTop(), Pos.CENTER);\r\n\t\t\t\t\t\t\terrorPane.setCenter(new Label(\"Priority number must be set to integer between 1 and 10000.\"));\r\n\t\t\t\t\t\t\terrorPane.setBottom(errorOK);\r\n\t\t\t\t\t\t\tBorderPane.setAlignment(errorOK, Pos.CENTER);\r\n\t\t\t\t\t\t\tBorderPane.setMargin(errorPane.getCenter(), new Insets(20, 0, 20, 0));\r\n\t\t\t\r\n\t\t\t\t\t\t\tpriorityError.setScene(new Scene(errorPane));\r\n\t\t\t\t\t\t\tpriorityError.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(NumberFormatException x)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//display error, invalid priority input entered\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tprioritySimulation = false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tStage priorityError = new Stage();\r\n\t\t\t\t\t\tpriorityError.initOwner(prioritySettings);\r\n\t\t\t\t\t\tpriorityError.setTitle(\"Invalid Priority Number\");\r\n\t\t\t\t\t\tBorderPane errorPane = new BorderPane();\r\n\t\t\t\t\t\terrorPane.setPrefWidth(600.0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tButton errorOK = new Button(\"OK\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\terrorOK.setOnAction(t -> {\r\n\t\t\t\t\t\t\tpriorityError.close();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\terrorPane.setTop(new Label(\"Invalid priority input: Transition \" + transitions.get(transNum).getName() + \" priority not changed\"));\r\n\t\t\t\t\t\tBorderPane.setAlignment(errorPane.getTop(), Pos.CENTER);\r\n\t\t\t\t\t\terrorPane.setCenter(new Label(\"Priority number must be set to integer greater than 0.\"));\r\n\t\t\t\t\t\terrorPane.setBottom(errorOK);\r\n\t\t\t\t\t\tBorderPane.setAlignment(errorOK, Pos.CENTER);\r\n\t\t\t\t\t\tBorderPane.setMargin(errorPane.getCenter(), new Insets(20, 0, 20, 0));\r\n\t\t\r\n\t\t\t\t\t\tpriorityError.setScene(new Scene(errorPane));\r\n\t\t\t\t\t\tpriorityError.show();\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\t\tif(prioritySimulation)\r\n\t\t\t\t//simulation not postponed due to invalid input\r\n\t\t\t\tprioritySettings.close();\r\n\t\t\telse{\r\n\t\t\t\t//invalid input, restore previous settings to TextField text\r\n\t\t\t\tfor(Node node : transitionSettings.getChildren()){\r\n\t\t\t\t\tGridPane.setHalignment(node, HPos.CENTER);\r\n\t\t\t\t\tif((GridPane.getColumnIndex(node)!=0)&&(GridPane.getRowIndex(node)!=0)){\r\n\t\t\t\t\t\tint transNum = GridPane.getRowIndex(node) - 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tif((Integer.parseInt(((TextField)node).getText())) < 1)\r\n\t\t\t\t\t\t\t\t((TextField)node).setText(\"\" + transitions.get(transNum).getPriority());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException x){\r\n\t\t\t\t\t\t\t((TextField)node).setText(\"\" + transitions.get(transNum).getPriority());\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\t\r\n\t\t\t\tprioritySimulation = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpriorityContainer.getChildren().addAll(transitionSettings, okButton);\r\n\t\t\r\n\t\tprioritySettings.setScene(new Scene(priorityContainer));\r\n\t\t\r\n\t\treturn prioritySettings;\r\n\t}", "public boolean getStage()\n {\n return atQuestionStage;\n }", "public TypeOffreDTO getStage(){\n\t\tstage = null;\n\t\tList<TypeOffreDTO> l = getNomenclatureDomainService().getTypesOffre();\n\t\tfor(TypeOffreDTO t : l){\n\t\t\tif(t.getCodeCtrl().equalsIgnoreCase(DonneesStatic.TYPE_OFFRE_CODE_CTRL_STAGE)){\n\t\t\t\tstage=t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn stage;\n\t}", "public static void setStage(Stage stage) {\n PageSwitcher.stage = stage;\n }", "@java.lang.Override\n public com.google.iam.admin.v1.Role.RoleLaunchStage getStage() {\n com.google.iam.admin.v1.Role.RoleLaunchStage result =\n com.google.iam.admin.v1.Role.RoleLaunchStage.forNumber(stage_);\n return result == null ? com.google.iam.admin.v1.Role.RoleLaunchStage.UNRECOGNIZED : result;\n }", "public static Stage getPrimaryStage() {\n return pStage;\n }", "@Override\n public void setProductionNumber(int currentProductionNumber) {\n currentProductionNumber = currentProductionNumber;\n }", "@Override\r\n\tpublic Node visitStages(StagesContext ctx) {\n\t\treturn super.visitStages(ctx);\r\n\t}", "public void changeStage(Stage currentStage,Stage goToStage){\n goToStage.show();\n currentStage.hide();\n }", "@java.lang.Override\n public com.google.iam.admin.v1.Role.RoleLaunchStage getStage() {\n com.google.iam.admin.v1.Role.RoleLaunchStage result =\n com.google.iam.admin.v1.Role.RoleLaunchStage.forNumber(stage_);\n return result == null ? com.google.iam.admin.v1.Role.RoleLaunchStage.UNRECOGNIZED : result;\n }", "public void setPostStage(Vector4f postStage)\n\t{\n\t\tthis.postStage = postStage;\n\t}", "int getStagesCount();", "public boolean hasNonSupportedStage() {\n return !VECTOR_SUPPORTED_STAGES.containsAll(mSupportedStages);\n }", "private void getStageDetailsForJob() throws IGCException {\n final String methodName = \"getStageDetailsForJob\";\n String jobRid = job.getId();\n log.debug(\"Retrieving stage details for job: {}\", jobRid);\n IGCSearch igcSearch = new IGCSearch(\"stage\");\n igcSearch.addProperties(DataStageConstants.getStageSearchProperties());\n IGCSearchCondition condition = new IGCSearchCondition(\"job_or_container\", \"=\", jobRid);\n IGCSearchConditionSet conditionSet = new IGCSearchConditionSet(condition);\n igcSearch.addConditions(conditionSet);\n ItemList<Stage> stages = igcRestClient.search(igcSearch);\n List<Stage> allStages = igcRestClient.getAllPages(null, stages);\n for (Stage stage : allStages) {\n stageToVarsMap.put(stage.getId(), new TreeSet<>());\n }\n buildMap(stageMap, allStages);\n }", "public void setPrimaryStage(Stage s) {\n primaryStage = s;\n }", "public boolean buildNextStage(Player player, Card card){\n //TODO: build the next stage of the Wonder\n return false;\n }", "@Override \n public void start(Stage stage) throws Exception {\n \tBeanContext.getStage(\"a\").show();\n }", "int getDefenseStatStage();", "public Builder newStage() {\n closeStage();\n currentStage = ImmutableSet.builder();\n return this;\n }", "private static URI findCancelableLeafStage(StageInfo stage)\n {\n if (stage.getLatestAttemptExecutionInfo().getState().isDone()) {\n return null;\n }\n\n // attempt to find a cancelable sub stage\n // check in reverse order since build side of a join will be later in the list\n for (StageInfo subStage : Lists.reverse(stage.getSubStages())) {\n URI leafStage = findCancelableLeafStage(subStage);\n if (leafStage != null) {\n return leafStage;\n }\n }\n\n // no matching sub stage, so return this stage\n return stage.getSelf();\n }", "public Game(Stage s){\n\t\tmyStage = s;\n\t}" ]
[ "0.7222099", "0.6903077", "0.6850082", "0.68048215", "0.673733", "0.66853327", "0.6636822", "0.6602966", "0.6577336", "0.6570818", "0.65475094", "0.65284336", "0.6448962", "0.63024527", "0.6292929", "0.61871135", "0.6130626", "0.6066228", "0.60580647", "0.5982679", "0.59695804", "0.5960582", "0.5953711", "0.59510314", "0.5907697", "0.5866358", "0.5843916", "0.5838308", "0.5836131", "0.58290815", "0.57928383", "0.57903165", "0.5778513", "0.5778513", "0.5778513", "0.57464653", "0.5724997", "0.5680941", "0.5669295", "0.5652879", "0.5649405", "0.5637384", "0.5602193", "0.5593731", "0.55863726", "0.55736446", "0.5569921", "0.55661684", "0.5545464", "0.5542659", "0.5541064", "0.5540374", "0.55365807", "0.55262023", "0.55262023", "0.54731435", "0.5443854", "0.5435054", "0.54114515", "0.54110897", "0.53987086", "0.53954583", "0.5377652", "0.53768474", "0.53761375", "0.53641707", "0.53633976", "0.53509814", "0.5340556", "0.52977574", "0.52822876", "0.52670294", "0.52640116", "0.52597356", "0.52352965", "0.5232912", "0.5224809", "0.5213796", "0.5211858", "0.52117115", "0.52050984", "0.5192679", "0.5185111", "0.51840615", "0.51793224", "0.5170755", "0.5149506", "0.51462317", "0.51291585", "0.5127563", "0.5123329", "0.5122051", "0.5121119", "0.5113783", "0.5113672", "0.5110473", "0.51077014", "0.50984234", "0.50631636", "0.5062093", "0.50577706" ]
0.0
-1
active cases = cases that are to be responded to in this stage
@SuppressWarnings("unused") // used e.g. by campaigns report public static int getActiveCases(List<AccessCertificationCaseType> caseList, int campaignStageNumber, AccessCertificationCampaignStateType state) { int open = 0; for (AccessCertificationCaseType aCase : caseList) { if (aCase.getReviewFinishedTimestamp() == null) { open++; } } return open; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateActiveChallenge() {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }", "public Case[][] getCases()\n {\n\treturn cases;\n }", "@java.lang.Override\n public int getCasesCount() {\n return cases_.size();\n }", "public void Unassigned_Cases()\n\t{\n\t\t//assigning a ContactTracer to a case\n\t\tif(coronaCase.size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"\\nDisplaying unassigned cases: \");\n\t\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\t\tif(coronaCase.get(i).isAssignedCase() == false)\n\t\t\t\t\tSystem.out.println(coronaCase.get(i).toString());\n\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"No unassigned cases to display.\");\n\t\t\n\t}", "private ArrayList<ArrayList<Case>> getCurrentData(){\n\t\tArrayList<ArrayList<Case>> d = new ArrayList<ArrayList<Case>>();\n\t\tfor(int i=0; i<DataCases.size(); i++){\n\t\t\td.add(new ArrayList<Case>());\n\t\t\tfor(int j = 0; j<DataCases.get(0).size();j++){\n\t\t\t\td.get(i).add(new Case(DataCases.get(i).get(j).state()));\n\t\t\t}\n\t\t}\n\t\treturn d;\n\t}", "@java.lang.Override\n public java.util.List<build.buf.validate.conformance.harness.CaseResult> getCasesList() {\n return cases_;\n }", "@Override\n\tpublic int countCase() {\n\t\treturn proSystemHeadMapper.selectCountCase()+proMultiMapper.selectCountMul()+proAppMapper.selectCountApp()+proItMapper.selectCountIt();\n\t}", "public int[] switchCases() {\n return matchesOp;\n }", "public boolean active() //ignores them. yeahhhhhh\r\n\t{\r\n\t\treturn super.getPhase();\r\n\t}", "public static List<TaskVO> filterCurrentTasksByCase(ICase iCase) {\r\n List<TaskVO> currentTasks = new ArrayList<TaskVO>();\r\n if (iCase != null && iCase.getTasks() != null && iCase.getTasks().size() > 0) {\r\n EnumSet<TaskState> notDoneStates =\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED, TaskState.DELAYED,\r\n TaskState.WAITING_FOR_INTERMEDIATE_EVENT);\r\n for (ITask iTask : iCase.getTasks()) {\r\n if (notDoneStates.contains(iTask.getState())) {\r\n currentTasks.add(ConverterUtils.convertITaskToTaskVO(iTask));\r\n }\r\n }\r\n }\r\n return currentTasks;\r\n }", "@Override\r\n\tpublic void activate() {\n\t\tif(CID==true) {\r\n\t\t\tinter.setState(inter.getResults());\r\n\t\t}\r\n\t}", "public java.util.List<build.buf.validate.conformance.harness.CaseResult> getCasesList() {\n if (casesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(cases_);\n } else {\n return casesBuilder_.getMessageList();\n }\n }", "private void comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }", "public static Set<ObjectReferenceType> getCurrentReviewers(AccessCertificationCaseType aCase) {\n return aCase.getWorkItem().stream()\n // TODO check also with campaign stage?\n .filter(wi -> wi.getStageNumber() == aCase.getStageNumber())\n .flatMap(wi -> wi.getAssigneeRef().stream())\n .collect(Collectors.toSet());\n }", "@java.lang.Override\n public build.buf.validate.conformance.harness.CaseResult getCases(int index) {\n return cases_.get(index);\n }", "protected void updateCaseWithNewStatus(NbaDst caseDst,NbaDst tranDst) throws NbaBaseException { //NBLXA -1983\n \ttry {\n \t\tif (NbaConstants.A_QUEUE_UNDERWRITER_HOLD.equals(caseDst.getQueue())) {\n \t\t\t//Start NBLXA -1983\n \t\t\t/* Reinsurance Responses are bundled unless and until all the responses are received on the case. But if response for additional info is received case route to UW */\n \t\t\tboolean isFinalReplRecieve= true; \n \t\t\tif(((!NbaUtils.isBlankOrNull(tranDst.getNbaLob().hasAdditionalInfo()) && (!tranDst.getNbaLob().getAdditionalInfo()) ) ||\n \t\t\t\t\tNbaUtils.isBlankOrNull(tranDst.getNbaLob().hasAdditionalInfo()))){\n \t\t\t\tsetNbaTxLife(doHoldingInquiry(caseDst));\n \t\t\t\tif(!NbaUtils.isBlankOrNull(getNbaTxLife())){\n \t\t\t\t\tLong appType=getNbaTxLife().getPolicy().getApplicationInfo().getApplicationType();\n \t\t\t\t\tApplicationInfo appInfo = getNbaTxLife().getPolicy().getApplicationInfo();\n \t\t\t\t\tApplicationInfoExtension appInfoExt = NbaUtils.getFirstApplicationInfoExtension(appInfo);\n \t\t\t\t\tif( NbaOliConstants.OLI_ACTTYPE_1000500003 !=appType && NbaOliConstants.OLI_APPTYPE_SIMPLIFIEDISSUE !=appType \n \t\t\t\t\t\t\t&& (!NbaUtils.isBlankOrNull(appInfoExt) && !NbaUtils.isContractChange(getNbaTxLife()) && NbaUtils.isBlankOrNull(appInfoExt.getReopenDate()))){\n \t\t\t\t\t\tNbaDst parentCase = retrieveParentWork(tranDst, true,true);\n \t\t\t\t\t\tList transactions = parentCase.getNbaTransactions();\n \t\t\t\t\t\tNbaTransaction transaction = null; \t\t\n \t\t\t\t\t\tfor (int i = 0; i < transactions.size(); i++) {\n \t\t\t\t\t\t\ttransaction = (NbaTransaction) transactions.get(i);\n \t\t\t\t\t\t\tif (!tranDst.getID().equalsIgnoreCase( transaction.getID()) && NbaConstants.A_WT_REINSURANCE.equals(transaction.getWorkType()) && !transaction.isInEndQueue()) {\n \t\t\t\t\t\t\t\tisFinalReplRecieve =false;\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\tif(isFinalReplRecieve){\n \t\t\t\t//End NBLXA -1983\n \t\t\t\tupdateCaseStatus(caseDst);\n \t\t\t}\n \t\t\t//NBA208-32\n \t\t\tcaseDst.getCase().getWorkItemChildren().clear(); //clear child transaction\n \t\t\tcaseDst.setUpdate();\n \t\t}\n \t}catch (NbaBaseException e) {\n \t\tif (e.isFatal()) {\n \t\t\tthrow e;\n \t\t}\n \t\tgetLogger().logException(e);\n \t\tthrow new NbaBaseException(\"Unable to retrieve new status for case work item, reason: \" + e.getMessage(), e);\n \t}\n }", "public static List<TaskVO> filterFinishedTasksByCase(ICase iCase) {\r\n List<TaskVO> currentTasks = new ArrayList<TaskVO>();\r\n if (iCase != null && iCase.getTasks() != null && iCase.getTasks().size() > 0) {\r\n for (ITask iTask : iCase.getTasks()) {\r\n if (TaskState.DONE.equals(iTask.getState())) {\r\n currentTasks.add(ConverterUtils.convertITaskToTaskVO(iTask));\r\n }\r\n }\r\n }\r\n return currentTasks;\r\n }", "public String getActiveChallengesAnswer() {\n return categories.get(indexOfActiveCategory).getActiveChallenge().getAnswer();\n }", "@java.lang.Override\n public java.util.List<? extends build.buf.validate.conformance.harness.CaseResultOrBuilder> \n getCasesOrBuilderList() {\n return cases_;\n }", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "private Map<WhatifConsequence, AxiomPriority> prepareAssertionConsequences(OWLEntity entity,\n\t\t\tSet<OWLEntity> selectedinselector) {\n\t\tSet<WhatifConsequence> asserted = new HashSet<>(this.consequences_asserted);\n\t\tMap<WhatifConsequence, AxiomPriority> infs = new HashMap<>();\n\t\tif (cb_selected.isSelected()) {\n\t\t\tfilterAxiomsByEntity(asserted, Collections.singleton(entity));\n\t\t} else if (!selectedinselector.isEmpty()) {\n\t\t\tfilterAxiomsByEntity(asserted, selectedinselector);\n\t\t}\n\t\tfor (WhatifConsequence con : asserted) {\n\t\t\t// SysteEntailm.out.println(con);\n\t\t\tAxiomPriority prio = getPriority(con);\n\t\t\tif (prio != AxiomPriority.REMOVE) {\n\t\t\t\tinfs.put(con, prio);\n\t\t\t}\n\t\t}\n\t\treturn infs;\n\t}", "protected void updateCaseStatus(NbaDst nbaDst) throws NbaBaseException {\n NbaProcessWorkCompleteStatusProvider workCompleteStatusProvider = new NbaProcessWorkCompleteStatusProvider(getUser(), nbaDst.getNbaLob(),\n new HashMap());\n nbaDst.setStatus(workCompleteStatusProvider.getStatus());\n setRouteReason(nbaDst, nbaDst.getStatus(), workCompleteStatusProvider.getReason());//ALS5260\n nbaDst.getNbaLob().setUnderwriterActionLob(NbaOliConstants.OLI_UW_SUBSEQUENT_ACTION);//APSL4981\n\t\tNbaUtils.addGeneralComment(nbaDst,getUser(),workCompleteStatusProvider.getReason());//ALS5260,ALS5337\n //Increase the priority of case.\n String action = workCompleteStatusProvider.getPriorityAction();\n String value = workCompleteStatusProvider.getPriorityValue();\n if (action != null && action.trim().length() > 0 && value != null && value.trim().length() > 0) {\n nbaDst.increasePriority(workCompleteStatusProvider.priorityAction, workCompleteStatusProvider.priorityValue);\n }\n }", "public FocusNode.EnumSupplyType[] willSupply() { return new FocusNode.EnumSupplyType[] { FocusNode.EnumSupplyType.TARGET }; }", "public java.util.List<? extends build.buf.validate.conformance.harness.CaseResultOrBuilder> \n getCasesOrBuilderList() {\n if (casesBuilder_ != null) {\n return casesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(cases_);\n }\n }", "public List<ICase> getCases() {\n return allCases;\n }", "public static void getValidActionsTest() {\n\t\tVTicTacToe tempEnvironment = new VTicTacToe();\n\t\tint[] tempTestStates = { 0, 13, 39, 26, 6643 };\n\n\t\tint[] tempResultArray;\n\t\tfor (int i = 0; i < tempTestStates.length; i++) {\n\t\t\ttempResultArray = tempEnvironment.getValidActions(tempTestStates[i]);\n\t\t\tSystem.out.println(\"The valid actions of \" + tempTestStates[i] + \" is: \"\n\t\t\t\t\t+ Arrays.toString(tempResultArray));\n\t\t} // Of for i\n\t}", "@Test\n\tpublic void TC1060_ObserveActiveAndInactiveEQSurvey() throws Exception{\n\t\tLog.info(\"\\nTestcase - TC1060_ObserveActiveAndInactiveEQSurvey\\n\");\n\t\tfinal int userDataRowID = 16;\n\t\tfinal int analyzerDb3DataRowID = 78;\n\t\tfinal int surveyDataRowID = 65;\n\t\tgetLoginPageAction().open(EMPTY, NOTSET);\n\t\tgetLoginPageAction().login(EMPTY, userDataRowID); /* Picarro Driver */\n\n\t\t\n\t\tLog.info(\"Starting Analyzer...\");\n\t\ttestEnvironmentAction.startAnalyzer(EMPTY, analyzerDb3DataRowID); \t// start analyzer.\n\t\tdriverViewPageAction.open(EMPTY,NOTSET);\n\t\tdriverViewPageAction.waitForConnectionToComplete(EMPTY,NOTSET);\n\n\t\tLog.info(\"Starting Replay...\");\n\t\tgetTestEnvironmentAction().startReplay(EMPTY, analyzerDb3DataRowID);\n\t\t// start survey.\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tdriverViewPageAction.startEQDrivingSurvey(EMPTY, surveyDataRowID);\n\n\t\tloginAsObserver(USER_ROW_ID_PICARRO_DRIVER);\n\n\t\tString analyzer = getTestEnvironmentAction().getWorkingAnalyzerSerialNumber();\n\t\thomePageActionList.get(0).clickOnFirstMatchingOnlineSurveyorLink(analyzer, NOTSET);\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForPageLoad();\n\t\tobserverViewPageActionList.get(0).waitForConnectionToComplete(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifyObserverViewPageIsOpened(EMPTY, NOTSET));\n\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForAJAXCallsToComplete();\n\t\tobserverViewPageActionList.get(0).clickOnMapButton(EMPTY, NOTSET);\n\t\tobserverViewPageActionList.get(0).turnOnMapView(EMPTY, NOTSET);\n\t\t\n\t\tobserverViewPageActionList.get(0).clickOnDisplayButton(EMPTY, NOTSET);\n\t\n\t\t// Check availability of toggle buttons\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIndicationsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchLisasButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchFovsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchConcentrationChartButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchWindroseButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIsotopicAnalysisButtonIsNotVisible(EMPTY, NOTSET));\n\n\t\t// Check Survey information displayed\n\t\tobserverViewPageActionList.get(0).clickOnHeaderInfoBox(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTagLabelEquals(DriverViewPageActions.workingDataRow.get().surveyTag, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoModeLabelEquals(SURVEY_INFO_MODE_PREFIX + DriverViewPageActions.workingDataRow.get().surveyType, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeLabelStartsWith(SURVEY_INFO_TIME_PREFIX + String.valueOf(getHourOfDay()), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedLabelStartsWith(SURVEY_INFO_ELAPSED_TIME_00, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelStartsWith(SURVEY_INFO_REMAINING_TIME_07, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoZoomLevelLabelEquals(String.format(SURVEY_INFO_ZOOM_LEVEL_X, 19), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedIsTickingForward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelIsTickingBackward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_ACTIVE, NOTSET));\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Red\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Blue\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCorrectSurveyActiveMessageIsShownOnMap(\"EQ\", NOTSET));\n\n\t\t// Check Inactive information displayed\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tFunctionUtil.warnOnError(() -> driverViewPageAction.stopDrivingSurvey(EMPTY, NOTSET));\n\t\tgetTestEnvironmentAction().idleForSeconds(\"5\", NOTSET);\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_INACTIVE, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Gray\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Black\", NOTSET));\n\t\t\n\t\t// stop simulator and PSA.\n\t\tLog.info(\"Stopping Analyzer...\");\n\t\tgetTestEnvironmentAction().stopReplay(EMPTY, NOTSET);\n\t\tgetTestEnvironmentAction().stopAnalyzer(EMPTY, NOTSET);\n\t}", "private HashMap<List<Integer>,List<Integer>> obtainValidActions(){\n\t\tHashMap<List<Integer>,List<Integer>> mapp= new HashMap<List<Integer>,List<Integer>>();\n\t\tfor (int i = 0;i<states.size();i++) {\n\t\t\tList<Integer> act= new ArrayList<Integer>();\n\t\t\tfor (int j = 0; j < actions.size(); j++) {\n\t\t\t\tif (isActionValid(states.get(i), actions.get(j))) \n\t\t\t\t\t//System.out.println(\"Inside Validation if\\n\");\n\t\t\t\t\tact.add(j);\n\t\t\t}\n\t\t\tmapp.put(states.get(i),act);\n\t\t}\n\t\treturn mapp;\n\t}", "public void setTruthChallenge() {\n while (!(getActiveChallenge()).contains(\"Truth\")) {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }\n }", "@Override\r\n\tpublic List<Map<String, Object>> agentActive() {\n\t\treturn agentMapper.agentActive();\r\n\t}", "public int actions()\n {\n switch (mState) \n {\n case cProcessInit:\n out();\n if (cSimTimeMicro < cClientCount/cClientTransPerMicro) {\n cSimTimeMicro = cClientCount/cClientTransPerMicro;\n System.out.println(\"\\nSimulation time is too short! It has been reset to \" + cSimTimeMicro + \" micro\\n\");\n }\n cMaxRequestsToSend = (int) (cClientTransPerMicro * cSimTimeMicro);\n System.out.println(\"cMaxRequestsToSend = \" + cMaxRequestsToSend);\n \n if (cTransLogMon)\n {\n System.out.println(cTransMonHeader);\n System.out.println(\"----------------------------------------------------------------------------------------\");\n }\n\n// if (cTick)\n// {\n// activate(new Tick());\n// }\n activate(mTaxJvm);\n return cMeJvm;\n \n case cMeJvm:\n activate(mMeJvm);\n return cMeStandbyJvm;\n\n case cMeStandbyJvm:\n activate(mMeStandbyJvm);\n return cJvmActivated;\n\n case cJvmActivated:\n mClientList = headToArray(mClient.mProcess, new Process[0]);\n \n //double tInterval = 500/tClientList.length; //500 is the minimum response time\n //double tInterval = 1.0/(cClientCount*cClientTransPerMicro); \n \n double tInterval = 1.0D*1000*1000/(cClientCount); //evenly distributed client over 1 second interval\n \n //hold until connect next client to the system \n mHoldTimeBetweenClients = cRandom.normal(tInterval, tInterval*0.3);\n mFor_i = -1;\n // Flow into loop\n\n case cForNext:\n ++mFor_i;\n //for (int i = 0; i < tClientList.length; ++i) //For every client\n if (mFor_i >= mClientList.length)\n {\n return cForEnd;\n }\n\n tClientStartTime = time();\n activate((Process) mClientList[mFor_i]); \n return cNewClient;\n \n case cNewClient:\n hold(mHoldTimeBetweenClients);\n return cForNext;\n\n case cForEnd:\n //hold(cRunTimeMicro);\n //return cHoldRunTimeMicro;\n\n case cHoldRunTimeMicro:\n cActualRunTimeMicro = cSimTimeMicro * 2;\n hold(cActualRunTimeMicro);\n return cHoldRunTime;\n \n case cHoldRunTime:\n if (cTick)\n {\n System.out.println(\"\\nSimulation time = \" + time()/(1000.0*1000.0) + \" sec.\");\n System.out.println(\"Requests = \" + cRequests);\n System.out.println(\"cRequestsToSend = \" + cMaxRequestsToSend);\n System.out.println(\"Av.tax time = \" + cTaxSum/cRequests);\n System.out.println(\"Av.client time = \" + cClientSum/cRequests);\n System.out.println(\"\\nExecution time: \" + ((System.currentTimeMillis() - cStartTime)/1000.0) + \" secs.\"); \n }\n return cProcessDone;\n }\n return cProcessError;\n }", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\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}", "switch(curState) {\r\n${stateoutputcases}\r\n default:\r\n break; //no action taken\r\n }", "private void evaluateStage(){\n switch (currentStage){\n case EGG: if (getLifetime() >= ModelSettings.brood_lifetime_egg)\n currentStage = LARVAE;\n break;\n case LARVAE: if (getLifetime() >= ModelSettings.brood_lifetime_larvae)\n currentStage = PUPAE;\n break;\n case PUPAE: if (getLifetime() >= ModelSettings.brood_lifetime_pupae)\n System.out.println(\"This pupae is now an adult!\");\n //TODO trigger manager\n break;\n }\n }", "public static void main(String[] args) {\n HashMap<String, Boolean> casesToAction = new HashMap<>();\n casesToAction.put(\"a\", true);\n casesToAction.put(\"b\", true);\n casesToAction.put(\"c\", false);\n casesToAction.put(\"d\", true);\n casesToAction.put(\"e\", false);\n\n int expectedSuccessCount = Collections.frequency(casesToAction.values(), true);\n System.out.println(expectedSuccessCount);\n }", "private int debugCurrentActions(ClusterRegionStatus crs) {\n Map<ServerName, List<CompactAction>> serverCompactActions = getAllActions(crs);\n int totalActions = 0;\n for(ServerName name : serverCompactActions.keySet()) {\n log.info(\"Printing pending compaction actions for server \" + name.getHostname());\n for(CompactAction action : serverCompactActions.get(name)) {\n totalActions++;\n log.info(\"Want to perform \" + action);\n }\n }\n return totalActions;\n }", "boolean hasActive();", "public void addCase()\n {\n\tint pos_y = customRandom(4);\n\tint pos_x = customRandom(4);\n\t\t\n\twhile (cases[pos_y][pos_x].getValue() != 0)\n\t{\n pos_y = customRandom(4);\n pos_x = customRandom(4);\n\t}\n\t\t\n\tcases[pos_y][pos_x] = new Case(2);\n }", "public boolean isSolved(){ return getRemainingValues() == 0; }", "public int[] computeAvailabilities(Building selected, Calendar selectedDate, Calendar now) {\n if (selected == null) {\n return null;\n }\n int day = selectedDate.get(Calendar.DAY_OF_WEEK);\n //some modulo shenanigans because weekDays[0] is monday but Calendar doesn't have the same\n day = day + 5;\n day = day % 7;\n Weekdays openingHoursWeek = new Weekdays(selected.getOpeningHours());\n String openingHoursDay = openingHoursWeek.getWeekdays().get(day);\n //if closed\n if (openingHoursDay.equals(Weekdays.CLOSED)) {\n return null;\n }\n int nowDay = now.get(Calendar.DAY_OF_WEEK);\n int nowMonth = now.get(Calendar.DAY_OF_MONTH);\n int dayClean = selectedDate.get(Calendar.DAY_OF_WEEK);\n int month = selectedDate.get(Calendar.DAY_OF_MONTH);\n int hours = now.get(Calendar.HOUR_OF_DAY);\n int minutes = now.get(Calendar.MINUTE);\n if (minutes != 0) {\n hours++;\n }\n String begin = openingHoursDay.split(\"-\")[0];\n String end = openingHoursDay.split(\"-\")[1];\n int beginTime = Integer.parseInt(begin.split(\":\")[0]);\n int endTime = Integer.parseInt(end.split(\":\")[0]);\n int[] res = new int[2];\n if (nowDay == dayClean\n && nowMonth == month && hours > beginTime) {\n beginTime = hours;\n }\n res[0] = beginTime;\n res[1] = endTime;\n return res;\n }", "int getConditionalCasesCount();", "@java.lang.Override\n public build.buf.validate.conformance.harness.CaseResultOrBuilder getCasesOrBuilder(\n int index) {\n return cases_.get(index);\n }", "public static ArrayList<CoronaCase> getCases()\n\t{\n\t\treturn coronaCase;\n\t}", "private static HashMap<Method, Double> getActivableActions(FsmModel fsm, HashMap<Method, Double> actionsAndProbabilities) {\n // computation of activable methods\n HashMap<Method, Double> activableOnes = new HashMap<Method, Double>();\n double sum = 0;\n for (Method act : actionsAndProbabilities.keySet()) {\n try {\n Method actGuard = fsm.getClass().getDeclaredMethod(act.getName() + \"Guard\");\n if ((Boolean) actGuard.invoke(fsm)) {\n Method actProba = fsm.getClass().getDeclaredMethod(act.getName() + \"Proba\");\n double proba = (Double) actProba.invoke(fsm);\n activableOnes.put(act, proba);\n sum += proba; // checksum\n }\n } catch (NoSuchMethodException e) {\n System.err.println(\"Warning: method \" + act.getName() + \" is not guarded.\");\n System.err.println(\"Will be ignored. \");\n } catch (IllegalAccessException e) {\n System.err.println(\"Illegal access to \" + act.getName());\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 \" + act.getName());\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } \n if (sum > 1) {\n System.err.println(\"Warning: sum of probabilities of activable actionsAndProbabilities is > 1 !\\n\" + activableOnes);\n }\n }\n return activableOnes;\n }", "public void printActiveCourses() \n {\n for (String c: courses.keySet()) \n {\n if (courses.get(c).getActive()) \n {\n System.out.println(courses.get(c)); \n }\n }\n }", "public build.buf.validate.conformance.harness.CaseResult getCases(int index) {\n if (casesBuilder_ == null) {\n return cases_.get(index);\n } else {\n return casesBuilder_.getMessage(index);\n }\n }", "private void presentShowcaseSequence() {\n }", "protected void actionConfirmed()\r\n\t\t{\n\r\n\t\t\tif ( actionSelect.getSelectedItem() == null )\r\n\t\t\t\tDEFAULT_SHELL.executeLine( \"set battleAction=attack\" );\r\n\r\n\t\t\tRunnable request = (Runnable) locationSelect.getSelectedItem();\r\n\t\t\tif ( request == null )\r\n\t\t\t\treturn;\r\n\r\n\t\t\tsetProperty( \"lastAdventure\", request.toString() );\r\n\r\n\t\t\t// If there are conditions in the condition field, be\r\n\t\t\t// sure to process them.\r\n\r\n\t\t\tString conditionList = conditionField.getText().trim();\r\n\t\t\tif ( conditionList.equalsIgnoreCase( \"none\" ) )\r\n\t\t\t\tconditionList = \"\";\r\n\r\n\t\t\tif ( conditionList.length() > 0 )\r\n\t\t\t{\r\n\t\t\t\tDEFAULT_SHELL.executeLine( \"conditions clear\" );\r\n\r\n\t\t\t\tboolean verifyConditions = false;\r\n\t\t\t\tboolean useDisjunction = false;\r\n\t\t\t\tString [] conditions = conditionList.split( \"\\\\s*,\\\\s*\" );\r\n\r\n\t\t\t\tfor ( int i = 0; i < conditions.length; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( conditions[i].equals( \"check\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Postpone verification of conditions\r\n\t\t\t\t\t\t// until all other conditions added.\r\n\r\n\t\t\t\t\t\tverifyConditions = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( conditions[i].equals( \"outfit\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Determine where you're adventuring and use\r\n\t\t\t\t\t\t// that to determine which components make up\r\n\t\t\t\t\t\t// the outfit pulled from that area.\r\n\r\n\t\t\t\t\t\tif ( !(request instanceof KoLAdventure) || !EquipmentDatabase.addOutfitConditions( (KoLAdventure) request ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tsetStatusMessage( \"No outfit corresponds to this zone.\" );\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tverifyConditions = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( conditions[i].equals( \"or\" ) || conditions[i].equals( \"and\" ) || conditions[i].startsWith( \"conjunction\" ) || conditions[i].startsWith( \"disjunction\" ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tuseDisjunction = conditions[i].equals( \"or\" ) || conditions[i].startsWith( \"disjunction\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !DEFAULT_SHELL.executeConditionsCommand( \"add \" + conditions[i] ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tKoLmafia.enableDisplay();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( verifyConditions )\r\n\t\t\t\t{\r\n\t\t\t\t\tDEFAULT_SHELL.executeConditionsCommand( \"check\" );\r\n\t\t\t\t\tif ( StaticEntity.getClient().conditions.isEmpty() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tKoLmafia.updateDisplay( \"All conditions already satisfied.\" );\r\n\t\t\t\t\t\tKoLmafia.enableDisplay();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( StaticEntity.getClient().conditions.size() > 1 )\r\n\t\t\t\t\tDEFAULT_SHELL.executeConditionsCommand( useDisjunction ? \"mode disjunction\" : \"mode conjunction\" );\r\n\r\n\t\t\t\tconditionField.setText( \"\" );\r\n\t\t\t\tif ( countField.getText().equals( \"\" ) )\r\n\t\t\t\t\tcountField.setText( String.valueOf( KoLCharacter.getAdventuresLeft() ) );\r\n\t\t\t}\r\n\r\n\t\t\t(new RequestThread( request, getValue( countField ) )).start();\r\n\t\t\tcountField.setText( \"\" );\r\n\t\t}", "@SuppressWarnings(\"unused\") // used by certification cases report\n public static List<ObjectReferenceType> getCurrentlyAssignedReviewers(PrismContainerValue<AccessCertificationCaseType> pcv) {\n AccessCertificationCaseType aCase = pcv.asContainerable();\n List<ObjectReferenceType> rv = new ArrayList<>();\n for (AccessCertificationWorkItemType workItem : aCase.getWorkItem()) {\n for (ObjectReferenceType assigneeRef : workItem.getAssigneeRef()) {\n if (workItem.getCloseTimestamp() == null\n && java.util.Objects.equals(workItem.getStageNumber(), aCase.getStageNumber())) {\n rv.add(assigneeRef);\n }\n }\n }\n return rv;\n }", "CharGroup getActive() { return act; }", "@Override\n\tpublic int getNumberOfCase() {\n\t\treturn NumberOfCase;\n\t}", "public String[] getActiveStates() {\r\n String[] states = currentProcessInstance.getActiveStates();\r\n if (states == null)\r\n return new String[0];\r\n \r\n String[] stateLabels = new String[states.length];\r\n for (int i = 0; i < states.length; i++) {\r\n stateLabels[i] = getState(states[i]).getLabel(currentRole, getLanguage());\r\n }\r\n \r\n return stateLabels;\r\n }", "private List<Boolean> matchSizeOfTurtleActiveArrays(List<Boolean> prevActive, List<Boolean> nowActive) {\n\t\twhile (prevActive.size() > nowActive.size()) {\n\t\t\tnowActive.add(ViewModel.TELL_CMD_TURTLE_ACTIVE_DEFAULT);\n\t\t}\n\t\treturn nowActive;\n\t}", "public CandidateValue getStatusCVs() {\n\n return statusCVs;\n }", "@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}", "public void succeededChallenge() {\n int point = players.get(indexOfActivePlayer).getPoint();\n int pointToAdd = categories.get(indexOfActiveCategory).getActiveChallengePoint();\n point += pointToAdd;\n players.get(indexOfActivePlayer).setPoint(point);\n addGameRound(true);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }", "public State[] getSuccessors(State curr) {\n State [] successors = new State [6];\r\n \r\n if(currjug1!=0) {\r\n //e1\r\n successors[0] = new State(capjug1, capjug2, 0, currjug2, goal,depth);\r\n successors[0].parentPt = curr;\r\n successors[0].depth = curr.depth+1;\r\n //p12\r\n int pour = pour(currjug1, currjug2, capjug2);\r\n successors[1] = new State(capjug1, capjug2, currjug1-pour, currjug2+pour, goal,depth);\r\n successors[1].parentPt = curr;\r\n successors[1].depth = curr.depth+1;\r\n }\r\n \r\n if(currjug2!=0) {\r\n //e2\r\n successors[2] = new State(capjug1, capjug2, currjug1, 0, goal,depth);\r\n successors[2].parentPt = curr;\r\n successors[2].depth = curr.depth+1;\r\n }\r\n \r\n //f2\r\n successors[3] = new State(capjug1, capjug2, currjug1, capjug2, goal,depth);\r\n successors[3].parentPt = curr;\r\n successors[3].depth = curr.depth+1;\r\n \r\n if(currjug2!=0) {\r\n //p21\r\n int pour = pour(currjug2, currjug1, capjug1);\r\n successors[4] = new State(capjug1, capjug2, currjug1+pour, currjug2-pour, goal,depth);\r\n successors[4].parentPt = curr;\r\n successors[4].depth = curr.depth+1;\r\n }\r\n \r\n //f1\r\n successors[5] = new State(capjug1, capjug2, capjug1, currjug2, goal,depth);\r\n successors[5].parentPt = curr;\r\n successors[5].depth = curr.depth+1;\r\n \r\n return successors;\r\n }", "private PdpResponseDetails handleActiveState(final PdpStateChange pdpStateChangeMsg,\n final PdpStatus pdpStatusContext, final PdpMessageHandler pdpMessageHandler) {\n PdpResponseDetails pdpResponseDetails = null;\n if (pdpStatusContext.getState().equals(PdpState.ACTIVE)) {\n pdpResponseDetails = pdpMessageHandler.createPdpResonseDetails(pdpStateChangeMsg.getRequestId(),\n PdpResponseStatus.SUCCESS, \"Pdp already in active state\");\n } else {\n final List<ToscaPolicy> policies = Registry.get(ApexStarterConstants.REG_APEX_TOSCA_POLICY_LIST);\n if (policies.isEmpty()) {\n pdpStatusContext.setState(PdpState.ACTIVE);\n pdpResponseDetails = pdpMessageHandler.createPdpResonseDetails(pdpStateChangeMsg.getRequestId(),\n PdpResponseStatus.SUCCESS, \"State changed to active. No policies found.\");\n } else {\n pdpResponseDetails = startApexEngine(pdpStateChangeMsg, pdpStatusContext, pdpMessageHandler, policies);\n }\n }\n return pdpResponseDetails;\n }", "private void countAgents(){\r\n\t\t\tfor(Agent agent : agents){\r\n\t\t\t\tif(agent.isActive()) activeAgent ++;\r\n\t\t\t\telse if(agent.getJailTerm() > 0) jailedAgent ++;\r\n\t\t\t\telse quietAgent ++;\r\n\t\t\t}\r\n\t\t}", "public boolean isStateActive(State state) {\n\t\tswitch (state) {\n\t\t\tcase main_region_digitalwatch :\n\t\t\t\treturn stateVector[0].ordinal() >= State.main_region_digitalwatch\n\t\t\t\t\t\t.ordinal()\n\t\t\t\t\t\t&& stateVector[0].ordinal() <= State.main_region_digitalwatch_Display_glowing_GlowDelay\n\t\t\t\t\t\t\t\t.ordinal();\n\t\t\tcase main_region_digitalwatch_Time_counting_Counting :\n\t\t\t\treturn stateVector[0] == State.main_region_digitalwatch_Time_counting_Counting;\n\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime :\n\t\t\t\treturn stateVector[1].ordinal() >= State.main_region_digitalwatch_Display_refreshing_RefreshingTime\n\t\t\t\t\t\t.ordinal()\n\t\t\t\t\t\t&& stateVector[1].ordinal() <= State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm\n\t\t\t\t\t\t\t\t.ordinal();\n\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm :\n\t\t\t\treturn stateVector[1] == State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm;\n\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm :\n\t\t\t\treturn stateVector[1] == State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingChrono :\n\t\t\t\treturn stateVector[1] == State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t\tcase main_region_digitalwatch_Display_chrono_countingChrono :\n\t\t\t\treturn stateVector[2] == State.main_region_digitalwatch_Display_chrono_countingChrono;\n\t\t\tcase main_region_digitalwatch_Display_chrono_ChoroStart :\n\t\t\t\treturn stateVector[2] == State.main_region_digitalwatch_Display_chrono_ChoroStart;\n\t\t\tcase main_region_digitalwatch_Display_glowing_GlowOff :\n\t\t\t\treturn stateVector[3] == State.main_region_digitalwatch_Display_glowing_GlowOff;\n\t\t\tcase main_region_digitalwatch_Display_glowing_GlowOn :\n\t\t\t\treturn stateVector[3] == State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t\tcase main_region_digitalwatch_Display_glowing_GlowDelay :\n\t\t\t\treturn stateVector[3] == State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t\tdefault :\n\t\t\t\treturn false;\n\t\t}\n\t}", "public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Boolean getActive()\r\n/* */ {\r\n/* 200 */ return this.active;\r\n/* */ }", "boolean isSetObjectives();", "private void handlePlanFinishedEvent() {\n for (String myActivePlanKey : myActivePlans.keySet()) {\n\n boolean isStillActive = false;\n\n // Iterate currently active access plans\n for (RPlan plan : internalFeature.getCapability().getPlans()) {\n // If plan instance stored in my active plan map is still currently active access plan break and continue\n // with testing next plan instance stored in my active plan map\n if (myActivePlanKey.equals(plan.toString()) ^ isPlanFinished(plan)) {\n isStillActive = true;\n break;\n }\n }\n\n // If plan instance stored in my active plan map is no longer currently active access plan fire plan finished emotional event\n if (!isStillActive) {\n\n Object[] planObject = myActivePlans.get(myActivePlanKey);\n RPlan plan = (RPlan) planObject[0];\n String reason = (String) planObject[1];\n\n // Remove no longer active plan instance from my active plan map to avoid multiple plan finished events for one plan instance\n myActivePlans.remove(myActivePlanKey);\n\n // Get objectValue\n String elementName = plan.getModelElement().getDescription();\n Element element = engine.getElement(elementName, R.PLAN);\n\n // Create emotional event\n EmotionalEvent emotionalEvent = new EmotionalEvent();\n\n // Get plan result\n int planResult;\n if (plan.getLifecycleState().equals(RPlan.PlanLifecycleState.PASSED)) {\n planResult = R.RESULT_SUCCESS;\n } else {\n planResult = R.RESULT_FAILURE;\n }\n\n // Add system parameters needed for plan, goal emotions (unique for plan finished event)\n Map<Integer, Double> systemParams = params.getSystemParameterValues(element);\n params.addSystemParameterValuesForGoalPlanEmotions(engine, systemParams, reason);\n\n // Set emotional event values\n emotionalEvent.setElementName(elementName);\n emotionalEvent.setEventType(R.EVT_PLAN_FINISHED);\n emotionalEvent.setResultType(planResult);\n emotionalEvent.setUserParameters(params.getUserParameterValues(plan, JBDIEmo.UserPlanParams.get(engine.getAgentName())\n .get(plan.getModelElement().getDescription()).value()));\n emotionalEvent.setSystemParameters(systemParams);\n\n // Fire emotional event\n element.processEmotionalEvent(emotionalEvent);\n\n // Send emotional message\n messageCenter.sendEmotionalMessage(elementName, R.EVT_PLAN_FINISHED, planResult);\n }\n }\n }", "protected List<String> getActives() {\n\t\treturn myActives;\n\t}", "int isActive();", "private int countCases (CtMethod<?> Casein){\n List<CtCase> caseCalls = Casein.getElements(new TypeFilter<CtCase>(CtCase.class));\n int output = caseCalls.size();\n for (CtCase caseint : caseCalls){\n if (caseint.toString().toLowerCase().replace(\" \",\"\").contains(\"default:\")){\n output -= 1;\n }\n }\n return output;\n }", "public void viewApplicants() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(dev_GSP_CLICKER)).click();\n\t\tdriver.findElement(By.xpath(dev_GSP_CONDITIONALLYAPPROVE)).click();\n\t\tThread.sleep(1000);\n\t\tWebElement promowz = driver.findElement(By.xpath(dev_GSP_CAPPROVEREASON));\n\t\tpromowz.sendKeys(\"c\");\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(By.xpath(dev_GSP_CAPPROVEBUTTON)).click();\n\t\tAssert.assertTrue(\"Successfully conditionally approved!\", elementUtil.isElementAvailabe(dev_GSP_CAPPROVESUCCESS));\n\t\tlogger.info(\"Passed conditionally approved\");\n\t\t\n\t}", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "@Override\n public int howManyActivated(){\n return (gameboardPanel.howManyActivated() + leaderCardsPanel.howManyActivated());\n }", "public int getCasesCount() {\n if (casesBuilder_ == null) {\n return cases_.size();\n } else {\n return casesBuilder_.getCount();\n }\n }", "public synchronized Vector<String> proceedNextCycle(){\n\t\tVector<String> agentids=new Vector<String>(waitingAgents);\n\t\twaitingAgents.clear();\n\t\tnotifyAll();\n\t\treturn agentids;\n\t}", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }", "public void activate() {\n // PROGRAM 1: Student must complete this method\n if (control == 0) { // run and()\n \t\tand();\n \t} else if (control == 1) { //run or()\n \t\tor();\n \t} else if (control == 2) { //run add()\n \t\tadd();\n \t} else if (control == 6) { //run sub()\n \t\tsub();\n \t} else if (control == 7) { //run passB()\n \t\tpassB();\n \t} else {\n \t\tthrow new RuntimeException(\"invalid control\"); //otherwise, there was an invalid control\n \t}\n }", "public boolean getCollectState() {\n return collectedOpticalSwitch.get();\n }", "@Override\r\n\tpublic boolean getState() {\n\t\treturn activated;\r\n\t}", "public boolean getActive();", "public boolean getActive();", "public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<String> getCustomerActiveSet() {\r\n\t\treturn (List<String>)getHibernateTemplate().find(\"SELECT DISTINCT customerName FROM CardIssue WHERE status='Active'\");\r\n\t}", "@Test\n\tvoid getEndTransitionsAfterMinimisation_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"a|bc*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<Integer> endStates = new ArrayList<Integer>();\n\t\t\tendStates.add(1);\n\t\t\tendStates.add(2);\n\t\t\tassertEquals(endStates, a.getEnd());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "Collection<String> getPossibleVictoryConditions();", "public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }", "public boolean[] getWhoseShowing() {\n\t\tif (showing == null) {\n\t\t\tshowing = new boolean[getList(TimeLineEvent.ACTORS).size()];\n\t\t\tArrays.fill(showing, true);\n\t\t}\n\t\treturn showing;\n\t}", "com.lvl6.proto.EventQuestProto.QuestAcceptResponseProto.QuestAcceptStatus getStatus();", "void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}", "public boolean activate() { //if true continue to execute\n\n if (Inventory.getCount(PowerFletch.LOG) >= 1) {\n System.out.println(\"cutting activated\");\n\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic boolean matchCondition(Observation obs, DialogueState dialState) {\n\t\treturn matchesObservation(obs);\n\t}", "public SortedSet<Concert> getActiveConcerts()//\t\t--> Returnerer alle aktive konserter registrert på dette lokalet.\n\t{\n\t\tGregorianCalendar calender = (GregorianCalendar)Calendar.getInstance();\n\t\tcalender = Utilities.getCleanDate(calender);\n\n\t\tConcert c = new Concert(calender);\n\t\tSortedSet<Concert> active = concerts.tailSet(c);\n\n\t\tif(active.isEmpty())\n\t\t\treturn null;\n\n\t\treturn active;\n\t}", "private synchronized void teamVictory() {\n \t\tif (state == MatchState.ONVICTORY || state == MatchState.ONCOMPLETE || state == MatchState.ONCANCEL) \n \t\t\treturn;\n \t\tstate = MatchState.ONVICTORY;\n \t\t/// Call the rest after a 2 tick wait to ensure the calling transitionMethods complete before the\n \t\t/// victory conditions start rolling in\n \t\tBukkit.getScheduler().scheduleSyncDelayedTask(plugin, new MatchVictory(this),2L);\n \t}", "public int active() {\n return this.active;\n }", "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integer> current = ret.getAccepting();\n\n\t\tboolean[] visited = new boolean[ret.getStates().length];\n\n\t\twhile (!current.isEmpty()) {\n\t\t\tInteger evaluated = current.iterator().next();\n\t\t\tcurrent.remove(evaluated);\n\t\t\tif (!visited[evaluated]) {\n\t\t\t\tvisited[evaluated] = true;\n\t\t\t\treachable.add(evaluated);\n\t\t\t\tSet<Integer> prev = new HashSet<>(reversedReachable.get(evaluated));\n\t\t\t\tcurrent.addAll(prev);\n\t\t\t}\n\t\t}\n\n\t\treturn reachable;\n\t}", "private void viewActiveCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < activeCourseList.size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(activeCourseList.get(i));\n } else {\n System.out.println((i + 1) + \": \" + activeCourseList.get(i).getName());\n }\n }\n\n }", "boolean isInactive() {\n/* 4818 */ return this.inactive;\n/* */ }", "@Override\n public int howManyActivatedExceptBaseProduction(){\n return (gameboardPanel.howManyActivatedExceptBaseProduction() + leaderCardsPanel.howManyActivated());\n }", "boolean isGoalReached(ExerciseSessionData data);", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "public boolean isActiveAttackState() {\n return this.activeAttackState;\n }", "public Integer excerciseStateCount(Activity activity, ExerciseState state);" ]
[ "0.55755204", "0.5522592", "0.55025864", "0.5472388", "0.5423448", "0.5414771", "0.5381404", "0.53197306", "0.5269962", "0.52545565", "0.52328897", "0.52276045", "0.5184165", "0.5146789", "0.5144613", "0.5129149", "0.5125141", "0.5113023", "0.50922155", "0.50815594", "0.5075162", "0.5064692", "0.50344586", "0.5017176", "0.5010217", "0.4999443", "0.49962544", "0.4968224", "0.49609965", "0.49337158", "0.490053", "0.4900145", "0.4896467", "0.4889985", "0.48863292", "0.48841947", "0.4847706", "0.48418573", "0.48263407", "0.48188722", "0.48135996", "0.48067218", "0.48052514", "0.47764298", "0.4776077", "0.4773909", "0.47736168", "0.47734147", "0.47649062", "0.4762276", "0.47557017", "0.47512046", "0.47218087", "0.4718074", "0.4714235", "0.4699922", "0.46980357", "0.46893665", "0.46886098", "0.4677389", "0.46728504", "0.46668994", "0.46567324", "0.4655891", "0.46474078", "0.4634382", "0.4630698", "0.46282732", "0.46274036", "0.46208367", "0.46189806", "0.46114072", "0.4609376", "0.46013916", "0.46012297", "0.45975015", "0.4593854", "0.45886412", "0.45886412", "0.45886075", "0.45861372", "0.45834228", "0.45787862", "0.45768344", "0.45718426", "0.4571317", "0.45504767", "0.454683", "0.45448333", "0.45420492", "0.45378214", "0.45356053", "0.45325974", "0.45305923", "0.45286065", "0.4525117", "0.45200616", "0.45175746", "0.45154768", "0.4514259" ]
0.5420068
5
what % of cases is fully decided? (i.e. either they have all the decisions or they are reviewcompleted)
public static float getCasesCompletedPercentageAllStagesAllIterations(AccessCertificationCampaignType campaign) { return getCasesCompletedPercentage(campaign.getCase(), null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDecision();", "boolean hasDecision();", "int getConditionalCasesCount();", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public static int compareSafetyComputations() {\n\t\tSystem.out.println(\"Distance,Duration,Exhalation,Derived,Inferred\");\n\t\tfinal boolean[] derived_results = new boolean[10];\n\t\tfinal boolean[] inferred_results = new boolean[10];\n\t\tint correctInferences = 0;\n\t\tfor(int i = 0; i < derived_results.length; i++) {\n\t\t\tfinal int randomDistance = (int) (Math.random() * (LARGE_DISTANCE * 3));\n\t\t\tfinal int randomDuration = (int) (Math.random() * (LARGE_DURATION * 3));\n\t\t\tfinal int randomExhalation = (int) (Math.random() * (LARGE_EXHALATION_LEVEL * 3));\n\t\t\tderived_results[i] = isDerivedSafe(randomDistance, randomDuration, randomExhalation);\n\t\t\tinferred_results[i] = isInferredSafe(randomDistance, randomDuration, randomExhalation);\n\t\t\tSystem.out.println(randomDistance + COMMA + randomDuration + COMMA \n\t\t\t\t\t\t\t\t+ randomExhalation + COMMA + derived_results[i] + COMMA\n\t\t\t\t\t\t\t\t+ inferred_results[i]);\n\t\t}\n\t\tfor(int j = 0; j < derived_results.length; j++) {\n\t\t\tif(derived_results[j] == inferred_results[j]) {\n\t\t\t\tcorrectInferences++;\n\t\t\t}\n\t\t}\n\t\treturn correctInferences;\n\t}", "private int countTrue(boolean... cases) {\n int result = 0;\n for (boolean c : cases) {\n if (c) {\n result++;\n }\n }\n return result;\n }", "public String agileOrWaterfallDecider() {\n String decision = \"Agile.\";\n int x = 0;\n if (numberOfProgrammersOnCheckBox.isSelected())\n x += 1;\n if (needForAFixedCheckBox.isSelected())\n x += 1;\n if (doTeammateHaveExperienceCheckBox.isSelected())\n x += 1;\n if (stringentQualityControlRequirementsCheckBox.isSelected())\n x += 1;\n if (earlyIntegrationNOTDesirableCheckBox.isSelected())\n x += 1;\n if (earlyWorkingModelsNOTCheckBox.isSelected())\n x += 1;\n if (x > 3)\n decision = \"Waterfall.\";\n else if (x == 3) {\n decision = \"either one.\";\n }\n return decision;\n }", "public float assess(Card card) {\n int grade = 0;\n \n List<Review> reviewList = card.getReviews();\n \n if(reviewList.isEmpty()) {\n grade = Professor.HAS_NEVER_BEEN_REVIEWED;\n } else {\n // TODO : vérifier que les noeuds \"review\" sont bien classés par date croissante\n if(!isSorted(reviewList)) System.out.println(\"Unsorted card detected : \" + card);\n \n for(Review review : reviewList) {\n if(review.getResult().equals(Review.RIGHT_ANSWER_STRING)) {\n grade++;\n } else {\n grade = 0;\n }\n }\n }\n \n return grade;\n }", "public void calculateProbabilities(){\n\t}", "@Override\n\tpublic int countCase() {\n\t\treturn proSystemHeadMapper.selectCountCase()+proMultiMapper.selectCountMul()+proAppMapper.selectCountApp()+proItMapper.selectCountIt();\n\t}", "public static void main(String[] args) {\n HashMap<String, Boolean> casesToAction = new HashMap<>();\n casesToAction.put(\"a\", true);\n casesToAction.put(\"b\", true);\n casesToAction.put(\"c\", false);\n casesToAction.put(\"d\", true);\n casesToAction.put(\"e\", false);\n\n int expectedSuccessCount = Collections.frequency(casesToAction.values(), true);\n System.out.println(expectedSuccessCount);\n }", "public static void main(String[] args){\n// int[] testArray = {82, 95, 71, 6, 34};\n//\n// int min = Aggregate.min(testArray);\n// int max = Aggregate.max(testArray);\n// int sum = Aggregate.sum(testArray);\n// double avg = Aggregate.average(testArray);\n// double div = Aggregate.standardDeviation(testArray);\n//\n// System.out.println(min); // 6\n// System.out.println(max); //95\n// System.out.println(sum); //288\n// System.out.println(avg); //57.6\n// System.out.println(div); //36.719\n\n final int ROCK = 1;\n final int SCISSORS = 2;\n final int PAPER = 3;\n\n int computerDecision = getComputerChoice();\n int userDecision = getUserChoice();\n\n System.out.print(\"user: \" + printChoice(userDecision));\n switch(userDecision) {\n\n case ROCK:\n if(computerDecision == ROCK){\n System.out.println(\"That's a Tie!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Congrats! You won\");\n }\n else{\n System.out.println(\"Sorry,You lost!\");\n }\n break;\n case SCISSORS:\n if(computerDecision == ROCK){\n System.out.println(\"Sorry,You lost!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"That's a Tie!\");\n }\n else{\n System.out.println(\"Congrats! You won\");\n }\n break;\n case PAPER:\n if(computerDecision == ROCK){\n System.out.println(\"Congrats! You won\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Sorry,You lost!\");\n }\n else{\n System.out.println(\"That's a Tie!\");\n }\n break;\n\n default:\n\n }\n\n\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "public int computeStatus() {\n\t\tif(isOutcomeExceeded()) return 0;\r\n\t\t\r\n\t\t//the new loan is too expensive\r\n\t\tif(isOutcomeExceeded(mMonthlyLoan)) return 0;\r\n\t\t\r\n\t\tint domainCoeff = DBOperations.getDomainCoeffById(mDomainId); // (0, 10] \r\n\t\tint expCoeff = DBOperations.getExperienceCoeffById(mExperienceId); // (0, 5]\r\n\t\t\r\n\t\tint backgroundCoeff = domainCoeff * expCoeff; // (0, 50]\r\n\t\tif(isIncomeRaising) backgroundCoeff *= 2; // (0, 100]\r\n\t\t\r\n\t\tint incomeCoeff = getIncomeWeight(mMonthlyIncome); // (0, 100]\r\n\t\t\r\n\t\tint coeff = (int) ((backgroundCoeff * 0.20) + (incomeCoeff * 0.55)); // (0, 75]\r\n\t\tif(mHadOtherLoans) coeff += 5; // (0, 80]\r\n\t\tif(mHasDelayedPays) coeff -= 10; // (0, 80]\r\n\t\t\r\n\t\tif((mMonthlyIncome - mMonthlyOutcome) * MAXIMUM_SURE_OUTCOME_PERCENTAGE / 100 >= mMonthlyLoan) {\r\n\t\t\tcoeff += 20; // (0, 100]\r\n\t\t}\r\n\t\t\r\n\t\tif(coeff <= 25) return 0;\r\n\t\treturn coeff < 55 ? 1 : 2;\r\n\t}", "double getCritChance();", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "boolean hasPercentage();", "int getComparisons();", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "@Test\n\tpublic void testCase1()\n\t{\n\t\tint numberOfCases=3;\n\t\t\n\t\t//checking number of case is positive or not\n\t\tboolean valid=BillEstimation.numberOfCaseValidation(numberOfCases);\n\t\tassertTrue(valid);\n\t}", "public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "public int calculateVotes() {\n return 1;\n }", "@Test\r\n void testVaryingMajorityWithNotEnoughHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 1, \"varyingMajority not returning correctly with insufficient history\");\r\n }", "private boolean passThreshold(Decision decision) {\n\t\tint type = decision.getChoiceModifiers().getThresholdType();\n\t\tint sign = decision.getChoiceModifiers().getThresholdSign();\n\t\tint value = decision.getChoiceModifiers().getThresholdValue();\n\t\tCounters counter = storyController.getStory().getPlayerStats();\n\t\tboolean outcome = false;\n\t\tint[] typeBase = {counter.getPlayerHpStat(),counter.getEnemyHpStat(),counter.getTreasureStat()};\n\t\tswitch(sign){\n\t\t\tcase(0):\n\t\t\t\tif(typeBase[type] < value){outcome = true;};\n\t\t\t\tbreak;\n\t\t\tcase(1):\n\t\t\t\tif(typeBase[type] > value){outcome = true;};\n\t\t\t\tbreak;\n\t\t\tcase(2):\n\t\t\t\tif(typeBase[type] == value){outcome = true;};\n\t\t\t\tbreak;\n\t\t}\n\t\treturn outcome;\n\t}", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "boolean hasFinalTallyResult();", "public int evalPref(Schedule sched) {\n\t\t\n\t\tint failCount = 0;\n\t\tint index = -1;\n\t\tCourse workingCourse;\n\t\tLab workingLab;\n\t\tint testCount = 0;\n\t\t\n\t\t\n\t\tfor(int i = 0;i<preferences.size();i++)\n\t\t{\n\t\t\tindex = preferences.get(i).getY().getIndex();\n\t\t\t\n\t\t\tif(preferences.get(i).getY().getClass() == Course.class) //is a course\n\t\t\t{\n\t\t\t\tworkingCourse = sched.getCourses().get(index);\n\t\t\t\t\n\t\t\t\tif(workingCourse.getSlot() != preferences.get(i).getX())\n\t\t\t\t{\n\t\t\t\t\tfailCount += preferences.get(i).getZ();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //is a lab\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(index);\n\t\t\t\t\n\t\t\t\tif(workingLab.getSlot() != preferences.get(i).getX())\n\t\t\t\t{\n\t\t\t\t\tfailCount += preferences.get(i).getZ();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttestCount += preferences.get(i).getZ();\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(testCount);\n\t\treturn failCount;\n\t\t\n\t\t/*\n\t\tArrayList<Course> uniqueCourses = new ArrayList<Course>();\n\t\tArrayList<Course> uniqueLabs = new ArrayList<Course>();\n\t\t\n\t\tArrayList<Pair<Course, Integer>> cRunningTotals = new ArrayList<Pair<Course, Integer>>();\n\t\tArrayList<Pair<Course, Integer>> lRunningTotals = new ArrayList<Pair<Course, Integer>>();\n\t\t\n\t\tArrayList<Course> cHasPrefMet = new ArrayList<Course>();\t\n\t\tArrayList<Lab> lHasPrefMet = new ArrayList<Lab>();\n\t\t\n\t\tboolean continueChecking = true;\n\t\tCourse prefCourse, workingCourse;\n\t\tLab prefLab, workingLab;\n\t\tTimeSlot prefTimeSlot, workingTimeSlot;\n\t\tint prefValue;\n\t\tint totalToReturn = 0;\n\t\t\n\t\t//Traverse through preferences to find the unique courses and labs\n\t\t//because each lab and course can have more than one \n\t\tfor(int i = 0;i<preferences.size();i++)\n\t\t{\n\t\t\tif(preferences.get(i).getY().getClass() == Course.class)//working with a course\n\t\t\t{\n\t\t\t\tif(!uniqueCourses.contains(preferences.get(i).getY()))\n\t\t\t\t{\n\t\t\t\t\tuniqueCourses.add(preferences.get(i).getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //working with a class\n\t\t\t{\n\t\t\t\tif(!uniqueLabs.contains((Lab) preferences.get(i).getY()))\n\t\t\t\t{\n\t\t\t\t\tuniqueLabs.add((Lab)preferences.get(i).getY());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Now have two lists that contains all the unique courses and labs\n\t\t//-----\n\t\t\n\n\t\tfor(int i = 0; i<uniqueCourses.size();i++)\n\t\t{\n\t\t\tcRunningTotals.add(new Pair<Course, Integer>(uniqueCourses.get(i), 0));\n\t\t}\n\t\t\n\n\t\tfor(int i = 0; i<uniqueLabs.size();i++)\n\t\t{\n\t\t\tlRunningTotals.add(new Pair<Course, Integer>(uniqueLabs.get(i), 0));\n\t\t}\n\t\t\n\t\t//Have a running total pair for each unique course\n\t\t//When we find one that meets a single preference\n\t\t//then set that total to zero and don't change it anymore \n\t\t\n\t\t//Go through the preferences check if they are upheld\n\t\tfor(int i = 0; i<preferences.size();i++)\n\t\t{\n\t\t\tprefTimeSlot = preferences.get(i).getX();\n\t\t\tprefValue = preferences.get(i).getZ();\n\t\t\tcontinueChecking = true;\n\t\t\t\n\t\t\t//If it's a lab, if not, must be a class\n\t\t\tif(preferences.get(i).getY().getClass() == Lab.class)\n\t\t\t{\n\t\t\t\tprefLab = (Lab) preferences.get(i).getY();\n\t\t\t\t\n\t\t\t\t//Want to check if we have met a preference for this course already\n\t\t\t\t//If we have, we don't need to do a check for this preference s\n\t\t\t\tfor(int j = 0;j<lHasPrefMet.size();j++)\n\t\t\t\t{\n\t\t\t\t\tif(prefLab.equals(lHasPrefMet.get(j)))\n\t\t\t\t\t\tcontinueChecking = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(continueChecking == true)\n\t\t\t\t{\n\t\t\t\t\t//Have to find this lab in the schedule and look to see if\n\t\t\t\t\t//it's in the correct time slot\nA:\t\t\t\t\tfor(int j = 0;j<sched.getLabs().size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tworkingLab = sched.getLabs().get(j);\n\t\t\t\t\t\tworkingTimeSlot = workingLab.getSlot();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(workingLab.equals(prefLab))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif((workingTimeSlot.getDay().equals(prefTimeSlot.getDay())) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getStartTime() == prefTimeSlot.getStartTime()) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getMaxNum() == prefTimeSlot.getMaxNum())\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\t\t//If we met the pref, we add it so this course won't be \n\t\t\t\t\t\t\t\t//checked again cause a course can have more than 1 pref. and\n\t\t\t\t\t\t\t\t//Obviously not all can be met\n\t\t\t\t\t\t\t\tlHasPrefMet.add(workingLab);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Find this lab in lRunningTotals and set it to zero\n\t\t\t\t\t\t\t\t\nX:\t\t\t\t\t\t\t\tfor(int k = 0; k<lRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tLab temp;\n\t\t\t\t\t\t\t\t\ttemp = (Lab) lRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingLab))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlRunningTotals.set(k, new Pair<Course, Integer>(prefLab, 0));\n\t\t\t\t\t\t\t\t\t\tbreak X;\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\tbreak A;\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\t//The lab did not meet the preferences being tested\n\t\t\t\t\t\t\t\t//so we need to add it's prefValue to the total for \n\t\t\t\t\t\t\t\t//that unique course\nQ:\t\t\t\t\t\t\t\tfor(int k = 0; k<lRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tLab temp;\n\t\t\t\t\t\t\t\t\tint tempTotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttempTotal = lRunningTotals.get(k).getValue();\n\t\t\t\t\t\t\t\t\ttemp = (Lab) lRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingLab))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlRunningTotals.set(k, new Pair<Course, Integer>(prefLab, tempTotal + prefValue));\n\t\t\t\t\t\t\t\t\t\tbreak Q;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak A;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//SO, they are the same class, now check time slot and break out\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\telse //If the preference is talking about a course\n\t\t\t{\n\n\t\t\t\tprefCourse = preferences.get(i).getY();\n\t\t\t\t//Want to check if we have met a preference for this course already\n\t\t\t\tfor(int j = 0;j<cHasPrefMet.size();j++)\n\t\t\t\t{\n\t\t\t\t\tif(prefCourse.equals(cHasPrefMet.get(j)))\n\t\t\t\t\t\tcontinueChecking = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(continueChecking == true)\n\t\t\t\t{\n\t\t\t\t\t//Have to find this course in the schedule and look to see if\n\t\t\t\t\t//it's in the correct time slot\nB:\t\t\t\t\tfor(int j = 0;j<sched.getCourses().size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tworkingCourse = sched.getCourses().get(j);\n\t\t\t\t\t\tworkingTimeSlot = workingCourse.getSlot();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(workingCourse.equals(prefCourse))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tSystem.out.print(workingCourse.getDepartment());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingCourse.getNumber());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingCourse.getSection());\n\t\t\t\t\t\t\tSystem.out.println();\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.print(workingTimeSlot.getDay());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + workingTimeSlot.getStartTime());\n\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tSystem.out.print(prefTimeSlot.getDay());\n\t\t\t\t\t\t\tSystem.out.print(\" \" + prefTimeSlot.getStartTime());\n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((workingTimeSlot.getDay().equals(prefTimeSlot.getDay())) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getStartTime() == prefTimeSlot.getStartTime()) &&\n\t\t\t\t\t\t\t\t\t(workingTimeSlot.getMaxNum() == prefTimeSlot.getMaxNum())\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t//Same ideas as when doing labs\n\t\t\t\t\t\t\t\tcHasPrefMet.add(workingCourse);\nY:\t\t\t\t\t\t\t\tfor(int k = 0; k<cRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tCourse temp;\n\t\t\t\t\t\t\t\t\ttemp = cRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingCourse))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcRunningTotals.set(k, new Pair<Course, Integer>(prefCourse, 0));\n\t\n\t\t\t\t\t\t\t\t\t\tbreak Y;\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\tbreak B;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\nP:\t\t\t\t\t\t\t\tfor(int k = 0; k<cRunningTotals.size();k++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tCourse temp;\n\t\t\t\t\t\t\t\t\tint tempTotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttempTotal = cRunningTotals.get(k).getValue();\n\t\t\t\t\t\t\t\t\ttemp = cRunningTotals.get(k).getKey();\n\t\t\t\t\t\t\t\t\tif(temp.equals(workingCourse))\n\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcRunningTotals.set(k, new Pair<Course, Integer>(prefCourse, tempTotal + prefValue));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak P;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak B;\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\t\n\t\t//Add up our fail totals\n\t\tfor(int i = 0;i<cRunningTotals.size();i++)\n\t\t{\n\t\t\ttotalToReturn += cRunningTotals.get(i).getValue();\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0;i<lRunningTotals.size();i++)\n\t\t{\n\t\t\ttotalToReturn += lRunningTotals.get(i).getValue();\n\t\t}\n\t\t\n\t\t\n\t\treturn totalToReturn;\n\t\t\n\t\t*/\n\t}", "private void warResult() {\r\n // Get number of survivors alive\r\n int survivorCount = safeCount(survivors);\r\n if (survivorCount == 0) {\r\n System.out.println(\"None of the survivors made it.\");\r\n\t\t}\r\n else {\r\n System.out.println(\"It seems \" + survivorCount + \" have made it to safety.\");\r\n\t\t}\r\n }", "private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }", "@java.lang.Override\n public int getCasesCount() {\n return cases_.size();\n }", "boolean hasCorrect();", "boolean isCounting();", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "public static Attribute chooseAttribute(ArrayList<Case> cases) {\n\t\tAttribute currentBestAttribute = null;\n\t\tdouble currentBestRemainder = 0;\n\n\t\t// k\n\t\tdouble [] kValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Extract the correct fields from each case into a separate array for sorting\n\t\t\tkValues[i] = cases.get(i).k;\n\t\t}\n\t\tArrays.sort(kValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\t// Find the midpoint between two sequential values\n\t\t\tdouble midpoint = (kValues[i] + kValues[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == kValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tif (c.k < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as given in lecture slides 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestAttribute == null) {\n\t\t\t\tcurrentBestAttribute = Attribute.K;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// na\n\t\tdouble [] naValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tnaValues[i] = cases.get(i).na;\n\t\t}\n\t\tArrays.sort(naValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (naValues[i] + naValues[i+1]) / 2;\n\t\t\tif (midpoint == naValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.na < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Na;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// cl\n\t\tdouble [] clValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tclValues[i] = cases.get(i).cl;\n\t\t}\n\t\tArrays.sort(clValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (clValues[i] + clValues[i+1]) / 2;\n\t\t\tif (midpoint == clValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.cl < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.CL;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// hco3\n\t\tdouble [] hco3Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\thco3Values[i] = cases.get(i).hco3;\n\t\t}\n\t\tArrays.sort(hco3Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (hco3Values[i] + hco3Values[i+1]) / 2;\n\t\t\tif (midpoint == hco3Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.hco3 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.HCO3;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// endotoxin\n\t\tdouble [] endotoxinValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tendotoxinValues[i] = cases.get(i).endotoxin;\n\t\t}\n\t\tArrays.sort(endotoxinValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2;\n\t\t\tif (midpoint == endotoxinValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.endotoxin < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Endotoxin;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// aniongap\n\t\tdouble [] aniongapValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\taniongapValues[i] = cases.get(i).aniongap;\n\t\t}\n\t\tArrays.sort(aniongapValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2;\n\t\t\tif (midpoint == aniongapValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.aniongap < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Aniongap;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pla2\n\t\tdouble [] pla2Values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpla2Values[i] = cases.get(i).pla2;\n\t\t}\n\t\tArrays.sort(pla2Values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pla2Values[i] + pla2Values[i+1]) / 2;\n\t\t\tif (midpoint == pla2Values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pla2 < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PLA2;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// sdh\n\t\tdouble [] sdhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tsdhValues[i] = cases.get(i).sdh;\n\t\t}\n\t\tArrays.sort(sdhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (sdhValues[i] + sdhValues[i+1]) / 2;\n\t\t\tif (midpoint == sdhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.sdh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.SDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// gldh\n\t\tdouble [] gldhValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tgldhValues[i] = cases.get(i).gldh;\n\t\t}\n\t\tArrays.sort(gldhValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (gldhValues[i] + gldhValues[i+1]) / 2;\n\t\t\tif (midpoint == gldhValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.gldh < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.GLDH;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// tpp\n\t\tdouble [] tppValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\ttppValues[i] = cases.get(i).tpp;\n\t\t}\n\t\tArrays.sort(tppValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (tppValues[i] + tppValues[i+1]) / 2;\n\t\t\tif (midpoint == tppValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.tpp < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.TPP;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// breathRate\n\t\tdouble [] breathRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tbreathRateValues[i] = cases.get(i).breathRate;\n\t\t}\n\t\tArrays.sort(breathRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2;\n\t\t\tif (midpoint == breathRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.breathRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.BreathRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pcv\n\t\tdouble [] pcvValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpcvValues[i] = cases.get(i).pcv;\n\t\t}\n\t\tArrays.sort(pcvValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pcvValues[i] + pcvValues[i+1]) / 2;\n\t\t\tif (midpoint == pcvValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pcv < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PCV;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// pulseRate\n\t\tdouble [] pulseRateValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tpulseRateValues[i] = cases.get(i).pulseRate;\n\t\t}\n\t\tArrays.sort(pulseRateValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2;\n\t\t\tif (midpoint == pulseRateValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.pulseRate < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.PulseRate;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibrinogen\n\t\tdouble [] fibrinogenValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibrinogenValues[i] = cases.get(i).fibrinogen;\n\t\t}\n\t\tArrays.sort(fibrinogenValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2;\n\t\t\tif (midpoint == fibrinogenValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibrinogen < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Fibrinogen;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// dimer\n\t\tdouble [] dimerValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tdimerValues[i] = cases.get(i).dimer;\n\t\t}\n\t\tArrays.sort(dimerValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (dimerValues[i] + dimerValues[i+1]) / 2;\n\t\t\tif (midpoint == dimerValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.dimer < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.Dimer;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\t// fibPerDim\n\t\tdouble [] fibPerDimValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\tfibPerDimValues[i] = cases.get(i).fibPerDim;\n\t\t}\n\t\tArrays.sort(fibPerDimValues);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2;\n\t\t\tif (midpoint == fibPerDimValues[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\tif (c.fibPerDim < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\tif (remainder < currentBestRemainder) {\n\t\t\t\tcurrentBestAttribute = Attribute.FibPerDim;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestAttribute;\n\t}", "@Test\n public void checkIfReturnsPassportWithHighConfidence() {\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 1, 90.00));\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 4, 190.00));\n Triplets<String, Integer, Double> resultTriplet = Triplets.rankRecords(triplets);\n Assert.assertEquals(\"passport\", resultTriplet.getLabel());\n Assert.assertEquals(new Integer(4), resultTriplet.getImageNumber());\n Assert.assertEquals(new Double(190.00), resultTriplet.getMatchConfidence());\n }", "@Test\r\n void testVaryingMajorityNoHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 1, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 0, \"varyingMajority not returning c when no history\");\r\n }", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "boolean hasTotalBet();", "boolean hasTotalBet();", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "public int evaluate() {\n return Condition.INDETERMINATE;\n }", "public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}", "private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}", "public int calcPassedCourseNum(){\n int score = 0;\n \n score += course1.isPassed() ? 1 : 0;\n score += course2.isPassed() ? 1 : 0;\n score += course3.isPassed() ? 1 : 0;\n \n return score;\n }", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "@Test(priority=2)\n\tpublic void validatePredictNiftyInContestPage1()\n\t{\n\t\th.contest.click();\n\t\tc=new ContestPage(driver);\n\t\tAssert.assertTrue(c.historyWinnings.getText().equalsIgnoreCase(\"History & Winnings\"));\n\t\tAssert.assertTrue(c.predictNifty.getAttribute(\"src\").contains(\"active\"));\n\t\tAssert.assertFalse(c.pickTopStock.getAttribute(\"src\").contains(\"active\"));\n\t\t\n\t}", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public int borrow(int pref) {\n\n\t\tswitch (pref) {\n\t\tcase 1:\n\t\t\tif (courseA != 0 && courseA >= courseB && courseA >= courseC && courseA >= courseD && courseA >= courseE\n\t\t\t\t\t&& courseA >= courseF && courseA >= courseG) {\n\t\t\t\tcourseA--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseA == 0) {\n\t\t\t\t\t// System.out.println(\"Course A is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\tcase 2:\n\t\t\tif (courseB != 0 && courseB >= courseA && courseB >= courseC && courseB >= courseD && courseB >= courseE\n\t\t\t\t\t&& courseB >= courseF && courseB >= courseG) {\n\t\t\t\tcourseB--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseB == 0) {\n\t\t\t\t\t// System.out.println(\"Course B is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\tcase 3:\n\t\t\tif (courseC != 0 && courseC >= courseB && courseC >= courseA && courseC >= courseD && courseC >= courseE\n\t\t\t\t\t&& courseC >= courseF && courseC >= courseG) {\n\t\t\t\tcourseC--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseC == 0) {\n\t\t\t\t\t// System.out.println(\"Course C is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\tcase 4:\n\t\t\tif (courseD != 0 && courseD >= courseB && courseD >= courseC && courseD >= courseA && courseD >= courseE\n\t\t\t\t\t&& courseD >= courseF && courseD >= courseG) {\n\t\t\t\tcourseD--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseD == 0) {\n\t\t\t\t\t// System.out.println(\"Course D is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\tcase 5:\n\t\t\tif (courseE != 0 && courseE >= courseA && courseE >= courseB && courseE >= courseC && courseE >= courseD\n\t\t\t\t\t&& courseE >= courseF && courseE >= courseG) {\n\t\t\t\tcourseE--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseE == 0) {\n\t\t\t\t\t// System.out.println(\"CourseE is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\tcase 6:\n\t\t\tif (courseF != 0 && courseF >= courseA && courseF >= courseB && courseF >= courseC && courseF >= courseD\n\t\t\t\t\t&& courseF >= courseE && courseF >= courseG) {\n\t\t\t\tcourseF--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseF == 0) {\n\t\t\t\t\t// System.out.println(\"Course F is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\tcase 7:\n\t\t\tif (courseG != 0 && courseG >= courseB && courseG >= courseA && courseG >= courseD && courseG >= courseC\n\t\t\t\t\t&& courseG >= courseE && courseG >= courseF) {\n\t\t\t\tcourseG--;\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\tif (courseG == 0) {\n\t\t\t\t\t// System.out.println(\"Course G is filled...!\");\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t}\n\t\treturn -1;\n\n\t}", "private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=300;\nboolean aIsMedium = (a>b && a<c) || (a>c && a<b);\nboolean bIsMedium = (b<c && b>a) || (b>c && b<a);\nboolean cIsMedium = (c>a && c<b) || (c>b && c<a);\n\n double medium=0;\n\n if(aIsMedium){\n //System.out.println(a);\n medium= a;\n }\n if (bIsMedium){\n // System.out.println(b);\n medium= b;\n }\n if (cIsMedium){\n //System.out.println(c);\n medium=c;\n }\n System.out.println(medium+ \" is medium number\");\n }", "public void checkQuiz(View view) {\n int score = computeScore();\n ((TextView) findViewById(R.id.scoreTitle)).setText(R.string.score_title);\n ((TextView) findViewById(R.id.score)).setText(score + \"/\" + getQuizCountries().size());\n }", "public Object calculateElectionWinner(ArrayList<String> votes) {\n\t\tint pf =0;\n\t\tint es=0;\n\t\tfor(int i = 0; i<votes.size();i++) {\n\t\t\t\n\t\t\t\n\tif(votes.get(i).toLowerCase().contains(\"pope francis\")) {\n\tpf++;\n\t\n\t}\n\tif(votes.get(i).toLowerCase().contains(\"edward snowden\")) {\n\t\tes++;\n\t\t\n\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\tif(pf>es) {\n\t\t\treturn \"pope francis\";\n\t\t}\n\t\t\n\t\telse if (es>pf) {\n\t\treturn \"edward snowden\";\n\t\t\n\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn \"TIE\";\n\t\t}\n\t\t\n\t}", "int getWrongAnswers();", "public void compare(Application app, String userDecision){\n int intDecision = -1;\n String decision = userDecision.toLowerCase();\n\n if (decision.contains(\"harvard\")){ // decision making will be replaced by BUTTONS in processing\n intDecision = 1;\n }\n if (decision.contains(\"greendale\")){\n intDecision = 0;\n }\n if (decision.contains(\"mit\")){\n intDecision = 2;\n }\n\n //catches bad user input in which they try to submit multiple colleges to cheat the system... nice try.\n if ((decision.contains(\"harvard\") && decision.contains(\"mit\")) ||\n (decision.contains(\"harvard\") && decision.contains(\"greendale\")) ||\n (decision.contains(\"mit\") && decision.contains(\"greendale\")))\n {\n intDecision = -1;\n }\n\n if (intDecision == -1){ // catches bad user input, technically unnecessary but i like dissing people\n System.out.println(\"How can you call yourself an admissions officer when you can't even choose correctly?\");\n errorMade(); // runs failure\n }else if (intDecision == app.getCollege()){\n System.out.println(printAcceptance(intDecision));\n }\n else{\n errorMade();\n }\n }", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "@Test\n public void checkIfPassportAndDefaultCombinationReturnsHighConfidencePassport() {\n triplets.add(new Triplets<String, Integer, Double>(\"dummy\", 1, 90.00));\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 2, 90.00));\n triplets.add(new Triplets<String, Integer, Double>(\"passport\", 3, 190.00));\n Triplets<String, Integer, Double> resultTriplet = Triplets.rankRecords(triplets);\n Assert.assertEquals(\"passport\", resultTriplet.getLabel());\n Assert.assertEquals(new Integer(3), resultTriplet.getImageNumber());\n Assert.assertEquals(new Double(190.00), resultTriplet.getMatchConfidence());\n }", "public boolean isDecided() {\n return decided;\n }", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "@Test\r\n void testVaryingMajorityWithTooMuchHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 5, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 4, \"varyingMajority not returning correctly with too much history\");\r\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "private void printSelectionCountResults(){\n\t\tSystem.out.print(\"\\n\");\n\t\tfor(Character answer: q.getPossibleAnswers()){\n\t\t\tSystem.out.print(answer+\": \"+selections.get(q.getPossibleAnswers().indexOf(answer))+\"\\n\");\n\t\t}\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\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}", "@Override\n public void computeSatisfaction() {\n\n }", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "public void printcuml()\n\t{\n\t\tSystem.out.println(\"Question: \"+ans);\n\t\tSystem.out.println(\"Times Tried: \"+ tried);\n\t\tSystem.out.println(\"Times Correct: \"+ correct);\n\t\tSystem.out.println(\"Percent Correct: \"+ percent*100 +\"%\");\n\t}", "void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }", "public static void main(String[] args) {\n\t\t/* Project 1: Easy with plenty of time */\n\t\tSystem.out.println(\"You should \" + decision(12, 1) + \" Project 1\");\n\t\t/* Project 2: Hard with very little time */\n\t\tSystem.out.println(\"You should \" + decision(1, 9) + \" Project 2\");\n\t\t/* Project 3: Easy but with little time */\n\t\tSystem.out.println(\"You should \" + decision(2, 5) + \" Project 3\");\n\t\t/* Project 4: Hard but with lots of time */\n\t\tSystem.out.println(\"You should \" + decision(12, 8) + \" Project 4\");\n\t}", "@Test\n public void testPercentages(){\n assertTrue(Results.percentages());\n }", "public int countTestCases() {\n return 1;\n }", "private int evaluate(Board board)\n {\n if (computerWin(board))\n return 4*size;\n else if (playerWin(board))\n return -4*size;\n else if (draw(board))\n return 3*size;\n else\n return count(board, COMPUTER);\n }", "public static void countWays() {\n\t\t//ways to climb up 7 stories if 1 to 3 steps can be taken.\n\t\t//int ways = countWaysUtil(7, 3);\n\t\tint ways = countWaysUtilDp(7, 3);\n\t\tSystem.out.println(\"ways \"+ways);\n\t}", "@Test\n\tpublic void testPrimeActionnairePrincipal(){\n\t\tassertEquals(2000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 2));\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 3));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 4));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 5));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 6));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 8));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 10));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 11));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 15));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 20));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 21));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 22));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 30));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 31));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 33));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 40));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 41));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 42));\n\n\t\t// cas categorie hotel = 2\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 2));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 3));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 4));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 5));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 6));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 8));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 10));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 11));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 15));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 20));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 21));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 22));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 30));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 31));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 33));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 40));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 41));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 42));\n\n\t\t// cas categorie hotel = 3\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 2));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 3));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 4));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 5));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 6));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 8));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 10));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 11));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 15));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 20));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 21));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 22));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 30));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 31));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 33));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 40));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 41));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 42));\n\t}", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "int getEvaluations();", "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}", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "private void reviewDeptPolicies() {\n if(metWithHr && metDeptStaff) {\n reviewedDeptPolicies = true;\n } else {\n System.out.println(\"Sorry, you cannot review \"\n + \" department policies until you have first met with HR \"\n + \"and then with department staff.\");\n }\n }", "public int getWorth() { return 1; }", "public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n DecisionTable decisionTable0 = new DecisionTable();\n String string0 = Evaluation.getGlobalInfo(decisionTable0);\n assertEquals(\"\\nSynopsis for weka.classifiers.rules.DecisionTable:\\n\\nClass for building and using a simple decision table majority classifier.\\n\\nFor more information see: \\n\\nRon Kohavi: The Power of Decision Tables. In: 8th European Conference on Machine Learning, 174-189, 1995.\", string0);\n }", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "public static void main(String[] args) {\n\t\tint pizzaCount = 30;\n\t\tint studentCount = 145;\n\t\t\n\t\tboolean isEnoughPizza = pizzaCount*8 >= studentCount*2;\n\t\tSystem.out.println(\"Enough pizza? \" + isEnoughPizza);\n\t\t\n\t\t\n\t\t\n\t}", "Boolean getPartiallyCorrect();", "@Test\n public void TestCase1() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"PTO Request\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(2)\n .contains(\"John M\")\n .contains(\"Kerry\");\n }", "public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }", "public int checkGoals() {\n\t\tupdateUnsupportedPreconditionInconsistencies(maxLevel);\n\t\tcountInconsistencies();\n\t\tgraphQuality = calculateQuality();\n\t\treturn this.inconsistencyCount;\n\t}", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "@Test\r\n void testAlwaysDefect() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n ArrayList<Character> testHistory = new ArrayList<>();\r\n assertEquals(testStrat.getDecision('n', testHistory, testHistory, 'n', 0), 'd', \r\n \"AlwaysDefect strategy not returning correct decision\");\r\n }", "private Double calculateConfidence(final List<Order> orders, final Association association) {\n\t\tdouble leftSupport = 0;\n\n\t\tfor (Order order : orders) {\n\t\t\tif (order.getItems().containsAll(association.getLeft())) {\n\t\t\t\tleftSupport++;\n\t\t\t}\n\t\t}\n\n\t\tif (leftSupport > 0) {\n\t\t\treturn association.getSupport() / (leftSupport / orders.size());\n\t\t}\n\n\t\treturn 0d;\n\t}", "public void printReport(){\n\t\tSystem.out.println(\"This is \" + name + \", UPENN \" + graduationYear);\n\t\tSystem.out.println(\"Their GPA is \" + GPA);\n\t\tString numCoursesString = \"\";\n\t\tif (numCoursesCompleted == 1){\n\t\t\tnumCoursesString=\"course\";\t//if the student has only taken one course, just print course\n\t\t}\n\t\telse{\n\t\t\tnumCoursesString=\"courses\"; //if the student has taken more than one course, print courses when called\n\t\t}\n\t\tSystem.out.println(\"They have taken \" + numCoursesCompleted + \" \" + numCoursesString); \n\t}" ]
[ "0.6286803", "0.6286803", "0.6206605", "0.6008053", "0.59063214", "0.59024096", "0.5874714", "0.5865448", "0.58119184", "0.57409436", "0.5711748", "0.5693791", "0.568455", "0.5651294", "0.56040204", "0.5598572", "0.55502707", "0.5547878", "0.55395895", "0.55351794", "0.55199665", "0.5515536", "0.5475001", "0.5460958", "0.54584724", "0.5458423", "0.5457187", "0.54452455", "0.5437886", "0.5432218", "0.5420799", "0.5412448", "0.54008013", "0.53890055", "0.53882307", "0.5388175", "0.5383923", "0.537927", "0.53699446", "0.53663635", "0.5364582", "0.5359318", "0.5347721", "0.5337508", "0.53186655", "0.53186655", "0.5312592", "0.5311733", "0.52975655", "0.5295329", "0.5290508", "0.5289903", "0.5283636", "0.5281487", "0.528115", "0.52791727", "0.52697325", "0.52681535", "0.5266736", "0.52652097", "0.52606297", "0.5259987", "0.5257308", "0.5253534", "0.52523875", "0.5251861", "0.525186", "0.5247523", "0.5244757", "0.52445847", "0.52402115", "0.5237187", "0.5235042", "0.52348185", "0.52331686", "0.52326804", "0.52278227", "0.522524", "0.52249706", "0.5220993", "0.52138007", "0.52131546", "0.5197754", "0.51946795", "0.5193862", "0.51883423", "0.5181493", "0.51775223", "0.51771796", "0.51751184", "0.5174859", "0.51747674", "0.51727116", "0.51722187", "0.5168205", "0.51662177", "0.516568", "0.51647544", "0.5162838", "0.5160958", "0.5157075" ]
0.0
-1
what % of work items is complete?
public static float getWorkItemsCompletedPercentageAllStagesAllIterations(AccessCertificationCampaignType campaign) { return getWorkItemsCompletedPercentage(campaign.getCase(), null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getWorked();", "public Long getProgressTotalToDo();", "public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}", "public int CompletedCount() {\n \t\treturn jobcomplete.size();\n \t}", "int getUserQuestJobsCount();", "public int how_many_work_item () throws BaseException {\n throw new BaseException(\"Not implemented\");\n }", "public int getAmountDone();", "public Integer getWorkSize(){\r\n\t\treturn work.size();\t\t\r\n\t}", "long getExcutorTasksInWorkQueueCount();", "public int howManyAvailable(Item i){/*NOT IMPLEMENTED*/return 0;}", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "int getCompletedTutorialsCount();", "private boolean allWorkComplete(int attempt) {\n boolean workComplete = (sm == null || syncManager.getFilesInTransfer().isEmpty()) &&\n list.getListSizeIncludingReservedFiles() <= 0;\n\n if (!workComplete || (workComplete && attempt > 2)) {\n return workComplete;\n } else {\n // Wait before another attempt\n SyncProcessManagerImpl.this.sleep(2000);\n return allWorkComplete(attempt + 1);\n }\n }", "public long getRemainingEstimate() {\n return addedFrontWork.size() + addedBackWork.size();\n }", "long countJobs();", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "public Integer getInterestedInItemsCount();", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "int getTotalFree();", "int numberOfWorkingWorkers();", "int getNewlyAvailableQuestsCount();", "public void summarize() {\n if (!waitlist.isEmpty()) {\n waitlist.clear();\n }\n workingReached.clear();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsProcessed() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSPROCESSED_PROP.get());\n }", "public int sizeOfCompletedList()\n\t {\n\t \tList <WebElement> items= CompletedList;\n\t \t\n\t \treturn items.size();\n\t }", "public double getPercentCompleted() {\n\t\treturn -1;\n\t}", "long getConsumedWorkUnits();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsProcessed() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSPROCESSED_PROP.get());\n }", "public int percentSaveDone() {\n if (isSaveDone()) {\n return 100;\n }\n return percent;\n }", "public String numTasks() {\n return \"Now you have \" + USER_TASKS.size() + \" tasks in the list.\";\n }", "public int getWorkRequired() {\n return time;\n }", "private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }", "boolean hasWork();", "@Override\n\tpublic int calculateEffort() {\n\t\treturn 0;\n\t}", "long getMaxItemFindings();", "long countWorkflows();", "void progress(int pUnitsCompleted);", "boolean hasFinalTallyResult();", "int getTaskDetailsCount();", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "public int getExpectedNumber() {\n return getWholeProcessCount();\n }", "public int getAvailableCount();", "public Long getProgressDone();", "public int getCount() {\n\t return taskList.size();\n\t }", "public boolean is_completed();", "public int totalOrdersTaken();", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "int getQuestCount();", "public long getRemainingWork(FieldContext fieldContext) {\n\t\treturn 0;\n\t}", "public int getThroughPut() {\n\t\treturn completed;\n\t}", "public final int size() {\r\n\t\tint SIZE = workoutList.size();\r\n\r\n\t\treturn SIZE;\r\n\t}", "@Test\n public void testGetPercentComplete() {\n TaskSeriesCollection c = createCollection2();\n TaskSeriesCollection c3 = createCollection3();\n assertEquals(new Double(0.111), c3.getPercentComplete(0, 0, 0));\n }", "Long getRunningCount();", "long getNumberOfComparisons();", "public int sizeOfList(){\n return tasks.size();\n }", "Integer getTotalStepCount();", "public boolean isComplete() {\n return addedFrontWork.size() == 0 && addedBackWork.size() == 0 && sawAllDone.get();\n }", "public static long calculateSummary(List<BackflowEntry> entries) {\n Long res = 0L;\n for(BackflowEntry entry : entries) {\n res += entry.getCount();\n }\n return res; \n }", "long getExecutorCompletedTaskCount();", "double getRepairEffort();", "DurationTracker timeSpentTaskWait();", "public int countList() {\n return tasks.size();\n }", "public int getTotalWait() {\n return totalWait;\n }", "int getTotalCount();", "final int getEstimatedSurplusTaskCount() {\n // The halving approximates weighting idle vs non-idle threads\n return (sp - base) - (pool.getIdleThreadCount() >>> 1);\n }", "public int size()\n {\n return tasks.size();\n }", "public int completed() {\n return this.completed;\n }", "public int getProgress() {\n\t\treturn activeQuest.getThreshold() - getRemaining();\n\t}", "int getNumItems();", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "float getTasksLeft();", "private int jobLength(){\n LocalDate completedLocalDate = LocalDate.of(this.dateCompleted.getYear(), \n this.dateCompleted.getMonth(), this.dateCompleted.getDay());\n \n LocalDate startedLocalDate = LocalDate.of(this.dateStarted.getYear(), \n this.dateStarted.getMonth(), this.dateStarted.getDay());\n \n return startedLocalDate.until(completedLocalDate).getDays();\n }", "@Override\n public int getItemCount() { return completedWorkouts.size(); }", "public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}", "public Double percentComplete() {\n return this.percentComplete;\n }", "boolean hasIsComplete();", "boolean hasIsComplete();", "@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }", "long getWorkfileSize();", "public Number getPercentageComplete()\r\n {\r\n return (m_percentageComplete);\r\n }", "public void markComplete()\n {\n setCount(getGoal());\n }", "int getDeliveredCount();", "public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}", "public abstract long getCompleteListSize();", "public int getProgress() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return -1;\n \n int num = (int)((System.currentTimeMillis()-startTime)*100/d);\n if(num>=100) num=99;\n return num;\n }", "private int getLatestRuns() {\n // return 90 for simplicity\n return 90;\n }", "public int resultsProcessed() {\n return resultCount;\n }", "public int getOverallCompletionAmount() {\n\t\treturn Times;\n\t}", "int getTaskIdCount();", "public int numdone(String s) {\n Integer i = 0;\n\n for (Entry entry : listentries) {\n if (entry.getStatus().equals(s)) {\n ArrayList<Entry> checkoff = new ArrayList<>();\n checkoff.add(entry);\n return (checkoff.size());\n }\n }\n return i;\n }", "public boolean isComplete()\n {\n return (getCount() >= getGoal());\n }", "public final double getPercentageComplete() {\n \t\tdouble percentageComplete = 0;\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.getPercentageCompleted() > percentageComplete) {\n \t\t\t\tpercentageComplete = condition.getPercentageCompleted();\n \t\t\t}\n \t\t}\n \t\treturn percentageComplete;\n \t}", "public int countResults() \n {\n return itsResults_size;\n }", "public long getCompleted() { return completed; }", "public int getNumberOfCompletedFiles() {\n return numberOfCompletedFiles;\n }", "protected abstract int getTaskLength();", "public int getCheckCount() {\r\n return checkResults.size();\r\n }" ]
[ "0.67950624", "0.6675585", "0.6577201", "0.65395606", "0.65068614", "0.65048796", "0.6450609", "0.6438068", "0.64202744", "0.633955", "0.6307289", "0.63047457", "0.62966317", "0.6293241", "0.62717277", "0.61920905", "0.61920905", "0.61920905", "0.61750036", "0.61236334", "0.61236334", "0.61236334", "0.60992074", "0.6094063", "0.6090243", "0.6063715", "0.60495764", "0.6045545", "0.60368514", "0.60319257", "0.6017195", "0.59863454", "0.5977757", "0.5959285", "0.5934048", "0.5930125", "0.59210634", "0.5918976", "0.59086925", "0.5860041", "0.585926", "0.5854582", "0.58501446", "0.58390176", "0.5837209", "0.5834532", "0.58300686", "0.58189696", "0.5815317", "0.5812719", "0.5791677", "0.57864285", "0.5778286", "0.5771883", "0.5761827", "0.57588327", "0.57545507", "0.5752397", "0.57505405", "0.5737989", "0.57343847", "0.5722835", "0.5721036", "0.5718092", "0.5713129", "0.5708841", "0.57077426", "0.5707093", "0.5687203", "0.56850135", "0.56838244", "0.5681496", "0.56771207", "0.56757087", "0.5673973", "0.5667792", "0.5667426", "0.5666999", "0.56577563", "0.56505096", "0.56505096", "0.5642605", "0.5637714", "0.5635319", "0.56277984", "0.5624702", "0.56224746", "0.56134254", "0.560714", "0.55999875", "0.5599715", "0.55958146", "0.55950123", "0.559229", "0.55853635", "0.55852985", "0.5584359", "0.5582995", "0.55765116", "0.5575086", "0.5568274" ]
0.0
-1
TODO use this also from GUI and maybe notifications
@SuppressWarnings("unused") // used by certification cases report public static List<ObjectReferenceType> getCurrentlyAssignedReviewers(PrismContainerValue<AccessCertificationCaseType> pcv) { AccessCertificationCaseType aCase = pcv.asContainerable(); List<ObjectReferenceType> rv = new ArrayList<>(); for (AccessCertificationWorkItemType workItem : aCase.getWorkItem()) { for (ObjectReferenceType assigneeRef : workItem.getAssigneeRef()) { if (workItem.getCloseTimestamp() == null && java.util.Objects.equals(workItem.getStageNumber(), aCase.getStageNumber())) { rv.add(assigneeRef); } } } return rv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "private void updateGUIStatus() {\r\n\r\n }", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void update() {\n \n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\r\n public void updateUI() {\r\n }", "protected void onFirstUse() {}", "@Override\n public void update() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void update() {\n\t\t\tSystem.out.println(\"새로운 수정\");\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void willbeUpdated() {\n\t\t\n\t}", "long lastAutomaticRefresh();", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "protected void onBegin() {}", "@Override\n public void update()\n {\n\n }", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "protected void onUpdate() {\r\n\r\n\t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void update() {\n\n }", "@Override\n\tpublic void onUpdate() {\n\t\t\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\n\tpublic void update() { }", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "@Override\n public void update() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\t\t\t\t\t\tpublic void onInvateComplet() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\n protected void getExras() {\n }", "private ManualMessage() {\n initFields();\n }", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\tpublic void getStatus() {\n\t\t\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 public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void onDirectMessage(DirectMessage directMessage) {\n\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "public void getCommandsUpdate() {\n\t\t\r\n\t}", "@Override\n\tpublic void guiTinNhan() {\n\n\t}", "@Override\n\t protected void onPreExecute() {\n\t }", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t}", "@Override\r\n\tpublic void windowstartUpData() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}" ]
[ "0.590752", "0.57377595", "0.5728903", "0.5666399", "0.56315255", "0.562821", "0.562821", "0.5599892", "0.5586874", "0.5569489", "0.5563584", "0.5540726", "0.5540726", "0.5513193", "0.5513193", "0.5508343", "0.5508343", "0.548215", "0.5468141", "0.54323375", "0.54236406", "0.541525", "0.541525", "0.541525", "0.541525", "0.541525", "0.5414882", "0.5414596", "0.5414596", "0.5414596", "0.54067487", "0.5380008", "0.5364638", "0.5363442", "0.5359875", "0.53511083", "0.53498775", "0.53481835", "0.5347743", "0.53414327", "0.5336336", "0.5333597", "0.53299326", "0.5325836", "0.53069186", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5296568", "0.5295009", "0.52942544", "0.5277966", "0.52779603", "0.52779603", "0.5276591", "0.5273952", "0.5270694", "0.5268164", "0.5262207", "0.52595127", "0.52593535", "0.5259281", "0.5251906", "0.5250525", "0.5246175", "0.5246175", "0.52373767", "0.52373767", "0.52304786", "0.52271277", "0.52180254", "0.5217325", "0.5217325", "0.5217325", "0.5217325", "0.5217325", "0.5217325", "0.5211702", "0.5211702", "0.52111554", "0.52097034", "0.52097034", "0.52060324", "0.52060324", "0.5205753", "0.5203064", "0.5203064", "0.51996845", "0.5197442", "0.5196802", "0.51950026", "0.51932156", "0.5192088", "0.51808864", "0.51806" ]
0.0
-1
useful e.g. for tests
public static Set<ObjectReferenceType> getCurrentReviewers(AccessCertificationCaseType aCase) { return aCase.getWorkItem().stream() // TODO check also with campaign stage? .filter(wi -> wi.getStageNumber() == aCase.getStageNumber()) .flatMap(wi -> wi.getAssigneeRef().stream()) .collect(Collectors.toSet()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private test5() {\r\n\t\r\n\t}", "public void testGetInsDyn() {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\n public void test() {\n \n }", "public void test5() {\n\t\t\n\t}", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "public void testGetBasedata() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\n void completeItemsAsString() {\n\n }", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Test\n\tpublic void testDoGeneration() {\n\t}", "public void testCheckOxyEmpty() {\n }", "@Test\n public void matchCorrect() {\n }", "private void testProXml(){\n\t}", "@Override\n public void runTest() {\n }", "@Test\n void completeItemsAsString() {\n }", "private void kk12() {\n\n\t}", "@Test\n void listAsString() {\n }", "@Test\n void listAsString() {\n }", "@Test\n\tpublic void test04() throws Throwable {\n\t}", "private stendhal() {\n\t}", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "@Test\n public void iterator() {\n }", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "@Test\n\tvoid test() {\n\t\t\n\t}", "@Test\r\n\tpublic void test() {\r\n\t}", "public void test() {\n\t}", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "public void smell() {\n\t\t\n\t}", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "@Test\n public void testAddACopy() {\n }", "public void testLoadOrder() throws Exception {\n }", "@Test\r\n\tpublic void testGetFirst() {\n\t}", "@Test\n\tpublic void findTypeList() {\n\t}", "@Test\n void getArgString() {\n }", "@Test\n\tpublic void test4() {\n\t}", "@Test\n\tvoid searchTest() {\n\t}", "public void testaReclamacao() {\n\t}", "private void strin() {\n\n\t}", "@Test\n public void testDAM30903001() {\n testDAM30802001();\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n public void testingTheSixFlatbed2017Order() {\n }", "@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }", "@Test\n\tpublic void testInterpolationSearch() {\n\t}", "public void method_4270() {}", "public void testSetBasedata() {\n }", "@Test\n\tpublic void testFtoC(){\n\t}", "@Test\n public void test_getSub_1() throws Exception {\n }", "@Test\n public void testQueryList(){\n }", "@Test\n\tpublic void testQuery1() {\n\t}", "private void poetries() {\n\n\t}", "@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }", "@Override\n public void testGetAllObjects() {\n }", "public void testGetOrder() {\n }", "@Test\n\tpublic void test() {\n\t}", "@Test\n\tpublic void test() {\n\t}", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test\n public void dspNamesTest() {\n // TODO: test dspNames\n }", "@Test\n public void testProgramElementsType() {\n // TODO: test ProgramElementsType\n }", "@Test\n\tpublic abstract void testTransform4();", "@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}", "public void testAddEntry(){\n }", "@Test\n public void getIndex(){\n\n }", "@Test\n public void testFindByProperties(){\n\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Test\r\n public void testFindAll() throws Exception {\r\n }", "public void testBidu(){\n\t}", "abstract int pregnancy();", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testCreateRequestListSomeFilteredBySourceSystem(){\n }", "public void testPerformance() {\n \t}", "@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}", "@Before\n\t public void setUp() {\n\t }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void assertAll() {\n\t\t\n\t}", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public void testFindByCatalogo() {\n }", "@Test\n public void testGenerarIdentificacion() {\n }", "@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}", "@Test\r\n public void testSetName() {\r\n\r\n }", "@Test\n\tpublic void getTest() {\n\t}", "@Test\n public void delims() {\n }", "@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }", "@Test\n\tpublic void testSet() {\n\t}", "@Test\n\tpublic void testCtoF(){\n\t}", "@Test\r\n\tpublic void testOrderPerform() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Test\n public void testGetOwner() {\n \n }", "public void testGetStartValue() {\n TaskSeriesCollection c = createCollection1();\n TaskSeriesCollection c3 = createCollection3();\n }", "static void testCaculator(){\n }", "@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }", "@Override\n\tpublic void testEngine() {\n\t\t\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }" ]
[ "0.6501541", "0.6493234", "0.6149228", "0.6022485", "0.59186536", "0.58749086", "0.5838099", "0.5835343", "0.5788165", "0.57449764", "0.5723596", "0.5697414", "0.5679743", "0.56689125", "0.5652478", "0.5652349", "0.56472117", "0.56382775", "0.5630829", "0.56286085", "0.561934", "0.5617127", "0.56065154", "0.56065154", "0.55991185", "0.5588326", "0.5584954", "0.55830884", "0.55799", "0.5566866", "0.55594695", "0.5549024", "0.55426437", "0.5542309", "0.5541398", "0.55350465", "0.55290145", "0.55222577", "0.5521685", "0.55212605", "0.55157304", "0.55137694", "0.55053574", "0.549409", "0.54927576", "0.54882526", "0.54854554", "0.548382", "0.54780495", "0.5476085", "0.54731876", "0.54591596", "0.54582757", "0.54581285", "0.5454583", "0.545095", "0.54454213", "0.5440331", "0.5437487", "0.5432481", "0.5432481", "0.542988", "0.5429243", "0.5427001", "0.5426767", "0.54252166", "0.5423941", "0.54163784", "0.5415376", "0.54132015", "0.54108083", "0.54086614", "0.5402606", "0.5398147", "0.5398147", "0.5395086", "0.53938776", "0.5393585", "0.538802", "0.5386499", "0.5386025", "0.5386016", "0.53842825", "0.53829294", "0.53792167", "0.5377514", "0.5377187", "0.5375297", "0.53736895", "0.53687", "0.5366362", "0.5363483", "0.53634673", "0.5359918", "0.5357028", "0.53562707", "0.5352949", "0.53500444", "0.53432757", "0.5340267", "0.533686" ]
0.0
-1
returns reviewers for nonclosed work items
public static Collection<String> getActiveReviewers(List<AccessCertificationCaseType> caseList) { Set<String> oids = new HashSet<>(); for (AccessCertificationCaseType aCase : caseList) { for (AccessCertificationWorkItemType workItem : aCase.getWorkItem()) { if (workItem.getCloseTimestamp() == null) { for (ObjectReferenceType reviewerRef : workItem.getAssigneeRef()) { oids.add(reviewerRef.getOid()); } } } } return oids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Article> getNotReviewed() {\n\t\treturn articleRepository.findArticleForReviewByProfessions();\n\t}", "public List<Review> getReviews() {\r\n\t\tList<Review> returnReviews = new ArrayList<Review>();\r\n\t\tfor(int i = 0; i < myManuscripts.size(); i++){\r\n\t\t\tif(myManuscripts.get(i).getStatus() != STATUS_DECISION_HAS_NOT_BEEN_MADE) {\r\n\t\t\t\treturnReviews.addAll(myManuscripts.get(i).getReviews());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn returnReviews;\r\n\t}", "@SuppressWarnings(\"unused\") // used by certification cases report\n public static List<ObjectReferenceType> getCurrentlyAssignedReviewers(PrismContainerValue<AccessCertificationCaseType> pcv) {\n AccessCertificationCaseType aCase = pcv.asContainerable();\n List<ObjectReferenceType> rv = new ArrayList<>();\n for (AccessCertificationWorkItemType workItem : aCase.getWorkItem()) {\n for (ObjectReferenceType assigneeRef : workItem.getAssigneeRef()) {\n if (workItem.getCloseTimestamp() == null\n && java.util.Objects.equals(workItem.getStageNumber(), aCase.getStageNumber())) {\n rv.add(assigneeRef);\n }\n }\n }\n return rv;\n }", "@Query(value = \"SELECT * FROM (reviewer AS r JOIN user AS u ON user_ID=reviewer_ID) WHERE r.reviewer_ID IN (SELECT rp.reviewer_ID FROM review_paper AS rp WHERE rp.paper_ID=?1 AND accept=0 AND reject=0)\",\n nativeQuery = true)\n List<Reviewer> findApprovedReviewersUnDecided(int paper_id);", "@Override\r\n public List<CreditRequest> getReviewedRequests() {\n List<CreditRequest> result = new ArrayList<CreditRequest>();\r\n for (CreditOperation operation : operations) {\r\n if (operation.getStatus() == CreditOperationStatus.REVIEW_SUCCEDED) {\r\n CreditRequest request = findRequestById(operation.getCreditRequestId());\r\n if (request != null) {\r\n result.add(request);\r\n } else {\r\n System.out.println(\"request not found for id: \" + operation.getCreditRequestId());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public ArrayList<String> returnUrgentItems() {\n ArrayList<String> urgentItemNames = new ArrayList<>();\n\n if (toDoList.getItems().isEmpty()) {\n urgentItemNames.add(\"No More Tasks! Yay!!\");\n }\n\n int i = 1;\n for (Item item : toDoList.getItems()) {\n if (Integer.parseInt(item.getDaysBeforeDue()) <= 1) {\n Categories c = item.getCategory();\n urgentItemNames.add(i + \". \" + item.getTitle() + \" due in \" + item.getDaysBeforeDue() + \" days, \" + c);\n i++;\n }\n }\n\n return urgentItemNames;\n }", "public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);", "protected ArrayList getMatchingWorkItems() {\n return matchingWorkItems;\n }", "ImmutableList<SchemaOrgType> getReviewsList();", "public java.lang.String[] getReview() {\n return review;\n }", "@Override\r\n\tpublic int reviewCount() throws Exception {\n\t\treturn 0;\r\n\t}", "ArrayList<Review> getMoreReviews()\n {\n ArrayList<Review> reviews = new ArrayList<>();\n\n if (hasInfo && curReviewURL != null && !curReviewURL.equals(\"\"))\n {\n try\n {\n Document reviewResultPage = Jsoup.connect(curReviewURL)\n .userAgent(\"Mozilla/5.0\").ignoreHttpErrors(true)\n .ignoreContentType(true).get();\n\n // Handles the rare case where the API gives an error.\n if (reviewResultPage.getElementsByTag(\"title\").text().equals(\"Error\"))\n {\n return reviews;\n }\n\n Elements unparsedReviews = reviewResultPage.getElementsByTag(\"review\");\n\n for (Element unparsedReview : unparsedReviews)\n {\n String reviewTitle = unparsedReview.getElementsByTag(\"title\").text();\n String reviewText = unparsedReview.getElementsByTag(\"reviewText\").text();\n StarRating starRating = StarRating.valueOf(Integer.parseInt(unparsedReview\n .getElementsByTag(\"rating\")\n .text()));\n Integer numHelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"upVotes\").text());\n Integer numUnhelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"downVotes\").text());\n\n // Each parsed review datum is added to a new review and added to the product's\n // reviews, the date is always null since Walmart reviews do not have dates.\n reviews.add(new Review(reviewTitle, reviewText, starRating, null\n , numHelpful, numUnhelpful, Retailer.WALMART));\n }\n\n curReviewPageNum++;\n\n // Set the current review URL to the next page.\n WalmartRequestHelper walmartRequestHelper = new WalmartRequestHelper(itemID, curReviewPageNum);\n curReviewURL = walmartRequestHelper.getRequestURL();\n }\n catch (IOException ioe)\n {\n ioe.printStackTrace();\n }\n }\n\n return reviews;\n }", "public Set<Review> getReviews() {\n return reviews;\n }", "private void getApprovalPendingNotices() {\n noOfRows = appParametersDAO.getIntParameter(MR_APPROVAL_ROWS_PER_PAGE);\n filterAndLoadMarriageNotices();\n }", "ImmutableList<SchemaOrgType> getReviewList();", "public ArrayList<String> getReviews() {\n return reviews;\n }", "@Override\n public int getItemCount() {\n return null == reviewDataList ? 0 : reviewDataList.size();\n }", "public int getRenovated() {\n return renovated;\n }", "private List<Review> getUserReviews(String user_ID) {\n\t\tList<Review> Reviews = new ArrayList<Review>();\n\t\tfor (Review review : reviews) {\n\t\t\tif (user_ID.equals(review.getUserID())) {\n\t\t\t\tReviews.add(review);\n\t\t\t}\n\t\t}\n\n\t\treturn Reviews;\n\t}", "public Collection<? extends Notation> getNotations ()\r\n {\r\n return notations;\r\n }", "List<Receipt> getNotApproved() throws DbException;", "public JiraIssueBag<T> getIssuesPerReporter(User reporter) {\r\n Set<ExtendedIssue> thisReporterIssues = (Set<ExtendedIssue>) (issuesPerReporter\r\n .get(reporter.getName()));\r\n return new JiraIssueBag<T>(this.identifier, new ArrayList<>(thisReporterIssues));\r\n }", "public String getMyReviewed() {\n return myReviewed;\n }", "private Map<Profile, String> review(){\n\t\treturn allReviews;\n\t}", "public Enumeration getNotations() {\r\n return notations.elements();\r\n }", "@Transactional( readOnly = true )\n public List<RatingItem> rating(){\n final List<RatingItem>\n ratingWithCompletedGames =\n gamesRepository.rating().parallel().map( this::castRating ).collect( Collectors.toList() );\n final List<String>\n playersWithoutCompletedGames =\n playersRepository.findAll()\n .parallelStream()\n .map( Player::getLogin )\n .collect( Collectors.collectingAndThen( Collectors.toList() , LinkedList::new ) );\n playersWithoutCompletedGames.removeAll( ratingWithCompletedGames.parallelStream()\n .map( RatingItem::getLogin )\n .collect( Collectors.toList() ) );\n return Stream.concat( ratingWithCompletedGames.stream() ,\n playersWithoutCompletedGames.stream().map( this::loginToItem ) )\n .collect( Collectors.toList() );\n }", "public String getReview(){\n\t\treturn this.review;\n\t}", "@Override\n public int getItemCount() {\n if (null == reviewList) return 0;\n return reviewList.size();\n }", "public ArrayList<Review> getReviews() {\n\t\treturn reviews;\n\t}", "private List<Business> getBusinessReviews(String user_ID) throws IllegalArgumentException {\n\t\tList<Business> business = new ArrayList<Business>();\n\n\t\tfor (Review review : reviews) {\n\t\t\tString userID = review.getUserID();\n\t\t\t\n\t\t\tif (userID.equals(user_ID)) {\n\t\t\t\tString BusinessID = review.getBusinessID();\n\t\t\t\t\n\t\t\t\tfor (Business biz : this.businesses) {\n\t\t\t\t\tif (BusinessID.equals(biz.getBusinessID())) {\n\t\t\t\t\t\tbusiness.add(biz);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn business;\n\t}", "public ArrayList<Review> getReviewsList() {\n return reviews;\n }", "public static LinkedList<Recensione> getRecensioniNonApprovate() throws SQLException {\n\t\t\tString query = \"SELECT * \"\n\t\t\t\t\t+ \"FROM recensione \"\n\t\t\t\t\t+ \"WHERE approvata = 0 ;\";\n\t\t\t\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\tLinkedList<Recensione> mList = new LinkedList<Recensione>();\n\t\t\t// Stampiamone i risultati riga per riga\n\t\t\twhile (res.next()) {\n\t\t\t\t// (id, testo, approvata).\n\t\t\t\tRecensione r = new Recensione(res.getInt(\"id\"), res.getString(\"testo\"), res.getBoolean(\"approvata\"));\n\t\t\t\tmList.add(r);\n\t\t\t}\n\t\t\tcloseConnectionToDB(con);\n\t\t\treturn mList;\n\t\t}", "public List<ReviewType> getReview() {\n\t return this.review;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsSkipped() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSSKIPPED_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsSkipped() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSSKIPPED_PROP.get());\n }", "public boolean getReviewed() {\n\t\treturn this.reviewed;\n\t}", "private static List<GeneralIssue> parseAllIssues(String youtrackIssues, String iRecordIssues, String croogleIssues) {\n return List.of();\n }", "public List<Artist> getArtistsWhichHaveNoReleases();", "private List<MutableTrooper> teammatesWithoutSelf() {\n ArrayList<MutableTrooper> r = new ArrayList<>();\r\n for (Trooper ally : teammates) {\r\n if (ally.getId() != self.getId()) {\r\n r.add(new MutableTrooper(ally, -1));\r\n }\r\n }\r\n return r;\r\n }", "public List getDonts() {\n\t\tif (donts == null) {\n\t\t\tdonts = getFormattedPractices(\"/metadataFieldInfo/field/bestPractices/donts\");\n\t\t}\n\t\treturn donts;\n\t}", "public Collection<Trip> findTripsWhitStatusAcceptedNotStarted() {\n\t\tCollection<Trip> trips;\n\t\ttrips = new ArrayList<Trip>(this.tripRepository.findTripsWhitStatusAcceptedNotStarted());\n\t\tAssert.notNull(trips);\n\t\treturn trips;\n\t}", "public List<Review> getAllReview() \n\t{\n\t\tList<Review> reviews = new ArrayList<Review>();\n\t\treviewRepository.findAll().forEach(review -> reviews.add(review));\n\t\treturn reviews;\n\t}", "@Override\n public List<Publication> getAllReviewed(String filter, int start, int length, String orderBy, String sortOrder) {\n Integer defaultReturnValue = (length == 0) ? 10 : length;\n\n PageRequest pageRequest = getPageRequest(start, defaultReturnValue, orderBy, sortOrder);\n if(filter == null || filter.isEmpty()) {\n return referenceRepository.findAllByStatusIs(pageRequest, \"reviewed\").getContent();\n } else {\n filter = \".*\" + filter + \".*\";\n return referenceRepository.findReviewedContains(filter, pageRequest).getContent();\n }\n }", "public List<AnnotatedLinkWrapper> getItemsUnfiltered() {\n return getDelegate().getExtendedItems().stream()\n .map(AnnotatedLinkWrapper::new)\n .filter(al -> al.getTarget() != null)\n .filter(al -> al.getTarget().isInProduction())\n .collect(Collectors.toList());\n }", "public double getReview() {\r\n return review;\r\n }", "public Urls getNotApprovedUrls() {\n\t\tPropertySelector propertySelector = new PropertySelector(\"approved\");\n\t\tpropertySelector.defineEqual(Boolean.FALSE);\n\t\treturn getUrls(propertySelector);\n\t}", "public final List<String> findMissing(Player player, Collection<ItemStack> items)\n\t{\n\t\tList<String> list = new LinkedList<String>();\n\t\tif (items == null || items.size() == 0)\n\t\t\treturn list;\n\n\t\tList<ItemStack> missingItems = InventoryHelper.findMissing(player, items);\n\t\tif (missingItems.size() > 0)\n\t\t{\n\t\t\tfor (ItemStack item : missingItems)\n\t\t\t{\n\t\t\t\tString name = InventoryHelper.getItemName(item);\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = StringHelper.toTitleCase(item.getType().toString().replaceAll(\"_\", \" \"));\n\t\t\t\tlist.add(item.getAmount() + \" * \" + name);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@Query(value = \"SELECT * FROM (reviewer AS r JOIN user AS u ON user_ID=reviewer_ID) WHERE r.reviewer_ID IN (SELECT rp.reviewer_ID FROM review_paper AS rp WHERE rp.paper_ID=?1 AND reject=1)\",\n nativeQuery = true)\n List<Reviewer> findApprovedReviewersRejectPaper(int paper_id);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReviewedBy();", "public String toString() {\n return review;\n }", "Set<String> getAllModeratorUserIDs(PropBagEx itemxml, WorkflowItem workflow);", "public ArrayList<OverdueNotice> createOverdueNotices(){\n ArrayList<OverdueNotice> overdueList = new ArrayList<OverdueNotice>();\n Set<String> patronNames = this.patron.keySet();\n for (String patronName : patronNames){\n ArrayList<Book> books = this.patron.get(patronName).getBooks();\n for (Book book : books){\n if (book.getDueDate() == (this.calendar.getDate()-1)){\n overdueList.add(new OverdueNotice(this.patron.get(patronName),this.calendar.getDate()));\n break;\n }\n }\n }\n return overdueList;\n }", "@Override\r\n\tpublic List<ReviewVO> reviewListAll() {\n\t\treturn sqlSession.selectList(namespace + \".reviewListAll\");\r\n\t}", "@Override\n\tprotected void checkDiscussionItem(final Review review, final DBSession session) {\n\t\tfinal double rating = review.getRating();\n\t\t\n\t\tif (Double.compare(rating, Review.MIN_REVIEW_RATING) < 0 || Double.compare(rating, Review.MAX_REVIEW_RATING) > 0) {\n\t\t\tthrow new ValidationException(\"Review rating not in range\"); // TODO: error message?!\n\t\t}\n\t\t\n\t\tfinal double decimal = Math.abs(rating - Math.rint(rating));\n\t\t\n\t\tif (Double.compare(decimal, 0) != 0 && Double.compare(decimal - 0.5, 0) != 0) {\n\t\t\tthrow new ValidationException(\"Only ?.0 and ?.5 ratings are supported\"); // TODO: error message?\n\t\t}\n\t\t\n\t\tif (present(review.getText()) && review.getText().length() > Review.MAX_TEXT_LENGTH) {\n\t\t\tthrow new ValidationException(\"review text too long\");\n\t\t}\n\t}", "public java.lang.Integer getDaysNonWorking() {\n return daysNonWorking;\n }", "public Integer getOverdueDays() {\n return overdueDays;\n }", "public List<Issue> getUserIssues(User user);", "public List<Issue> getUserActiveIssues(User user);", "public String getAffiliatedResearchers() {\r\n return this.affiliatedResearchers;\r\n }", "@Override\n\tpublic RatingDTO getRatings(Restaurant restaurant) {\n\t\tRatingDTO retVal = new RatingDTO();\n\t\ttry{\n\t\t\tdouble restMark = markRepository.sumForRestaurant(restaurant);\n\t\t\tretVal.setRating(restMark);\n\t\t}catch(Exception e){\n\t\t\tretVal.setRating(0);\n\t\t}\n\t\tCollection<Waiter> waiters = employeeRepository.findWaiters(restaurant);\n\t\tfor(Waiter w : waiters){\n\t\t\ttry{\n\n\t\t\t\tdouble rating = markRepository.sumForWaiter(w);\n\t\t\t\tretVal.getWaiters().put(w.getName() + \" \" + w.getLastname(), rating);\n\t\t\t}catch(Exception e){\n\t\t\t\tretVal.getWaiters().put(w.getName()+\" \"+w.getLastname(), 0.0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollection<Meal> meals = restaurant.getMenu();\n\t\tCollection<Mark> totalMark = markRepository.findByRestaurant(restaurant);\n\t\tfor(Meal m : meals){\n\t\t\tdouble total = 0.0;\n\t\t\tint divide = 0;\n\t\t\tfor(Mark mark : totalMark){\n\t\t\t\tfor(ItemMeal im : mark.getVisit().getBill().getOrder().getMeals()){\n\t\t\t\t\tif(im.getMeal().equals(m)){\n\t\t\t\t\t\ttotal += mark.getMarkMeals();\n\t\t\t\t\t\tdivide += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tdouble end = 0.0;\n\t\t\tif(divide != 0){\n\t\t\t\tend = total/divide;\n\t\t\t}\n\t\t\tretVal.getMeals().put(m.getName(), end);\n\t\t}\n\t\treturn retVal;\n\t}", "@RequestMapping(value=\"reviews\", method=RequestMethod.GET,\n\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<List<ReviewBean>> getReviews(){\n\t\t\t//Call on session to get current user's reviews\n\t\t\t//For now it just grabs hardcoded user's reviews\n\t\t\treturn new ResponseEntity<List<ReviewBean>>(this.dao.getAllReviewsByUserId(72), HttpStatus.OK);\n\t\t}", "@GetMapping(\"/items\")\n public List<Items> getAllItems(@RequestParam(required = false) String filter) {\n if (\"reviewreveals-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Itemss where reviewReveals is null\");\n return StreamSupport\n .stream(itemsRepository.findAll().spliterator(), false)\n .filter(items -> items.getReviewReveals() == null)\n .collect(Collectors.toList());\n }\n log.debug(\"REST request to get all Items\");\n return itemsRepository.findAll();\n }", "@GetMapping(\"task/{taskId}/allReviewers\")\n\tpublic ResponseEntity<Collection<ReviewerDTO>> getAllReviewers(@PathVariable String taskId) {\n\t\tTaskDto task = rspe.findTask(taskId);\n\t\tString magazine = (String) rspe.getVariable(task.getProcessInstanceId(), \"magazine\");\n\t\tString paper = (String) rspe.getVariable(task.getProcessInstanceId(), \"filename\");\n\n\t\tCollection<ReviewerDTO> reviewers = appTaskService.getAllReviewers(magazine);\n\t\tCollection<ReviewerDTO> reviewersData = new ArrayList<ReviewerDTO>();\n\n\t\tCollection<Review> reviews = reviewService.getByPaper(paper);\n\t\tfor(ReviewerDTO rew : reviewers) {\n\t\t\tboolean flag = false;\n\t\t\tfor(Review review : reviews) {\n\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666 \"+rew.getUsername()+\" \"+review.getReviewer());\n\t\t\t\tif(rew.getUsername().equals(review.getReviewer())) {\n\t\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666\");\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!flag && !reviewersData.contains(rew)) {\n\t\t\t\t\n\t\t\t\treviewersData.add(rew);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"ispisujem task id: \" + task.getId());\n\t\treturn ResponseEntity.ok(reviewersData);\n\t}", "@ApiModelProperty(value = \"The id of the service user that reviewed the submission.\")\n\n\n public String getReviewedBy() {\n return reviewedBy;\n }", "public static BookFilter getNonBibles()\n {\n if (commentariesWithBibles)\n {\n return both(new NotBookCategoryFilter(BookCategory.BIBLE), new NotBookCategoryFilter(BookCategory.COMMENTARY));\n }\n return new NotBookCategoryFilter(BookCategory.BIBLE);\n }", "@Override\n public String toString() {\n return \"REVIEW FOR: \" +\n \"Book Title: '\" + title + '\\'' +\n \" Author: '\" + author + '\\'';\n\n }", "public Set<String> collectTestIssues() {\n return new HashSet<>();\n }", "public java.lang.String getReviewid() {\n return reviewid;\n }", "public int getReviewId()\r\n {\r\n return this.reviewId;\r\n }", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "public AggregationReview getReview() {\n return review;\n }", "@Override\n public List<ReviewBaseline> getNonGreenProjectsForQuarter(String months, String years) {\n\n return reviewBaselineRepository.getNonGreenProjectsForQuarter(months, years);\n }", "public int getMyReviewID() {\n return myReviewID;\n }", "public Element reviewJSONtoXML() throws ParserConfigurationException, TransformerException\r\n\t {\r\n\t\t \t//System.out.println(subject);\r\n\t\t \t//just those reviews which have a traceable bug id in review's subject\r\n\t\t \tString BugId=regexBugId(subject);\r\n\t\t \t//System.out.println(BugId);\r\n\t\t \tif ((BugId.length()>0)&&(fileVector.size()>0)) \r\n\t\t \t{\r\n\t\t\t\t//creating BugId Element\r\n\t\t\t\tElement bug = createElementAttrib(\"BugId\", \"Id\", BugId, \"Status\",status, docnew);\r\n\t\t\t\t//rootElement.appendChild(bug);\r\n\t\t\t\t//create Elements Owner and Subject\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Owner\", \"name\", owner, \"Date\",CreatedDate, docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"RevisionId\",\"Id\",revisionid,\"UpdatedDate\",UpdatedDate,docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"PatchSize\",\"NumberofPatches\",NumberofPatches,\"Size\",patchsize,docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Subject\", \"text\", subject,\"number\", number, docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Project\", \"Product\", Project,\"\",\"\", docnew));\r\n\t\t\t\t// Create Element files which includes all of the files in patch set\r\n\t\t\t\tElement files = docnew.createElement(\"Files\");\r\n\t\t\t\tfor (int j = 1; j <= fileVector.size(); j++) {\r\n\t\t\t\t\tElement file = createElementAttrib(\"File\", \"path\",fileVector.get(j), \"\", \"\", docnew);\r\n\t\t\t\t\tfiles.appendChild(file);\r\n\t\t\t\t}\r\n\t\t\t\tbug.appendChild(files);\r\n\t\t\t\t//Create reviewer element + name and date attribute.\r\n\t\t\t\tElement reviewers = docnew.createElement(\"Reviewers\");\r\n\t\t\t\tfor (int k = 0; k < reviewMessageInfo.size(); k++) {\r\n\r\n\t\t\t\t\t//removing \"Hudson CI\" from reviewers which is a patch builder\r\n\t\t\t\t\tif (!(reviewMessageInfo.get(k).get(1).contains(\"Hudson CI\")))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tElement info = createElementAttrib(\"Info\", \"name\",reviewMessageInfo.get(k).get(1), \"date\",reviewMessageInfo.get(k).get(2), docnew);\r\n\t\t\t\t\t\treviewers.appendChild(info);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tbug.appendChild(reviewers);\r\n\t\t\t\t//Create Reviewer Assignee: is a list of reviewers have been invited to review the patch.\r\n\t\t\t\tElement Assignee=docnew.createElement(\"Assignee\");\r\n\t\t\t\tfor(Entry<String,String> entry:AssigneeMap.entrySet())\r\n\t\t\t\t{\r\n\t\t\t\t\tElement info=createElementAttrib(\"AssigneeInfo\", \"name\",entry.getKey(), \"date\",entry.getValue(), docnew);\r\n\t\t\t\t\tAssignee.appendChild(info);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tbug.appendChild(Assignee);\r\n\t\t\t\t\r\n\t\t\t\treturn bug;\r\n\t\t\t}\r\n\t\t \telse\r\n\t\t \t{\r\n\t\t \t\treturn null;\r\n\t\t \t}\r\n\r\n\t\t \r\n\t }", "public int getNoOfratings() {\n\treturn noofratings;\n}", "@Test\n public void searchItems_LocationIsInCityInfo_ReturnListOfItems(){\n assertEquals(Arrays.toString(workerI.searchItems(\"David\", null)), Collections.singletonList(\"Ho Chi Minh City, Downtown\").toString());\n assertNotEquals(Arrays.toString(workerI.searchItems(\"David\", null)), Collections.singletonList(\"Crescent Mall\").toString());\n assertNotEquals(Arrays.toString(workerI.searchItems(\"David\", null)), Collections.singletonList(\"abc\").toString());\n assertNotEquals(Arrays.toString(workerI.searchItems(\"David\",null)), Collections.singletonList(\"\").toString());\n }", "public String conductUnRestrictedSearchForItem()\r\n\t{\r\n\t\tAdvancedSearch_Model query = new AdvancedSearch_Model();\r\n\t\t\r\n\t\tif (this.typeFilter.equals(\"Subject\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.CONTAIN, Constants.SEARCH_DOCUMENT_FIELD_CATEGORY,\r\n\t\t\t \"\\\"\" + this.selectedItem.getTerm() + \"\\\"\");\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Type\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_TYPE, this.selectedItem.getTerm());\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Creator\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.CONTAIN, Constants.SEARCH_DOCUMENT_FIELD_CREATOR,\r\n\t\t\t \"\\\"\" + this.selectedItem.getTerm() + \"\\\"\");\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Location\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_LOCATION,\r\n\t\t\t this.selectedItem.getTerm());\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_TYPE, this.selectedItem.getType());\r\n\t\t}\r\n\t\t\r\n\t\t// Set the AdvancedSearch_Model on the Search Backing Bean\r\n\t\tthis.searchBackingBean.setAdvancedQueryModel(query);\r\n\t\tthis.searchBackingBean.setSimpleOrAdvanced(SimpleOrAdvanced.ADVANCED);\r\n\t\tthis.searchBackingBean.setSearchType(\"all\");\r\n\t\tthis.searchBackingBean.autoSearch();\r\n\t\t\r\n\t\treturn \"search\";\r\n\t}", "public void testMultipleIssuesInDocumentNullify() throws Exception, Throwable {\n Builder builder = new Builder();\n Document document = builder.build(this.doc, \"\");\n String issueId = \"http://linkedgov.org/data/dwp-electricity-use/1/issue/1\";\n assertEquals(2, document.query(\"//issue\").size());\n Document out = (Document) PrivateAccessor.invoke(TaskUpdater.class,\n \"nullifyTask\",\n new Class[] {Document.class, String.class},\n new Object[] {document.copy(), issueId});\n\n assertEquals(1, out.query(\"//issue\").size());\n Model mainGraph = (Model) PrivateAccessor.invoke(TaskUpdater.class,\n \"getMainGraphFromDocument\",\n new Class[] {Document.class},\n new Object[] {out});\n assertEquals(1, mainGraph.size());\n }", "public Review loadReviewForUser(){\n\n return null;\n }", "public returnRentedItems() {\n rents = RentingSystemRunner.DB.getRents(RentingSystemRunner.wc.C.getPersonID());\n initComponents();\n rents.stream().forEach((r) -> {\n this.rentedItemListSelection.addItem(new comboItem(r.getRentID(), r.getItem().getItemName() + \" \" + r.getItem().getItemModel()));\n });\n this.setVisible(true);\n }", "public PersonReviewData[] getRebateReviewData() {\n return this.rebateReviewData;\n }", "@Override\n\tpublic List<Rental> getRentals() {\n\t\treturn null;\n\t}", "@Test\n public void userRankingFailure2() {\n List<ATrip> trips = new ArrayList<ATrip>();\n ATrip trip = new ATrip();\n trip.setDriverid(DRIVER_ID);\n trip.setPassengerid(\"\");\n trip.setTripid(TRIP_ID);\n trip.setStatus(1);\n trip.setStartdate(4);\n trip.setEnddate(5);\n trips.add(trip);\n\n List<ATripRepository.userTripRanking> response = repo.getUserRankings(1, 10, trips, \"Passenger\");\n\n assertTrue(response.isEmpty());\n }", "@Test\r\n\tpublic void testPendingInterviewListReturnNull() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.candidatePendingInterviewApproval(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.pendingInterviewApprovalList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getpenddingapproval/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "public ReviewRepository() {\n Review vrGameOne = new Review(1L, \"BeatSaber\", \"/images/BeatSaber-photo1.jpg\",\n \"/images/BeatSaber-photo2.jpg\", \"Fitness/Rhythm\",\n \"This game is so much fun! It also gives you a great workout if you play on Expert Plus mode.\",\n \"May 1, 2018\", \"Beat Saber is a virtual reality rhythm game where the player slices \" +\n \"blocks representing musical beats with a pair of sabers.\");\n Review vrGameTwo = new Review(2L, \"The Room\", \"/images/the-room-photo1.jpg\",\n \"/images/the-room-photo2.jpg\", \"Puzzle/Adventure\", \"This game is \" +\n \"challenging but fun. I like how you are able to get hints if you get stuck.\", \"March 26, 2020\",\n \"The Room is game where the player has to solve puzzles to advance. Each level \" +\n \"has a different theme.\");\n Review vrGameThree = new Review(3L, \"Synth Riders\", \"/images/synth-riders-photo1.jpg\",\n \"/images/synth-riders-photo2.jpg\", \"Dance/Rhythm\", \"This game is so much fun. \" +\n \"It has great music and I love the neon environment.\", \"June 21, 2018\", \"Synth Riders is \" +\n \"a lot like Beat Saber, but instead of slicing blocks with sabers, the player hits multicolored orbs \" +\n \"representing musical beats.\");\n Review vrGameFour = new Review(4L, \"Bigscreen\", \"/images/bigscreen-photo1.jpg\",\n \"/images/bigscreen-photo2.jpg\", \"Entertainment\", \"I love this VR game. It \" +\n \"feels like you are actually in the movie theater! An added bonus is that you can mute other \" +\n \"people in the theater if they are being too loud! I love it!\", \"May 21, 2019\",\n \"BigScreen is a virtual reality movie theater. You can watch movies (even 3D ones) \" +\n \"with random people, or you can join a private theater with just you and your friends. In \" +\n \"addition to movies, there are also rooms where you can watch TV shows.\");\n\n reviewList.put(vrGameOne.getId(), vrGameOne);\n reviewList.put(vrGameTwo.getId(), vrGameTwo);\n reviewList.put(vrGameThree.getId(), vrGameThree);\n reviewList.put(vrGameFour.getId(), vrGameFour);\n }", "@GetMapping(\"task/{taskId}/reviewersBySF\")\n\tpublic ResponseEntity<Collection<ReviewerDTO>> getReviewersBySF(@PathVariable String taskId) {\n\t\tTaskDto task = rspe.findTask(taskId);\n\t\tString magazine = (String) rspe.getVariable(task.getProcessInstanceId(), \"magazine\");\n\t\tString naucnaOblast = (String) rspe.getVariable(task.getProcessInstanceId(), \"nsucnaOblast\");\n\t\tString paper = (String) rspe.getVariable(task.getProcessInstanceId(), \"filename\");\n\n\t\tCollection<ReviewerDTO> reviewers = appTaskService.getAllReviewersBySF(magazine, naucnaOblast);\n\t\tCollection<ReviewerDTO> reviewersData = new ArrayList<ReviewerDTO>();\n\n\t\tCollection<Review> reviews = reviewService.getByPaper(paper);\n\t\tfor(ReviewerDTO rew : reviewers) {\n\t\t\tboolean flag = false;\n\t\t\tfor(Review review : reviews) {\n\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666 \"+rew.getUsername()+\" \"+review.getReviewer());\n\t\t\t\tif(rew.getUsername().equals(review.getReviewer())) {\n\t\t\t\t\tSystem.out.println(\"evo me odje6666666666666666666666666666666\");\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!flag && !reviewersData.contains(rew)) {\n\t\t\t\t\n\t\t\t\treviewersData.add(rew);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"ispisujem task id: \" + task.getId());\n\t\treturn ResponseEntity.ok(reviewersData);\n\t}", "public String getReviewer() {\n return reviewer;\n }", "public String getReviewText() {\n\t\treturn reviewText;\n\t}", "public void listAllReview() throws ServletException, IOException {\r\n\t\tlistAllReview(null);\r\n\t}", "private List<FeedbackResponseAttributes> getResponsesExcludingSelf(List<FeedbackResponseAttributes> responses) {\n List<FeedbackResponseAttributes> responsesExcludingSelf = new ArrayList<>();\n for (FeedbackResponseAttributes response : responses) {\n if (!response.giver.equalsIgnoreCase(response.recipient)) {\n responsesExcludingSelf.add(response);\n }\n }\n return responsesExcludingSelf;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsCheckedOut() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSCHECKEDOUT_PROP.get());\n }", "public static Set<ObjectReferenceType> getCurrentReviewers(AccessCertificationCaseType aCase) {\n return aCase.getWorkItem().stream()\n // TODO check also with campaign stage?\n .filter(wi -> wi.getStageNumber() == aCase.getStageNumber())\n .flatMap(wi -> wi.getAssigneeRef().stream())\n .collect(Collectors.toSet());\n }", "public List<Theater> findPreferedTheaterListByUserNo(int user_no) throws Exception;", "public List<ReviewStat> getReviewStat() {\n\t\t\treturn reviewRepositorystatR.findReviewStat();\n\t\t}", "public String listOfUnitsInRent() {\n String outputline = \"Rented items.\" + System.lineSeparator();\n for (User user : userswithrentitems) {\n for (SportEquipment unit : user.getRenteditems())\n outputline += \"UserID: \" + user.getUserid() + \". Category: \" + unit.getCategory()\n + \". Title: \" + unit.getTitle()\n + \". Price: \" + unit.getPrice()\n + \".\"\n + System.lineSeparator();\n }\n if (outputline.isEmpty()) {\n outputline = \"No units in shop.\";\n }\n return outputline;\n }", "public Map<String, Set<Review>> getReviewMap(){\n\t\treturn reviewMap;\n\t}", "@Override\n public List<ForumSearch> getJobWattingForModerator(String[] paths) {\n\t\treturn null;\n\t}", "private String getUsersComment(\r\n\t\t\t\t\t\t\t\tOntologyClassSubmission ontologyClassSubmission) {\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "@Override\r\n\tpublic void reviewOfPastYear(ExemptTeamMember exemptTeamMember) {\n\t\t\r\n\t\t\r\n\t}", "StatusItem getReconcileStatus();", "public default NonNullList<ItemStack> getReagents()\r\n\t{\r\n\t\treturn NonNullList.<ItemStack>withSize(4, ItemStack.EMPTY);\r\n\t}" ]
[ "0.6359109", "0.5616822", "0.53726214", "0.5351693", "0.5232541", "0.5217954", "0.50683576", "0.5055004", "0.500826", "0.50070506", "0.50035185", "0.49990696", "0.49987492", "0.4985966", "0.4952863", "0.49516615", "0.4917564", "0.48882318", "0.48864558", "0.4855356", "0.48547536", "0.48351", "0.48278287", "0.47914737", "0.47657537", "0.47651348", "0.4761607", "0.47534767", "0.47497198", "0.4738236", "0.47307888", "0.4724557", "0.47075865", "0.47003555", "0.46909556", "0.467594", "0.46759084", "0.4674589", "0.46346483", "0.4632657", "0.46121037", "0.4607456", "0.46055248", "0.4593506", "0.45887357", "0.45817497", "0.4578408", "0.4575793", "0.45516634", "0.45351928", "0.45321274", "0.4525506", "0.4523949", "0.45174915", "0.45133975", "0.4504553", "0.4492247", "0.4489585", "0.44833767", "0.44786972", "0.4461706", "0.44580033", "0.44544902", "0.44536698", "0.4451851", "0.44443342", "0.4431432", "0.44293922", "0.44277355", "0.44240767", "0.44200614", "0.4419643", "0.44173673", "0.44173378", "0.441438", "0.44101048", "0.44047302", "0.4403179", "0.4399501", "0.43937495", "0.43864703", "0.43785572", "0.43781415", "0.43629625", "0.43617603", "0.43544272", "0.43501285", "0.43435955", "0.4343234", "0.43413535", "0.43377858", "0.4337588", "0.4334907", "0.43306604", "0.4328655", "0.43256986", "0.43229038", "0.4322608", "0.43162695", "0.43154886", "0.43144178" ]
0.0
-1
Criando um estado novo a cada Round
public void playRound(){ this.gameState = GameController.createGameState(this.game); // Verifica se o if(this.gameState.isEnded()){ var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer(); this.gameState.setWinner(winner); } else{ // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador this.view.displayGame(this.gameState); var playerCardChose = this.getPlayerCardChose(); var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards()); try{ var playerCard = this.game.getPlayer().playCard(playerCardChose); var computerCard = this.game.getComputer().playCard(computerCardChose); var winnerCard = this.verifyBiggerCard(playerCard, computerCard); // Verificando qual `Player` ganhou e se um ganhou var hasPlayerWon = winnerCard.equals(playerCard); var hasComputerWon = winnerCard.equals(computerCard); var turnedCard = this.getGameState().getTurnedCard(); // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador if(hasPlayerWon){ this.game.getPlayer().earnCard(computerCard); this.game.getComputer().loseCard(computerCard); } else if(hasComputerWon){ this.game.getComputer().earnCard(playerCard); this.game.getPlayer().loseCard(playerCard); } // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player // Se não eu mostro empate if(hasComputerWon || hasPlayerWon){ this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon); } else { this.view.displayRoundWinner(turnedCard, playerCard, computerCard); } } catch(Exception excp){ this.view.displayMessageError(excp.getMessage()); this.playRound(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void nextRound() {\n\t\n\t\t\n\t\tcfight++;\n\t\tif(cfight>=maxround)\n\t\t{\n\t\tcfight=0;\n\t\t\n\t\tround++;\n\t\t\tmaxround/=2;\n\t\t}\n\t\t\n\tif(round<4)\n\t{\n\tcontrollPCRound();\n\t}\n\telse\n\t{\n\t\tint sp=0;\n\t\tint round=0;\n\t\tfor(int i=0; i<fighter.length; i++)\n\t\t{\n\t\t\tif(spieler[i]>0)\n\t\t\t{\n\t\t\t\tsp++;\n\t\t\t\tif(fround[i]>round)\n\t\t\t\t{\n\t\t\t\tround=fround[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif(geld==false)\n\t{\n\t\tgeld=true;\n\t\tif(sp==1)\n\t\t{\n\t\tZeniScreen.addZenis(round*3500);\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint w=round*4000-500*sp;\n\t\t\tif(w<1)\n\t\t\t{\n\t\t\t\tw=100;\n\t\t\t}\n\t\t\tZeniScreen.addZenis(w);\t\n\t\t}\n\t}\n\t}\n\t\n\t\n\t}", "public int getCurrentRound()\n\t{\n \treturn currentRound;\n\t}", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "private void nextRound() {\r\n action = 0;\r\n if (round == GameConstants.ROUNDS) {\r\n round = 0;\r\n if (phase == 0) {\r\n vc = null;\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n }\r\n phase++;\r\n } else {\r\n round++;\r\n }\r\n }", "public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}", "public int getRound() {\n return round;\n }", "public void handleNextRound() {\n\t\t\r\n\t}", "public void beginRound() {\r\n\t\tnewRound();\r\n\t}", "public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}", "public PaxosRound createRound()\n {\n return createRound(0);\n }", "private void newRound() {\r\n\t\tballoonsThisRound = currentRoundNumber * balloonsPerRound * 5;\r\n\t\tcurrentRound = new Round(balloonTypes, 0.3f, balloonsThisRound);\r\n\t\tcurrentRoundNumber++;\r\n\r\n\t\tSystem.out.println(\"Begining Round: \" + currentRoundNumber);\r\n\t}", "public void newRound(){\r\n clearRandomDirections();\r\n this.currentAmountToPutIn++;\r\n initializeNewRound();\r\n //reset timer;\r\n }", "public Round getRound(){\n return mRound;\n }", "public int getRoundNum(){\n return gameRounds;\n }", "public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}", "public static String nextRound() {\n return \"Starting next round.\";\n }", "public int getCurrentRound() {\n\t\treturn roundNumber;\n\t}", "public void setRound(int round) {\r\n this.round = round;\r\n }", "public Integer getRound() {\n return round;\n }", "public int getNround()\n {\n \treturn this.nround;\n }", "public void startRound(int round) {\n\t\tif (round != 1) {\n\t\t\tSystem.out.println(\" Vous avez effectuez votre : \" + round + \" ème attaques\\n\");\n\t\t} else {\n\t\t\tSystem.out.println(\" Vous avez effectuez votre : \" + round + \" ère attaque\\n\");\n\t\t}\n\n\t}", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "abstract void startRound();", "public int getPointsGainedLastRound(){return pointsGainedLastRound;}", "public synchronized int getCurrentRoundNumber()\r\n {\r\n return currentRoundNumber;\r\n }", "public void incrementCurrentRoundNumber() {\n\t\t\n\t\tcurrentRoundnumber = currentRoundnumber +1;\n\t}", "public PaxosRound createRound(int a_round)\n {\n PaxosRound result = new PaxosRound(this, a_round, getNextRoundLeader(a_round));\n m_rounds.put(new Integer(a_round), result);\n return result;\n }", "public String roundUp(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia arriba \" + (int)Math.ceil(this._X);\n }", "private void newRound(){\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\tSystem.out.println(\"PREPPING ROUND \" + round + \" SETUP. Game Logic round (should be aligned) : \" + gameLogic.getRound());\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\n\t\tSystem.out.println(\"PRINTING LEADSUIT OF NEW ROUND \" + gameLogic.getLeadSuitCard());\n\t\tgameLogic.initialiseDeck();\n\t\tgameLogic.setDealer(round);\n\t\t\n\t\tSystem.out.println(\"Players Hand (Should be empty): \" + gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getHand());\n\t\t\n\t\tgameLogic.setPlayersHand(round);\n\t\tgameLogic.setTrumpCard();\n\t\tgameLogic.setPlayerOrder(round);\n\t\tgameLogic.getTableHand().clearTableHand();\n\n\t\twaitingUser = false;\n\t\tif (waitingUser()){\n\t\t\twaitingUser = true;\n\t\t}\n\n\t\tcurrentPlayer = gameLogic.getArrayOfPlayers().getArrayOfPlayers().get(0).getPlayerId();\n\n\t\tdisplayRoundUI();\n\t\tdisplayTrumpUI();\n\t\tdisplayCardUI();\n\t\tdisplayAvailableBidsUI();\n\t\tdisplayTableHandUI();\n\n\t\tSystem.out.println(\"BEGIN ROUND \" + round);\n\t\ttodoThread();\n\t}", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }", "public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }", "public int getRoundNumber() {\n return roundNumber;\n }", "public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }", "public int getRound() {\n\t\treturn myHistory.size() + opponentHistory.size();\n\t}", "public int calculate(java.util.List<Round> rounds, int index, Round round);", "public int calculateNextRound(Tournament tournament) {\r\n\t\treturn tournament.getRounds().size() + 1;\r\n\t}", "public void beginNextRound() {\n\t\tsetBeginNextRound(true);\n\t}", "public static int numberOfRounds() {\n System.out.print(\"Entrez le nombre de rounds de cette partie : \");\n while (true) {\n try {\n int rounds = new Scanner(System.in).nextInt();\n if (rounds > 0) return rounds;\n } catch (Exception ignored) {\n }\n System.out.println(\"Entrez un entier supérieur à 0 : \");\n }\n }", "private void nextRound(){\n round++;\n if(round == 6){\n endGame();\n }else{\n out.println(\"###ROUND \" + round + \"###\");\n// ArrayList<Player> playerList = game.getPlayerList();\n for (Player e : playerList) {\n e.resetActions();\n }\n game.applyCards();\n }\n }", "abstract GameRound setupRound();", "public boolean nextRound() {\n if (numberOfRounds > playedRounds) {\n return true;\n }\n return false;\n }", "private void nextRound()\n {\n Player currentPlayer = roundManager.next();\n\n if(!currentPlayer.getClientConnection().isConnected() || !currentPlayer.getClientConnection().isLogged())\n {\n if(currentPlayer.equals(lastFinalFrenzyPlayer))return;\n nextRound();\n return;\n }\n\n if(gameMode == GameMode.FINAL_FRENZY_BEFORE_FP && roundManager.isFirstPlayer(currentPlayer))gameMode = GameMode.FINAL_FRENZY_AFTER_FP;\n\n try\n {\n currentPlayer.getView().roundStart();\n notifyOtherClients(currentPlayer, virtualView -> virtualView.showNotification(\"È il turno di \"+currentPlayer.getUsername()));\n\n if(roundManager.isFirstRound() || !currentPlayer.isFirstRoundPlayed()) firstRound(currentPlayer);\n\n for(int i = 0; i < gameMode.getPlayableAction(); i++)\n {\n currentPlayer.resetExecutedAction();\n boolean continueRound = executeAction(currentPlayer);\n if(!continueRound)break;\n }\n\n if(gameMode == GameMode.NORMAL)new ReloadAction(this, currentPlayer, ReloadAction.RELOAD_ALL).execute();\n }\n catch (ConnectionErrorException e)\n {\n Logger.error(\"Connection error during \"+currentPlayer.getUsername()+\"'s round!\");\n notifyOtherClients(currentPlayer, virtualView -> virtualView.showNotification(currentPlayer.getUsername()+\" si è disconnesso!\"));\n }\n catch (TimeOutException e)\n {\n Logger.info(\"Player \"+currentPlayer.getUsername()+\" has finished his time\");\n }\n\n currentPlayer.getView().roundEnd();\n currentPlayer.resetExecutedAction();\n refillMap();\n sendBroadcastUpdate();\n if(isFinalFrenzy())currentPlayer.setLastRoundPlayed(true);\n handleDeadPlayers(currentPlayer);\n if(isFinalFrenzy() && currentPlayer.equals(lastFinalFrenzyPlayer))return;\n checkForFinalFrenzy(currentPlayer);\n if(match.connectedPlayerSize() <= 0 || match.connectedPlayerSize() < MatchSettings.getInstance().getMinPlayers())return;\n nextRound();\n\n }", "@Override\r\n\tpublic void setRound(int round) {\n\t\tthis.round = \"Round: \"+round;\r\n\t\tupdate();\r\n\t}", "void newRound() {\n // Increase the round number on every round.\n round++;\n\n // Write to the log file\n\t logger.log(divider);\n logger.log(\"\\nRound \" + round + \" starting.\");\n logger.log(\"Active player: \" + activePlayer.getName());\n\n // Log player name and topmost card for all players.\n for (Player player : players) {\n logger.log(player.getName() + \"'s card: \" + player.getTopMostCard()\n .toString());\n }\n\n setGameState(GameState.NEW_ROUND_INITIALISED);\n }", "public void setCurrentGameRound(int round){\n\t\tcurrentGameRound = round;\n\t\trepaint();\n\t}", "public String roundDown(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia abajo \" + (int)Math.floor(this._X);\n }", "public double calcularIncremento(){\n double incremento=0.0;\n \n if (this.edad>=18&&this.edad<50){\n incremento=this.salario*0.05;\n }\n if (this.edad>=50&&this.edad<60){\n incremento=this.salario*0.10;\n }\n if (this.edad>=60){\n incremento=this.salario*0.15;\n }\n return incremento;\n }", "public void setRound(final int value) {\n round = value;\n }", "private void Calculation() {\n\t\tint calStd = jetztStunde + schlafStunde;\n\t\tint calMin = jetztMinute + schlafMinute;\n\n\t\ttotalMin = calMin % 60;\n\t\ttotalStunde = calStd % 24 + calMin / 60;\n\n\t}", "private void setRound(ChesspairingRound round) {\n\t\tint rNumber = round.getRoundNumber();\n\t\tif (rNumber < 1) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tif (rounds.size() >= rNumber) {\n\t\t\trounds.remove(rNumber - 1);\n\t\t}\n\t\trounds.add(rNumber - 1, round);\n\t}", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "public Round(ArrayList<Move> niceMoves) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = 1;\n\t}", "public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "private void giveScords(){\n \t//bingo 題數, seconds花費秒數\n \tint totalSec = (int)seconds;\n \t\n \tif(correct){\n \t\tif(totalSec<=5){\n \t\t\tuserPoints = userPoints + 150;\n \t\t}else if(totalSec<=10){\n \t\t\tuserPoints = userPoints + 125;\n \t\t}else if(totalSec<=15){\n \t\t\tuserPoints = userPoints + 100;\n \t\t}else if(totalSec<=20){\n \t\t\tuserPoints = userPoints + 80;\n \t\t}\n \t}\n }", "public boolean tick() {\n/* 55 */ this.affected = true;\n/* 56 */ if (this.round > 0)\n/* 57 */ this.round--; \n/* 58 */ return (this.round == 0);\n/* */ }", "void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }", "public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }", "private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "private static double rundeBetrag(double betrag){\n \tdouble round = Math.round(betrag*10000); \r\n \t\r\n \tround = round / 10000; \r\n \tround = Math.round(round*1000); \r\n \tround = round / 1000; \r\n \tround = Math.round(round*100); \r\n \r\n \treturn round / 100; \r\n }", "private GameResponse playNextRound() {\n if(gameResponse.getPoint() == 0) {\n gameResponse.setMessage(null);\n roll();\n gameResponse.setPoint(currentRoll);\n if (WINS.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (LOSES.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n } else {\n roll();\n if (currentRoll == gameResponse.getPoint()) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (currentRoll == 7) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n }\n return gameResponse;\n }", "@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }", "public Boolean completeRound(){\n\t\tint[] roundsTotal = {1,2,3,4,5,6,5,4,3,2,1};\n\n\t\tif (roundsTotal[round-1] == roundCounter) {\n\t\t\tSystem.out.println(\"ROUNDCOUNTER ####### \" + roundCounter);\n\t\t\tSystem.out.println(\"TOTAL SUBROUND ####### \" + cardsToDealPerRound[round-1]);\n\t\t\tSystem.out.println(\"ROUND ####### \" + round);\n\t\t\tgameLogic.getScoreboard().calculateRoundScore(round);\n\t\t\tgameLogic.getScoreboard().calculateTotalScore();\n\t\t\troundCounter = 0;\n\t\t\tround += 1;\n\t\t\tgameLogic.setRound(round);\n\n\t\t\tSystem.out.println(\"#################################ROUND COMPLETED#################################\");\n\t\t\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public GoLBoard nextRound()\n\t{ \n\t\t//tempBoard = the new upcoming GoLBoard that will be returned\n \tGoLBoard tempBoard = this.copyBoard(); \n \t\n \t//set the births and deaths to the beginning\n \tcurrentDeath = 0;\n \tcurrentBirths = 0;\n \t \n \t//currRow = current row\n \t//currCol = current column\n \t//Accumulate number of cells that birthed and died\n \t//Update the tempBoard using the updateCell method\n \tfor (int currRow = 1; currRow <= setSize; currRow++)\n \t{\n \tfor (int currCol = 1;currCol <= setSize; currCol++)\n \t{\n \t boolean wasAlive = myGoLCell[currRow][currCol].isAlive();\n \t boolean nowAlive =\n \t \ttempBoard.getCell(currRow,currCol).updateCell(getNeighborhood(currRow,currCol));\n \t currentDeath += (wasAlive && !nowAlive)?1:0;\n \t currentBirths += (!wasAlive && nowAlive)?1:0;\n \t}\n \t}\n \t\n \t//Replace the current myGoLCell with the updated\n \tthis.myGoLCell = tempBoard.myGoLCell;\n \t\n \t//Add number of rounds\n \tcurrentRound++;\n \t\n \t//return the current board\n \treturn this;\n\t}", "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }", "public String roundNear(){\n return \"Numero original: \" + this._X + \" numero redondeado hacia numero mas cercano \" + (int)Math.floor(this._X + 0.5);\n }", "public int getCount() {\n\t\treturn this.countRound;\n\t}", "public boolean isLastRound(){\n return gameDescriptor.getTotalCycles()==roundNumber;\n }", "@PostMapping(\"/{gameId}/round\")\n public Progress startNewRound(@PathVariable Long gameId) {\n return trainerService.startNewRound(gameId);\n // hier hoeft alleen de score gereturned te worden\n }", "private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public void calcularEntropia(){\n //Verificamos si será con la misma probabilida o con probabilidad\n //especifica\n if(contadorEstados == 0){\n //Significa que será con la misma probabilidad por lo que nosotros\n //calcularemos las probabilidades individuales\n for(int i = 0; i < numEstados; i++){\n probabilidadEstados[i] = 1.0 / numEstados;\n }\n }\n for(int i = 0; i < numEstados; i++){\n double logEstado = Math.log10(probabilidadEstados[i]);\n logEstado = logEstado * (-1);\n double logDos = Math.log10(2);\n double divisionLog = logEstado / logDos;\n double entropiaTmp = probabilidadEstados[i] * divisionLog;\n resultado += entropiaTmp;\n }\n }", "public void calcularGrados() {\n\t\tgrMax = 1;\n\t\tint temp;\n\t\tfor (int f = 0; f < cantNodos; f++) {\n\t\t\ttemp = 0;\n\t\t\tfor (int c = 0; c < cantNodos; c++) {\n\t\t\t\tif (getValor(f, c) == true)\n\t\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tif (temp > grMax)\n\t\t\t\tgrMax = temp;\n\t\t}\n\t\tgrMin = grMax;\n\t\tfor (int f = 0; f < cantNodos; f++) {\n\t\t\ttemp = 0;\n\t\t\tfor (int c = 0; c < cantNodos; c++) {\n\t\t\t\tif (getValor(f, c) == true)\n\t\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tif (temp < grMin)\n\t\t\t\tgrMin = temp;\n\t\t}\n\t\t\n\t}", "public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void playRound() {\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.setActivePlayer(winningPlayer) == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\ttheModel.displayTopCard();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\t\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\t\t\t\r\n\t\t\t\t//System.out.println(\"this should be the human having won round\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcheckIfHumanPlayerInGame();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round: \" + RoundID);\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\r\n\t\t\t\t//System.out.println(\"this should be the ai \" + winningPlayer.getName() + \"who has won the last round\");\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void endRound() {\n\t\tif (roundNumber>maxRounds) {\n\t\t\tSystem.out.println(\"hae �etta er MAX ROUNDS! LEIKUR �TTI A� VERA B�INN\");\n\t\t\tendGame();\n\t\t} else {\n\t\t\tSystem.out.println(\"�ETTA er r�tt leikur er ekki b�inn round: \"+ getCurrentRound());\n\t\t\tmatchResults = core.simulateNextRound();\n\t\t\tSystem.out.println(\"B�INN A� SIMULATA ROUND \");\n\t\t\tFootballPlayer[] players = core.getAllFootballPlayers();\n\t\t\tfor (int i = 0; i<players.length; i++) {\n\t\t\t\tStatistics[] stats = players[i].getStats();\n\t\t\t\tSystem.out.println(players[i].getName() + \" \" + stats[1].getGoals());\n\t\t\t}\n\t\t\tcalculatePoints();\n\t\t\troundNumber++;\n\t\t}\n\t\tusers.get(0).setTransferFinished(false);\n\t\tusers.get(1).setTransferFinished(false);\n\t}", "@Override\r\n\tpublic void setRound(int x) {\n\t\troundNum = x;\r\n\t\tupdate();\r\n\t}", "public static void sueldoTotal(int hora, int sueldo){\n int resultado = 0;\r\n if(hora<=40){\r\n resultado = hora*sueldo;\r\n }\r\n if(hora>40 || hora<48){\r\n resultado = (40*sueldo)+(hora-40)*(sueldo*2);\r\n }\r\n if (hora>=48){\r\n resultado =(40*sueldo)+8*(sueldo*2)+(hora-48)*(sueldo*3);\r\n }\r\n System.out.println(\"El sueldo es de \"+ resultado);//Se muestra el sueldo total\r\n \r\n \r\n \r\n }", "public void capturarNumPreRadica() {\r\n try {\r\n if (mBRadicacion.getRadi() == null) {\r\n mbTodero.setMens(\"Debe seleccionar un registro de la tabla\");\r\n mbTodero.warn();\r\n } else {\r\n DatObser = Rad.consultaObserRadicacion(String.valueOf(mBRadicacion.getRadi().getCodAvaluo()), mBRadicacion.getRadi().getCodSeguimiento());\r\n mBRadicacion.setListObserRadicados(new ArrayList<LogRadicacion>());\r\n\r\n while (DatObser.next()) {\r\n LogRadicacion RadObs = new LogRadicacion();\r\n RadObs.setObservacionRadic(DatObser.getString(\"Obser\"));\r\n RadObs.setFechaObservacionRadic(DatObser.getString(\"Fecha\"));\r\n RadObs.setAnalistaObservacionRadic(DatObser.getString(\"empleado\"));\r\n mBRadicacion.getListObserRadicados().add(RadObs);\r\n }\r\n Conexion.Conexion.CloseCon();\r\n opcionCitaAvaluo = \"\";\r\n visitaRealizada = false;\r\n fechaNueva = null;\r\n observacionReasignaCita = \"\";\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgInfRadicacion').show()\");\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".capturarNumPreRadica()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }", "public String getSleeveRound() {\r\n\t\treturn sleeveRound;\r\n\t}", "public int getDraws() {\n return drawRound;\n }", "@Override\n public int calculerPerimetre() {\n return (int)(rayon * 2 * Math.PI);\n }", "public void runOff(int round) {\n\t\tfor (int i = 0; i < voteOrder.size(); i++) {\n\n\t\t\t// Depending on the round, get the number voted\n\t\t\tint count = voteOrder.elementAt(i).elementAt(round) - 1;\n\n\t\t\tCandidat candidat = Candidats.elementAt(count);\n\n\t\t\tif (candidat.getId() == count && !candidat.isEliminated) {\n\t\t\t\tint vow = candidat.getVows() + 1;\n\t\t\t\tcandidat.setVows(vow);\n\n\t\t\t\t// candidat.calculatePercentage(voteOrder.size());\n\t\t\t}\n\n\t\t}\n\n\t}", "void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "public Boolean completeSubRound() {\n\t\tif (subRound != 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tSystem.out.println(\"#################################SUBROUND COMPLETED#################################\");\n\t\t\tsubRound = 0;\n\t\t\treturn true;\n\t\t}\n\t}", "public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros \n cambio = Math.round(100 * dinero) - Math.round(100 * precio);\n // Se inicializan las variables de cambio a cero\n cambio1 = 0;\n cambio50 = 0;\n cambio100 = 0;\n // Se guardan los valores iniciales para restaurarlos en caso de no \n // haber cambio suficiente\n int de1Inicial = de1;\n int de50Inicial = de50;\n int de100Inicial = de100;\n \n // Mientras quede cambio por devolver y monedas en la máquina \n // se va devolviendo cambio\n while(cambio > 0) {\n // Hay que devolver 1 euro o más y hay monedas de 1 euro\n if(cambio >= 100 && de100 > 0) {\n devolver100();\n // Hay que devolver 50 céntimos o más y hay monedas de 50 céntimos\n } else if(cambio >= 50 && de50 > 0) {\n devolver50();\n // Hay que devolver 1 céntimo o más y hay monedas de 1 céntimo\n } else if (de1 > 0){\n devolver1();\n // No hay monedas suficientes para devolver el cambio\n } else {\n cambio = -1;\n }\n }\n \n // Si no hay cambio suficiente no se devuelve nada por lo que se\n // restauran los valores iniciales\n if(cambio == -1) {\n de1 = de1Inicial;\n de50 = de50Inicial;\n de100 = de100Inicial;\n return -1;\n } else {\n return dinero - precio;\n }\n }", "public RoundTimer(int roundTime) {\n\t\ttimer = new Timer();\n\t\tthis.timeLeft = roundTime;\n\t}", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "public static void StartNewRound () {\n System.out.println(\"The game \" + (rounds == 0 ? \"begins!\" : \"continues...\"));\r\n System.out.println(\"===============================================\");\r\n\r\n // GENERATE A NEW NUMBER\r\n SetNewNumber();\r\n\r\n // RESET PICKED ARRAY\r\n ResetPickedNumbers();\r\n }", "@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }", "private int round1(double candidate) {\n\tif (candidate > 0.85) {\n\t return(1);\n\t} else if (candidate < 0.15) {\n\t return(0);\n\t}\n\t\n\treturn(-1);\n }", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}" ]
[ "0.6655576", "0.6654811", "0.6616166", "0.6524885", "0.6514016", "0.6416953", "0.63590103", "0.62865806", "0.6283973", "0.6272706", "0.6261599", "0.6258817", "0.6231877", "0.6179295", "0.61614686", "0.6157606", "0.6126253", "0.6124323", "0.6072701", "0.6045696", "0.6028302", "0.60168296", "0.5981863", "0.59788066", "0.59684163", "0.59622544", "0.5907081", "0.5889408", "0.58543855", "0.5845491", "0.58032876", "0.5787778", "0.5773839", "0.5772984", "0.5763385", "0.5755725", "0.57426745", "0.572772", "0.5683497", "0.5683118", "0.56814826", "0.56647456", "0.5647756", "0.56335527", "0.56230223", "0.5621264", "0.56187266", "0.55713004", "0.55470204", "0.5533311", "0.55308443", "0.5518316", "0.55133873", "0.55038184", "0.54892457", "0.54810923", "0.5477343", "0.5472948", "0.54700726", "0.54574746", "0.5434135", "0.5414444", "0.5400757", "0.53970057", "0.53653324", "0.5364539", "0.53550214", "0.5349673", "0.53493434", "0.5347739", "0.5345177", "0.5342691", "0.5336326", "0.5331911", "0.5312996", "0.5302583", "0.5291911", "0.52915066", "0.52843493", "0.5283287", "0.5281818", "0.52769625", "0.5274086", "0.5271803", "0.52716637", "0.52694064", "0.5252612", "0.5250339", "0.52443117", "0.5240496", "0.52379405", "0.523492", "0.5232994", "0.52323616", "0.5232063", "0.52313405", "0.522634", "0.5225111", "0.5223566", "0.5215731" ]
0.5639378
43
Test case number: 0 /Coverage entropy=1.9061547465398496
@Test(timeout = 4000) public void test000() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("oofT'b.HnXtsd."); Token token0 = xPathLexer0.or(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test00() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass('u', 4.9E-324);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTruePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderROC();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test09() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedFalseNegativeRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedMatthewsCorrelation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-398.0145), 360.0);\n assertEquals(Double.NaN, evaluation0.rootMeanPriorSquaredError(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n public void test10() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"xx\\\"qa7Q>h6u=;6s.h+.<\");\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.weightedFalsePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateMargins(doubleArray0, 3, (-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }" ]
[ "0.7495475", "0.7449727", "0.7246917", "0.717759", "0.71178615", "0.71044946", "0.71007025", "0.7093131", "0.70675063", "0.7062653", "0.70527583", "0.7049322", "0.70423025", "0.702718", "0.7026005", "0.6979596", "0.6949806", "0.6920845", "0.69055116", "0.69006854", "0.688753", "0.6862872", "0.6850233", "0.68402535", "0.68288094", "0.6828446", "0.68045264", "0.6801693", "0.6748142", "0.6746072", "0.67413646", "0.67234105", "0.6721412", "0.6713329", "0.67121804", "0.66932315", "0.6685464", "0.6673815", "0.6670182", "0.66488266", "0.6630475", "0.66297084", "0.661929", "0.6616158", "0.66113245", "0.6581393", "0.6553022", "0.6547559", "0.6543144", "0.6537696", "0.6535195", "0.65265566", "0.6524203", "0.65147704", "0.6501422", "0.6491454", "0.64465356", "0.64443845", "0.6428464", "0.6380727", "0.63452244", "0.6344965", "0.6343327", "0.63391787", "0.6314839", "0.63092387", "0.6302542", "0.6300245", "0.629567", "0.6284775", "0.62688243", "0.62681645", "0.62319154", "0.6208034", "0.61897206", "0.6186802", "0.6185938", "0.6183733", "0.61795294", "0.61710733", "0.6168004", "0.6164372", "0.61593586", "0.6157132", "0.61458606", "0.61414766", "0.6125048", "0.61160815", "0.60950524", "0.60920435", "0.6084705", "0.60833323", "0.60817605", "0.60691434", "0.6067901", "0.6040667", "0.60394496", "0.60375744", "0.6036925", "0.60347956", "0.6032068" ]
0.0
-1
Test case number: 1 /Coverage entropy=0.76128838011492
@Test(timeout = 4000) public void test001() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("hN!SM~8ux(wB"); xPathLexer0.dollar(); xPathLexer0.not(); xPathLexer0.nextToken(); xPathLexer0.leftParen(); xPathLexer0.whitespace(); xPathLexer0.plus(); Token token0 = xPathLexer0.or(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Override\n public int getGridCoverageCount() {\n return 1;\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTruePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public int countTestCases() {\n return 1;\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "public double entropyPotential() {\n \n return (-1.0);\n}" ]
[ "0.7190505", "0.7133066", "0.68552", "0.6811804", "0.67486656", "0.67465407", "0.6736609", "0.673527", "0.67242944", "0.6715406", "0.66835636", "0.6670008", "0.6667835", "0.66413784", "0.6614982", "0.6609573", "0.66055036", "0.6603758", "0.6596739", "0.65542924", "0.6550274", "0.6537165", "0.6530388", "0.6511926", "0.64912325", "0.64688593", "0.646662", "0.6453791", "0.6441218", "0.64039993", "0.64015657", "0.638985", "0.63876015", "0.63712907", "0.6369911", "0.63663244", "0.6363163", "0.63612366", "0.636079", "0.63601714", "0.63443255", "0.6343504", "0.6313886", "0.63116556", "0.63064855", "0.6301978", "0.6268947", "0.62661475", "0.62598616", "0.62555707", "0.62542313", "0.6226543", "0.61851764", "0.61716765", "0.61683565", "0.61641055", "0.6159461", "0.6145763", "0.6144669", "0.61418486", "0.6135904", "0.61262745", "0.6123185", "0.6107808", "0.61039186", "0.60676694", "0.60453504", "0.6043832", "0.6041072", "0.60264254", "0.6021991", "0.60106194", "0.6007156", "0.5994382", "0.59874254", "0.597665", "0.59758216", "0.59748966", "0.5962454", "0.59569806", "0.59520227", "0.5947914", "0.59471554", "0.59218603", "0.591461", "0.5913794", "0.5913508", "0.59116393", "0.5911545", "0.5911137", "0.5910121", "0.5903815", "0.59033436", "0.5901745", "0.58984405", "0.5890254", "0.5884909", "0.5882757", "0.5881265", "0.58733374", "0.5872455" ]
0.0
-1
Test case number: 2 /Coverage entropy=2.1458417525947544
@Test(timeout = 4000) public void test002() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("/a"); xPathLexer0.dollar(); Token token0 = xPathLexer0.and(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG2() {\n CuteNetlibCase.doTest(\"AGG2.SIF\", \"-2.0239252355977114E7\", \"5.71551859632249E9\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateNominationCuantity2() throws FileNotFoundException {\n System.out.println(\"testCalculateNominationCuantity 2\");\n double expResult = 125.0;\n double result = calc.getChange(124d, calc.calculateDenominationCuantity(124d));\n assertEquals(expResult, result);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Override\n public int getGridCoverageCount() {\n return 1;\n }" ]
[ "0.70436686", "0.69267863", "0.67519194", "0.67395115", "0.663887", "0.6632636", "0.66291225", "0.65962744", "0.6549531", "0.6530381", "0.6524609", "0.6522848", "0.65128523", "0.6507937", "0.6499577", "0.64854425", "0.6475366", "0.6440682", "0.6410353", "0.63936514", "0.63706756", "0.6370475", "0.6357454", "0.6346695", "0.6339001", "0.63298935", "0.6319726", "0.6291681", "0.6283715", "0.62607825", "0.6228527", "0.6216352", "0.6213975", "0.62060124", "0.6197728", "0.6192086", "0.6185025", "0.61822605", "0.61800563", "0.6177309", "0.6176287", "0.6172329", "0.6170506", "0.6149757", "0.6144924", "0.61420745", "0.6139813", "0.6114716", "0.6112724", "0.6098527", "0.60835904", "0.60647404", "0.605193", "0.60369426", "0.60323375", "0.6026459", "0.6024466", "0.6017898", "0.6013888", "0.60135454", "0.599699", "0.5994978", "0.5991273", "0.5984508", "0.59698844", "0.59664637", "0.5964847", "0.59625554", "0.5953332", "0.594332", "0.59412915", "0.59246653", "0.5922747", "0.5921477", "0.592095", "0.59068215", "0.590527", "0.58869404", "0.5886812", "0.5876493", "0.5875033", "0.58713776", "0.58483124", "0.58331233", "0.5830404", "0.5826907", "0.5819129", "0.5814771", "0.58133197", "0.58080906", "0.5807306", "0.57939243", "0.5791059", "0.57759064", "0.5774359", "0.5772142", "0.5769209", "0.5759468", "0.57512707", "0.5744152", "0.5742978" ]
0.0
-1
Test case number: 3 /Coverage entropy=2.1972245773362196
@Test(timeout = 4000) public void test003() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("hN!SM~8ux(wB"); xPathLexer0.dollar(); Token token0 = xPathLexer0.and(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG3() {\n CuteNetlibCase.doTest(\"AGG3.SIF\", \"1.031211593508922E7\", \"5.746768863949547E9\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }" ]
[ "0.7193854", "0.7044147", "0.6939154", "0.68362737", "0.679616", "0.67491984", "0.6739023", "0.67293197", "0.6707867", "0.67045414", "0.6702537", "0.66854525", "0.66774166", "0.6660796", "0.66561335", "0.66324836", "0.6629012", "0.6622179", "0.66141915", "0.66017205", "0.65783477", "0.6522622", "0.64774156", "0.6474211", "0.64716244", "0.6420428", "0.64195096", "0.6414308", "0.6402034", "0.63982344", "0.63633424", "0.63572794", "0.6352183", "0.6329178", "0.6320603", "0.6299455", "0.6291022", "0.6283929", "0.62795955", "0.62742895", "0.62551326", "0.62550634", "0.62545687", "0.62511575", "0.62397933", "0.6233317", "0.6232475", "0.6230938", "0.62283844", "0.61820984", "0.61664665", "0.61624813", "0.61594695", "0.6146215", "0.6144439", "0.61247367", "0.6095673", "0.60917705", "0.60863864", "0.60794204", "0.60721284", "0.60682213", "0.6060858", "0.6057865", "0.60574454", "0.60321295", "0.60213965", "0.6018251", "0.6004529", "0.6000547", "0.59966123", "0.5994521", "0.5993582", "0.59834677", "0.5964819", "0.5961297", "0.59508735", "0.5950103", "0.59428865", "0.59094095", "0.5908188", "0.5908098", "0.5907901", "0.58963674", "0.5893985", "0.58915424", "0.58835393", "0.58770055", "0.5873192", "0.58717334", "0.58479446", "0.58475256", "0.5847193", "0.5836428", "0.58304775", "0.5827252", "0.5821866", "0.5810678", "0.5807273", "0.57987136", "0.57928807" ]
0.0
-1
Test case number: 4 /Coverage entropy=1.8392967479776605
@Test(timeout = 4000) public void test004() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("d>%NV0"); Token token0 = xPathLexer0.operatorName(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.7291001", "0.7194097", "0.69760793", "0.69365597", "0.69271487", "0.68753576", "0.6842846", "0.6797397", "0.67826617", "0.67820877", "0.67637867", "0.6752587", "0.67441446", "0.67381567", "0.67352855", "0.6722002", "0.67164135", "0.66870683", "0.66806585", "0.66569906", "0.66567445", "0.6637107", "0.66163605", "0.6598047", "0.6591447", "0.65748346", "0.6566484", "0.65362823", "0.6530078", "0.6470057", "0.6459349", "0.64226323", "0.6417806", "0.64069736", "0.64053524", "0.6405227", "0.63977027", "0.63959986", "0.6393046", "0.6383086", "0.63822407", "0.6368885", "0.6363285", "0.6353258", "0.63500637", "0.6349168", "0.6341788", "0.6321646", "0.6320513", "0.63133043", "0.63037425", "0.6295648", "0.6291938", "0.62897646", "0.6277999", "0.6273016", "0.62555593", "0.62541133", "0.62467796", "0.62394154", "0.6239329", "0.62214655", "0.62113094", "0.6207395", "0.6204314", "0.6196507", "0.61906654", "0.6188458", "0.6186891", "0.6172737", "0.6170886", "0.6170642", "0.6168577", "0.61642647", "0.616243", "0.6155508", "0.6146622", "0.61314005", "0.6127823", "0.6126818", "0.6125379", "0.61163217", "0.61014736", "0.6079696", "0.6061503", "0.6048631", "0.60483485", "0.60298663", "0.6008373", "0.600818", "0.6002132", "0.59910977", "0.59836996", "0.5972853", "0.5971342", "0.59653074", "0.59512436", "0.59470487", "0.5945101", "0.5944437", "0.594285" ]
0.0
-1
Test case number: 5 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test005() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("sw"); Token token0 = xPathLexer0.div(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50B() {\n CuteNetlibCase.doTest(\"SC50B.SIF\", \"-7.0000000000E+01\", \"0.0\", NumberContext.of(7, 4));\n }", "@Override\n public int getGridCoverageCount() {\n return 1;\n }" ]
[ "0.7179665", "0.7025265", "0.70026296", "0.6856837", "0.68431187", "0.68369114", "0.672278", "0.6673255", "0.66580105", "0.66411144", "0.66380584", "0.6611617", "0.66083884", "0.65982985", "0.6562058", "0.6557331", "0.65487653", "0.654848", "0.65464944", "0.6504445", "0.64884096", "0.6462321", "0.64619505", "0.6456979", "0.64514905", "0.643489", "0.63923", "0.6389882", "0.63791704", "0.6373284", "0.6365061", "0.6292901", "0.6285532", "0.62716556", "0.62604207", "0.6256848", "0.6241461", "0.6240241", "0.62336606", "0.6227049", "0.6222322", "0.6214229", "0.6211412", "0.6205873", "0.6201174", "0.6199317", "0.61982036", "0.61962306", "0.61943233", "0.6186046", "0.61714673", "0.6149292", "0.61333424", "0.61318934", "0.61247647", "0.61078817", "0.60912794", "0.60884047", "0.6079327", "0.60658354", "0.60632306", "0.606063", "0.60561806", "0.60508996", "0.60474557", "0.60441685", "0.6042913", "0.6034956", "0.6031364", "0.60299194", "0.6029311", "0.60233223", "0.6022485", "0.60145503", "0.6004666", "0.60014033", "0.5991221", "0.59907746", "0.5987125", "0.5977082", "0.597108", "0.5970771", "0.5965012", "0.59475976", "0.59297556", "0.59296316", "0.5922955", "0.59229064", "0.59107065", "0.59070677", "0.5897196", "0.5887944", "0.58874744", "0.5885908", "0.5883343", "0.5865055", "0.58608097", "0.5855714", "0.58531135", "0.5851678", "0.5850439" ]
0.0
-1
Test case number: 6 /Coverage entropy=2.1972245773362196
@Test(timeout = 4000) public void test006() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("com.werken.saxpath.XPathLexer"); xPathLexer0.pipe(); Token token0 = xPathLexer0.mod(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }" ]
[ "0.7366458", "0.71867895", "0.6963806", "0.69347197", "0.69160265", "0.6881044", "0.685692", "0.6822152", "0.6803726", "0.6785171", "0.67543644", "0.6750229", "0.6741779", "0.67412716", "0.6740925", "0.67247415", "0.67033315", "0.67018867", "0.6689257", "0.6666602", "0.66171396", "0.66076225", "0.65972215", "0.6581763", "0.6571969", "0.6570923", "0.65482336", "0.6526192", "0.65077513", "0.6503617", "0.64981854", "0.6472207", "0.64490175", "0.6423305", "0.6419474", "0.64103186", "0.6391838", "0.63825846", "0.63717514", "0.63678634", "0.6363853", "0.63602346", "0.63539386", "0.63428956", "0.63404703", "0.6330415", "0.6326454", "0.632271", "0.6307056", "0.6305259", "0.6303238", "0.6296799", "0.62863857", "0.6272951", "0.6269358", "0.62669206", "0.6247874", "0.623089", "0.62293106", "0.62251806", "0.6208592", "0.6199519", "0.6194156", "0.6187319", "0.61871797", "0.61726916", "0.6162836", "0.6156178", "0.61507636", "0.614329", "0.61376935", "0.6127418", "0.61083555", "0.61010426", "0.60963625", "0.6086604", "0.60851526", "0.6082227", "0.6075987", "0.60684776", "0.60612464", "0.60568446", "0.6056229", "0.6045201", "0.6040192", "0.603015", "0.59949625", "0.5969777", "0.5964157", "0.5958954", "0.5952517", "0.59504586", "0.5949197", "0.5944091", "0.59410524", "0.59383607", "0.59309226", "0.59244204", "0.59222484", "0.5922229", "0.5920739" ]
0.0
-1
Test case number: 7 /Coverage entropy=0.4063317134016294
@Test(timeout = 4000) public void test007() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("!9'|l*JR"); Token token0 = xPathLexer0.nextToken(); assertEquals(23, token0.getTokenType()); assertEquals("!", token0.getTokenText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }" ]
[ "0.7272478", "0.71511346", "0.69727194", "0.68976384", "0.6890413", "0.6861112", "0.6839739", "0.6802072", "0.6797816", "0.6714282", "0.67111486", "0.67059094", "0.6696335", "0.6689855", "0.66764826", "0.66632533", "0.6655653", "0.66552323", "0.6636349", "0.6632494", "0.663172", "0.6577846", "0.6574895", "0.6555589", "0.65431297", "0.6537674", "0.6496005", "0.6470547", "0.6462578", "0.64545923", "0.644459", "0.64317256", "0.6408146", "0.6403279", "0.6385753", "0.63684714", "0.6355611", "0.63497543", "0.63497186", "0.63427436", "0.6341306", "0.63397855", "0.6338642", "0.63346034", "0.6332854", "0.63271034", "0.631265", "0.6309334", "0.63024443", "0.62957877", "0.6292625", "0.62915826", "0.62817204", "0.6275317", "0.6275268", "0.6258599", "0.62540877", "0.6251962", "0.62418705", "0.62385476", "0.6237036", "0.6201112", "0.62002474", "0.6192305", "0.61912566", "0.6189088", "0.61859626", "0.6181921", "0.61747295", "0.6172937", "0.61478823", "0.6135215", "0.61340636", "0.61304337", "0.61208284", "0.6118271", "0.6117814", "0.6116118", "0.6106844", "0.6106724", "0.6103768", "0.6099856", "0.60949254", "0.6091988", "0.60862356", "0.60852337", "0.6056038", "0.60557234", "0.6048029", "0.6046932", "0.6040479", "0.6034406", "0.60339826", "0.60271084", "0.602368", "0.60011995", "0.5991015", "0.59898", "0.5980367", "0.5966882", "0.5966117" ]
0.0
-1
Test case number: 8 /Coverage entropy=1.6094379124341005
@Test(timeout = 4000) public void test008() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("]("); boolean boolean0 = xPathLexer0.hasMoreChars(); assertTrue(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.7345718", "0.72034895", "0.701449", "0.68914884", "0.68828225", "0.688167", "0.68639195", "0.6830959", "0.6818972", "0.6805047", "0.68009984", "0.678562", "0.6781423", "0.6779211", "0.6775575", "0.6771418", "0.67645115", "0.6742239", "0.66849613", "0.6644751", "0.66364247", "0.66148883", "0.66114575", "0.65941894", "0.65887463", "0.6575355", "0.652837", "0.6514623", "0.6514054", "0.64591545", "0.64524007", "0.6449018", "0.6441057", "0.6422228", "0.6416519", "0.6414802", "0.6406425", "0.64063954", "0.64013445", "0.6397684", "0.63812417", "0.6381046", "0.6366583", "0.6364671", "0.63607854", "0.6355774", "0.6353355", "0.63490826", "0.6333401", "0.6332749", "0.63084173", "0.63010323", "0.6278233", "0.6273611", "0.6272494", "0.62708765", "0.626099", "0.62562", "0.62528086", "0.6250841", "0.62453896", "0.6241802", "0.6237081", "0.6235303", "0.6233365", "0.62022483", "0.6200272", "0.61829495", "0.6174559", "0.6161242", "0.6143069", "0.61385334", "0.6129387", "0.61256224", "0.6123321", "0.61155534", "0.6114192", "0.61070824", "0.6106985", "0.609809", "0.60856235", "0.6084482", "0.6082816", "0.60795057", "0.6076778", "0.60620266", "0.6061002", "0.6044743", "0.6031978", "0.6026848", "0.6023757", "0.6022117", "0.5995979", "0.5993525", "0.5988644", "0.5980011", "0.59731895", "0.59697455", "0.59550786", "0.59353256", "0.5919688" ]
0.0
-1
Test case number: 9 /Coverage entropy=1.3862943611198906
@Test(timeout = 4000) public void test009() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); boolean boolean0 = xPathLexer0.hasMoreChars(); assertFalse(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG3() {\n CuteNetlibCase.doTest(\"AGG3.SIF\", \"1.031211593508922E7\", \"5.746768863949547E9\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }" ]
[ "0.7369359", "0.7235029", "0.7059559", "0.68965816", "0.6865193", "0.68637544", "0.6860473", "0.6855827", "0.68550664", "0.6853515", "0.6836083", "0.6827736", "0.68238544", "0.6806306", "0.678349", "0.67814875", "0.67247593", "0.6708468", "0.6683497", "0.6673438", "0.6656983", "0.6651976", "0.6637124", "0.66330266", "0.66291815", "0.66183704", "0.6582927", "0.6552855", "0.65229607", "0.64927423", "0.64913356", "0.6452617", "0.6432576", "0.6427325", "0.642655", "0.64200974", "0.64168286", "0.6413582", "0.6398886", "0.639742", "0.6397", "0.63934964", "0.6390761", "0.63557255", "0.6355545", "0.635533", "0.6353256", "0.63528997", "0.6349012", "0.6337272", "0.6332579", "0.6325483", "0.63213086", "0.63172805", "0.63110995", "0.63019454", "0.63013744", "0.62926346", "0.6281691", "0.6281226", "0.6259612", "0.62574726", "0.62551916", "0.6238991", "0.62253267", "0.62133354", "0.61963916", "0.6191412", "0.6189256", "0.6189093", "0.61844623", "0.61704063", "0.61685807", "0.61659557", "0.61613035", "0.615686", "0.61521137", "0.61516076", "0.61416644", "0.6134893", "0.6107226", "0.61031115", "0.60891235", "0.60885495", "0.60859853", "0.6082731", "0.60757846", "0.6067361", "0.60660964", "0.60659325", "0.60520947", "0.60343283", "0.6032457", "0.6032132", "0.602668", "0.5996659", "0.5993323", "0.5991476", "0.5982878", "0.59822994", "0.5971755" ]
0.0
-1
Test case number: 10 /Coverage entropy=0.6931471805599453
@Test(timeout = 4000) public void test010() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); String string0 = xPathLexer0.getXPath(); assertNull(string0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n\tpublic void testExponentialSearch() {\n\t}", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.7567097", "0.73450804", "0.71759754", "0.70973235", "0.70782465", "0.70695484", "0.70550174", "0.70333576", "0.7007244", "0.7002522", "0.70021564", "0.69750047", "0.6954421", "0.6895716", "0.68672574", "0.6855078", "0.6852775", "0.6814908", "0.6808981", "0.67933226", "0.6792526", "0.6791627", "0.6791409", "0.67882", "0.66861093", "0.66661173", "0.6654544", "0.66509527", "0.6650265", "0.66429454", "0.66007733", "0.65990335", "0.6577876", "0.65625966", "0.6560601", "0.65331954", "0.65272117", "0.65263915", "0.65262216", "0.65259284", "0.6524956", "0.65220517", "0.65187216", "0.6518704", "0.65074724", "0.6504162", "0.6500453", "0.64896154", "0.6487673", "0.6481979", "0.6477505", "0.647671", "0.64654064", "0.64559096", "0.6450116", "0.6444715", "0.6443106", "0.6442023", "0.6431444", "0.64314246", "0.64284986", "0.6416704", "0.64084804", "0.64072883", "0.64053017", "0.6379784", "0.63718075", "0.6367041", "0.6354773", "0.6349004", "0.63486993", "0.63486356", "0.6347269", "0.6334892", "0.63303536", "0.63268906", "0.6292368", "0.6288487", "0.6277606", "0.626068", "0.62557256", "0.62332386", "0.62156135", "0.62101096", "0.6203419", "0.62023455", "0.619788", "0.61952484", "0.61920077", "0.6165336", "0.6161673", "0.61564386", "0.6152024", "0.6141219", "0.61384165", "0.6135003", "0.61192054", "0.611799", "0.6116631", "0.61106926", "0.6107957" ]
0.0
-1
Test case number: 11 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test011() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(") ("); String string0 = xPathLexer0.getXPath(); assertEquals(") (", string0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }" ]
[ "0.72771525", "0.71816677", "0.69215304", "0.68604136", "0.68266606", "0.68142945", "0.67750376", "0.6753409", "0.67357767", "0.6730368", "0.6719646", "0.6699645", "0.6695751", "0.66806006", "0.66718006", "0.6667282", "0.6653548", "0.665021", "0.66354054", "0.661484", "0.6586227", "0.65797055", "0.6533736", "0.6518135", "0.65179384", "0.64709306", "0.64527106", "0.645179", "0.64501464", "0.64071584", "0.639289", "0.6392796", "0.6383984", "0.63753366", "0.63675964", "0.6361853", "0.6345054", "0.6344007", "0.63377666", "0.6336593", "0.6332354", "0.6325555", "0.6324183", "0.6322072", "0.6317983", "0.6313259", "0.6300598", "0.62955695", "0.62939173", "0.62892675", "0.6281498", "0.6274375", "0.6273298", "0.6269354", "0.6268914", "0.62625736", "0.62538", "0.62467784", "0.62461835", "0.62319976", "0.62236524", "0.62220454", "0.6215015", "0.62085783", "0.6187043", "0.61846054", "0.61834204", "0.61680526", "0.61648345", "0.6163775", "0.616214", "0.61559504", "0.61504287", "0.6145538", "0.61352897", "0.61348325", "0.6133849", "0.61336124", "0.6125294", "0.6121006", "0.61108714", "0.6110286", "0.61075115", "0.60971314", "0.60882694", "0.60788214", "0.60762715", "0.60634655", "0.60600275", "0.6043992", "0.60412675", "0.60119957", "0.60084283", "0.59930146", "0.59903765", "0.598515", "0.59725386", "0.5965599", "0.5961464", "0.5958819", "0.59581345" ]
0.0
-1
Test case number: 12 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test012() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("hN!SM~8ux(wB"); Token token0 = xPathLexer0.getPreviousToken(); assertNull(token0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }" ]
[ "0.7219727", "0.7151422", "0.68738276", "0.68151736", "0.6805935", "0.679361", "0.6745564", "0.6736421", "0.6722296", "0.6692761", "0.66863453", "0.6680693", "0.66465217", "0.663203", "0.6629057", "0.6604544", "0.65950006", "0.6585972", "0.65812165", "0.6562149", "0.6556602", "0.654059", "0.6518117", "0.6517898", "0.651533", "0.6515326", "0.6512514", "0.6491041", "0.6478976", "0.6454625", "0.6419913", "0.64157575", "0.63968503", "0.638576", "0.63770586", "0.6374452", "0.6348088", "0.63468087", "0.63449514", "0.63364667", "0.6331045", "0.6326796", "0.6322975", "0.6312518", "0.631111", "0.62950313", "0.6294237", "0.629345", "0.6292564", "0.6289437", "0.6282578", "0.6277453", "0.62727624", "0.62672687", "0.6266266", "0.6248889", "0.6245567", "0.6243876", "0.6242979", "0.6240731", "0.62372386", "0.6230722", "0.62190306", "0.6214174", "0.62072676", "0.61912763", "0.61805266", "0.6172644", "0.61680275", "0.6162338", "0.6161892", "0.6158011", "0.6151377", "0.61503345", "0.6145945", "0.6139507", "0.61275166", "0.61274207", "0.611937", "0.61136806", "0.60945386", "0.608592", "0.60792756", "0.60736006", "0.6057322", "0.6047014", "0.6019076", "0.6016039", "0.60160154", "0.6015128", "0.6005444", "0.600324", "0.60020816", "0.59941584", "0.59933645", "0.5993013", "0.59916186", "0.5983567", "0.59789497", "0.59776783", "0.5975861" ]
0.0
-1
Test case number: 13 /Coverage entropy=0.4483113032721554
@Test(timeout = 4000) public void test013() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(":E<;"); xPathLexer0.nextToken(); Token token0 = xPathLexer0.getPreviousToken(); assertEquals(":", token0.getTokenText()); assertEquals(18, token0.getTokenType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.7365745", "0.7282181", "0.69134337", "0.68711495", "0.68572766", "0.6832549", "0.68266994", "0.6796538", "0.67940223", "0.6772752", "0.6761699", "0.67588574", "0.67545956", "0.67467797", "0.6742875", "0.671683", "0.6702449", "0.66738117", "0.66689986", "0.6663122", "0.6653164", "0.66345006", "0.6594803", "0.6585582", "0.65588236", "0.6546457", "0.65285385", "0.65236527", "0.6485281", "0.6462335", "0.64517283", "0.64358807", "0.6403924", "0.6401754", "0.63862437", "0.63815975", "0.6373615", "0.6369145", "0.6366806", "0.6364602", "0.6360137", "0.6354743", "0.6339617", "0.6338887", "0.6335764", "0.63151604", "0.63023466", "0.6296108", "0.62936294", "0.6291148", "0.6290527", "0.62896436", "0.6286174", "0.62808555", "0.62793154", "0.62751144", "0.6272954", "0.6254864", "0.6253649", "0.6252108", "0.62418276", "0.62304854", "0.6229838", "0.622114", "0.6214812", "0.6203857", "0.6196699", "0.6168282", "0.6159258", "0.61505914", "0.6137971", "0.61251736", "0.61111724", "0.61046016", "0.610307", "0.6102634", "0.60954493", "0.6094564", "0.6083519", "0.6068597", "0.60666466", "0.60653424", "0.60500044", "0.6048123", "0.60464615", "0.6033754", "0.60264695", "0.60199356", "0.60143524", "0.6011666", "0.60032094", "0.59943664", "0.59888554", "0.59824675", "0.59681284", "0.5966362", "0.5963479", "0.59531957", "0.5949708", "0.5948439", "0.5943171" ]
0.0
-1
Test case number: 14 /Coverage entropy=0.3955852454859713
@Test(timeout = 4000) public void test014() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.nextToken(); Token token0 = xPathLexer0.getPreviousToken(); assertEquals((-1), token0.getTokenType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test144() throws Throwable {\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n Vector<Integer> vector0 = new Vector<Integer>();\n resultMatrixSignificance0.m_HeaderKeys = vector0;\n vector0.add((Integer) 0);\n resultMatrixSignificance0.getDefaultMeanWidth();\n resultMatrixSignificance0.getRevision();\n int int0 = ResultMatrix.SIGNIFICANCE_TIE;\n int[] intArray0 = new int[3];\n intArray0[0] = 1;\n resultMatrixSignificance0.setCountWidth(1);\n intArray0[1] = 0;\n intArray0[2] = 0;\n resultMatrixSignificance0.m_RowOrder = intArray0;\n resultMatrixSignificance0.getSignificance(0, 322);\n int int1 = resultMatrixSignificance0.getSignificanceWidth();\n assertEquals(1, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(0, int1);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }" ]
[ "0.7392665", "0.7288997", "0.69342244", "0.6891989", "0.6890051", "0.6879727", "0.6875128", "0.68502665", "0.6833331", "0.6832569", "0.67867416", "0.6774423", "0.6772139", "0.6763994", "0.67459697", "0.67421204", "0.6701148", "0.66920733", "0.66870415", "0.66775763", "0.6672654", "0.6633411", "0.66073865", "0.6597048", "0.65921134", "0.6547643", "0.65326434", "0.65239066", "0.65010315", "0.6474828", "0.64685786", "0.6459309", "0.6457642", "0.6451405", "0.6427589", "0.6427418", "0.64074975", "0.6404266", "0.64038587", "0.64008534", "0.6397357", "0.63968414", "0.63759017", "0.6375445", "0.63733643", "0.63628805", "0.63504595", "0.63403237", "0.6338779", "0.6330469", "0.6317174", "0.63169914", "0.6312803", "0.6302594", "0.62890124", "0.6288824", "0.6288754", "0.62847483", "0.6282196", "0.6273833", "0.6266562", "0.6237489", "0.62304676", "0.6225661", "0.62222755", "0.6213808", "0.6198447", "0.61970073", "0.619264", "0.61748725", "0.61660504", "0.6151601", "0.6137434", "0.6135467", "0.61294526", "0.6118513", "0.6117377", "0.6114052", "0.6112761", "0.61098486", "0.61031723", "0.6091877", "0.60908866", "0.6084186", "0.6065445", "0.60631704", "0.60595155", "0.6043916", "0.6040673", "0.60393566", "0.6035103", "0.60183686", "0.6008405", "0.6003765", "0.59940106", "0.5989418", "0.59851116", "0.59736633", "0.5963924", "0.5960252", "0.5939142" ]
0.0
-1
Test case number: 15 /Coverage entropy=0.6931471805599453
@Test(timeout = 4000) public void test015() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); int int0 = xPathLexer0.endPosition(); assertEquals(0, int0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCSD6() {\n CuteNetlibCase.doTest(\"SCSD6.SIF\", \"50.5\", null, NumberContext.of(7, 4));\n }" ]
[ "0.74736", "0.7227721", "0.6997325", "0.6993632", "0.6974977", "0.689905", "0.68887687", "0.68839854", "0.6866607", "0.68602884", "0.6827302", "0.6800497", "0.6798588", "0.67781746", "0.6774074", "0.67499924", "0.6741185", "0.67365044", "0.673157", "0.6709973", "0.6691197", "0.66911465", "0.66710174", "0.6652425", "0.6637819", "0.65705544", "0.65153164", "0.65073144", "0.65064967", "0.6498119", "0.649535", "0.64880043", "0.6472716", "0.6468829", "0.64681506", "0.64529425", "0.64479566", "0.64412224", "0.6430217", "0.6424268", "0.64241457", "0.64178467", "0.6416031", "0.6405553", "0.6393926", "0.6386154", "0.6379515", "0.6377829", "0.63676214", "0.6359242", "0.63554734", "0.63532317", "0.6352722", "0.6345527", "0.6344627", "0.63326937", "0.633266", "0.6323564", "0.6318401", "0.63107675", "0.630452", "0.62984616", "0.629621", "0.62921906", "0.62888193", "0.62797993", "0.6276992", "0.62761027", "0.62750167", "0.62449455", "0.62291956", "0.62203246", "0.6205612", "0.6196955", "0.61887926", "0.6188472", "0.61867976", "0.61796165", "0.6179427", "0.615406", "0.6152739", "0.6150599", "0.6148963", "0.6148145", "0.6122753", "0.6119551", "0.6115533", "0.60938966", "0.60894126", "0.60834795", "0.6066664", "0.6062922", "0.6062084", "0.6056646", "0.6056186", "0.6054388", "0.605424", "0.604281", "0.6038502", "0.6020744", "0.60138273" ]
0.0
-1
Test case number: 16 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test016() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("com.werken.saxpath.XPathLexer"); int int0 = xPathLexer0.endPosition(); assertEquals(29, int0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.72779495", "0.71257114", "0.6760693", "0.67577547", "0.6723694", "0.6723019", "0.6703738", "0.66929823", "0.66496587", "0.6643051", "0.66171324", "0.66153353", "0.6611146", "0.6610661", "0.65945804", "0.65852493", "0.655812", "0.65457237", "0.65437806", "0.65368676", "0.6530561", "0.6502647", "0.64840126", "0.641997", "0.6393311", "0.638447", "0.6368094", "0.6366021", "0.6361756", "0.6346499", "0.63435876", "0.63215864", "0.6312319", "0.6312082", "0.6311229", "0.63058496", "0.6305817", "0.63009745", "0.62998027", "0.627857", "0.6268131", "0.6251501", "0.6250327", "0.6248627", "0.6245446", "0.6241452", "0.6229429", "0.62236816", "0.6218126", "0.6211892", "0.620854", "0.6208268", "0.62044775", "0.62002724", "0.61832595", "0.6172447", "0.6166723", "0.616291", "0.6156087", "0.61535096", "0.6150833", "0.61384207", "0.6135587", "0.6132239", "0.61312175", "0.61273897", "0.6113013", "0.61102146", "0.61090106", "0.6104962", "0.61046964", "0.6104165", "0.6100312", "0.6097456", "0.6089835", "0.60879993", "0.60793847", "0.60727", "0.60583776", "0.60575265", "0.6050837", "0.60414416", "0.6030965", "0.60208994", "0.60205513", "0.601865", "0.60104793", "0.60042787", "0.5989544", "0.5981833", "0.5979797", "0.5975349", "0.5967978", "0.594693", "0.5931534", "0.5929334", "0.5923266", "0.5915736", "0.59062684", "0.5902471", "0.59014666" ]
0.0
-1
Test case number: 17 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test017() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("Z&9#+FDLX&o2GJ-"); int int0 = xPathLexer0.currentPosition(); assertEquals(0, int0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.73416805", "0.71720827", "0.69430953", "0.68585944", "0.6846626", "0.6827924", "0.6813824", "0.6806762", "0.6793136", "0.6774289", "0.677075", "0.6753914", "0.6739338", "0.673392", "0.6720932", "0.67161584", "0.6704141", "0.6702898", "0.67000824", "0.6699905", "0.6680459", "0.66188127", "0.6595953", "0.65615964", "0.6559675", "0.6545", "0.6541224", "0.6531022", "0.65108746", "0.64968747", "0.64946944", "0.6478644", "0.6475293", "0.6451092", "0.6449102", "0.6439073", "0.64350504", "0.64266664", "0.6421028", "0.6413614", "0.64110476", "0.64097744", "0.64052165", "0.6397125", "0.63846695", "0.63799465", "0.6374082", "0.6369729", "0.6360148", "0.6350627", "0.6342545", "0.6337119", "0.63144267", "0.6312074", "0.6309125", "0.6308971", "0.6296982", "0.62871253", "0.6285029", "0.6284256", "0.6279368", "0.6278472", "0.62675166", "0.62584674", "0.6257066", "0.6255703", "0.62546235", "0.6247066", "0.624571", "0.6238915", "0.6235838", "0.6232252", "0.6226842", "0.6211082", "0.621053", "0.6200642", "0.6200277", "0.61995494", "0.61963856", "0.6191375", "0.6188097", "0.6180341", "0.61693037", "0.6162798", "0.61539674", "0.6148021", "0.6146607", "0.61427927", "0.6141464", "0.61287814", "0.61278397", "0.61199594", "0.6105609", "0.6097257", "0.60924387", "0.6088242", "0.60799706", "0.6076363", "0.6057295", "0.6056022", "0.6051819" ]
0.0
-1
Test case number: 18 /Coverage entropy=1.7917594692280547
@Test(timeout = 4000) public void test018() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("d>%NV0"); Token token0 = xPathLexer0.leftParen(); assertEquals(1, token0.getTokenType()); assertEquals("d", token0.getTokenText()); int int0 = xPathLexer0.currentPosition(); assertEquals(1, int0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.74265695", "0.7248527", "0.70466036", "0.696849", "0.69614786", "0.694291", "0.69211626", "0.6917288", "0.6905989", "0.68856555", "0.6882883", "0.6873102", "0.6869092", "0.68607074", "0.6826739", "0.68187624", "0.6808204", "0.67998284", "0.67768645", "0.67533827", "0.6746727", "0.6726", "0.67123705", "0.67069983", "0.6680977", "0.66664964", "0.6629315", "0.66157526", "0.6612873", "0.6588169", "0.6570882", "0.6568847", "0.6544595", "0.65407026", "0.6534128", "0.6533381", "0.6531674", "0.65297586", "0.6527681", "0.65215683", "0.65097773", "0.6475403", "0.64692426", "0.6468074", "0.64678025", "0.6466778", "0.64515346", "0.6443718", "0.6441568", "0.6422845", "0.641863", "0.64154166", "0.6414537", "0.641026", "0.64085925", "0.63988286", "0.63676304", "0.6364256", "0.63482726", "0.63481504", "0.6335917", "0.63339967", "0.6330432", "0.63274384", "0.63248175", "0.63245", "0.6322637", "0.6282035", "0.62634027", "0.62615335", "0.625764", "0.625248", "0.6252176", "0.6233631", "0.6231547", "0.622126", "0.62190163", "0.6218836", "0.62064916", "0.6206299", "0.6200362", "0.6196892", "0.61697257", "0.61587834", "0.6148175", "0.61390924", "0.6135799", "0.61286265", "0.61246353", "0.6100256", "0.6097761", "0.60917985", "0.6089145", "0.60876995", "0.6086627", "0.6057737", "0.60569733", "0.6056692", "0.6055704", "0.60329926", "0.6032065" ]
0.0
-1
Test case number: 19 /Coverage entropy=2.022808529414704
@Test(timeout = 4000) public void test019() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(">6_XdrPl"); Token token0 = xPathLexer0.relationalOperator(); assertNotNull(token0); assertEquals(">", token0.getTokenText()); assertEquals(9, token0.getTokenType()); Token token1 = xPathLexer0.rightParen(); assertEquals(2, token1.getTokenType()); assertEquals("6", token1.getTokenText()); char char0 = xPathLexer0.LA(0); assertEquals('6', char0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }" ]
[ "0.72733176", "0.7108433", "0.69953346", "0.69338197", "0.6917817", "0.68575495", "0.6830563", "0.6825206", "0.6817719", "0.6807882", "0.68023866", "0.67981243", "0.67598903", "0.67499393", "0.6747959", "0.67065567", "0.67050815", "0.668369", "0.6656159", "0.6646471", "0.6602703", "0.6576192", "0.65729123", "0.65722996", "0.6571131", "0.652387", "0.6513819", "0.6505647", "0.64963657", "0.6468209", "0.64658374", "0.6445248", "0.6435557", "0.64230496", "0.64156485", "0.64109725", "0.6379297", "0.6375598", "0.63585246", "0.63465405", "0.63451654", "0.6343254", "0.632866", "0.63261294", "0.6318913", "0.6315194", "0.62933654", "0.6290397", "0.6277621", "0.6270602", "0.62601495", "0.6250799", "0.6234453", "0.61987925", "0.6192313", "0.6190387", "0.6182492", "0.6180465", "0.61767226", "0.6173269", "0.6161379", "0.615551", "0.615536", "0.6153116", "0.61491966", "0.6132323", "0.61270016", "0.61250097", "0.61211985", "0.6120031", "0.6109377", "0.60904175", "0.6086554", "0.60841227", "0.60786885", "0.60628915", "0.60474396", "0.6041701", "0.6033626", "0.60307014", "0.60298467", "0.60167986", "0.6005653", "0.6005379", "0.5991558", "0.5961692", "0.5960314", "0.59549356", "0.5937009", "0.59337765", "0.5926957", "0.5919538", "0.5917215", "0.5911498", "0.5900987", "0.5889219", "0.588228", "0.5877912", "0.5873002", "0.5864378", "0.58429164" ]
0.0
-1
Test case number: 20 /Coverage entropy=2.031759218569271
@Test(timeout = 4000) public void test020() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(":_]J_/L!uFQ7%)BrL"); Token token0 = xPathLexer0.literal(); assertNull(token0); char char0 = xPathLexer0.LA((-1)); assertEquals('r', char0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.attributeIndicesTipText();\n assertEquals(\"Specify range of attributes to act on. This is a comma separated list of attribute indices, with \\\"first\\\" and \\\"last\\\" valid values. Specify an inclusive range with \\\"-\\\". E.g: \\\"first-3,5,6-10,last\\\".\", string0);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }" ]
[ "0.7420913", "0.71905285", "0.7043537", "0.70433784", "0.7010583", "0.69972515", "0.69735134", "0.69720304", "0.69450593", "0.68637687", "0.6835181", "0.6813785", "0.6810112", "0.68086755", "0.67985153", "0.67834795", "0.6766929", "0.67385125", "0.6714694", "0.6714151", "0.6707586", "0.67073107", "0.6695563", "0.6614383", "0.65982693", "0.6590856", "0.6586354", "0.65717405", "0.65583193", "0.6556286", "0.6547823", "0.65466225", "0.65407383", "0.65376985", "0.6507332", "0.648737", "0.6476583", "0.6475713", "0.64722633", "0.64699674", "0.6464053", "0.6448522", "0.6438317", "0.6430943", "0.643027", "0.64253706", "0.64246637", "0.64183956", "0.6411243", "0.6407232", "0.6406978", "0.6396318", "0.6392203", "0.6387126", "0.6383435", "0.63817513", "0.6374143", "0.6373225", "0.63714635", "0.63679403", "0.6364252", "0.63469255", "0.6333814", "0.6333464", "0.63228166", "0.6317562", "0.63006115", "0.6299573", "0.6292563", "0.62740856", "0.62699354", "0.62626743", "0.6262022", "0.62607235", "0.6250798", "0.62409806", "0.62230426", "0.62035304", "0.6202905", "0.61948043", "0.6193987", "0.61933243", "0.61698663", "0.6164818", "0.61462545", "0.6144233", "0.6141457", "0.6138962", "0.6119481", "0.6112633", "0.61096984", "0.61057824", "0.610095", "0.6093221", "0.60765576", "0.6071507", "0.6069313", "0.60689765", "0.60662776", "0.60641736", "0.6060703" ]
0.0
-1
Test case number: 21 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test021() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("qORCJu&0jq/h%IyKW"); xPathLexer0.setXPath(""); String string0 = xPathLexer0.getXPath(); assertEquals("", string0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n public void deltaBarICTest1() {\n String text = \"The basic idea of information theory is the more one knows about a topic, the less new information one \"\n + \"is apt to get about it. If an event is very probable, it is no surprise when it happens and thus provides little \"\n + \"new information. Inversely, if the event was improbable, it is much more informative that the event happened. \"\n + \"Therefore, the information content is an increasing function of the inverse of the probability of the event (1/p). \"\n + \"Now, if more events may happen, entropy measures the average information content you can expect to get if one of \"\n + \"the events actually happens. This implies that casting a die has more entropy than tossing a coin because each outcome \"\n + \"of the die has smaller probability than each outcome of the coin.Thus, entropy is a measure of unpredictability of the \"\n + \"state, or equivalently, of its average information content. To get an intuitive understanding of these terms, consider \"\n + \"the example of a political poll. Usually, such polls happen because the outcome of the poll is not already known. \"\n + \"In other words, the outcome of the poll is relatively unpredictable, and actually performing the poll and learning \"\n + \"the results gives some new information; these are just different ways of saying that the a priori entropy of the poll \"\n + \"results is large. Now, consider the case that the same poll is performed a second time shortly after the first poll. \"\n + \"Since the result of the first poll is already known, the outcome of the second poll can be predicted well and the \"\n + \"results should not contain much new information; in this case the a priori entropy of the second poll result is small \"\n + \"relative to that of the first.Now consider the example of a coin toss. Assuming the probability of heads is the same \"\n + \"as the probability of tails, then the entropy of the coin toss is as high as it could be. This is because there is no \"\n + \"way to predict the outcome of the coin toss ahead of time: if we have to choose, the best we can do is predict that the \"\n + \"coin will come up heads, and this prediction will be correct with probability 1/2. Such a coin toss has one bit of \"\n + \"entropy since there are two possible outcomes that occur with equal probability, and learning the actual outcome \"\n + \"contains one bit of information. In contrast, a coin toss using a coin that has two heads and no tails has zero \"\n + \"entropy since the coin will always come up heads, and the outcome can be predicted perfectly. Analogously, \"\n + \"one binary-outcome with equiprobable values has a Shannon entropy of log 2 ⁡ 2 = 1 \"\n + \"{\\\\displaystyle \\\\log _{2}2=1} \\\\log _{2}2=1 bit. Similarly, one trit with equiprobable values contains \"\n + \"log 2 ⁡ 3 {\\\\displaystyle \\\\log _{2}3} \\\\log _{2}3 (about 1.58496) bits of information because it can have \"\n + \"one of three values.English text, treated as a string of characters, has fairly low entropy, i.e., is fairly \"\n + \"predictable. Even if we do not know exactly what is going to come next, we can be fairly certain that, \"\n + \"for example, 'e' will be far more common than 'z', that the combination 'qu' will be much more common than \"\n + \"any other combination with a 'q' in it, and that the combination 'th' will be more common than 'z', 'q', or 'qu'. \"\n + \"After the first few letters one can often guess the rest of the word. English text has between 0.6 \"\n + \"and 1.3 bits of entropy per character of the message.\";\n\n assertEquals(1.7489797231, this.ic.deltaBarIC(text.toLowerCase()), 0.01);\n }" ]
[ "0.73107076", "0.713318", "0.700118", "0.6849362", "0.68267906", "0.6826238", "0.6825278", "0.6806913", "0.6804757", "0.6804198", "0.6787575", "0.67792755", "0.6755621", "0.6744369", "0.6742332", "0.6728058", "0.6703601", "0.6702059", "0.6661634", "0.6659569", "0.66309005", "0.6590572", "0.6586572", "0.65739876", "0.655909", "0.65487975", "0.65434945", "0.65361583", "0.6502725", "0.6490716", "0.64842874", "0.64526385", "0.64493173", "0.6438285", "0.64380544", "0.642238", "0.64086056", "0.6400374", "0.6398893", "0.6397341", "0.63924634", "0.6386127", "0.6374901", "0.6371055", "0.63702077", "0.63649714", "0.63585967", "0.6350796", "0.63429576", "0.6339047", "0.6333439", "0.633064", "0.6326969", "0.63229394", "0.6319523", "0.6319103", "0.63188124", "0.6317876", "0.6311233", "0.62840426", "0.6283761", "0.627752", "0.6272684", "0.626485", "0.6259311", "0.62542856", "0.6242408", "0.6236945", "0.62364846", "0.62253743", "0.6220551", "0.6219775", "0.62186503", "0.6213819", "0.6199855", "0.61997503", "0.6197039", "0.61942697", "0.61847425", "0.6182048", "0.6176779", "0.6142748", "0.61378765", "0.61219543", "0.6120868", "0.61174786", "0.60997534", "0.609498", "0.60555583", "0.6052638", "0.60358393", "0.6032031", "0.6024226", "0.60174936", "0.6014597", "0.60082734", "0.6004492", "0.59974223", "0.5990795", "0.5989058", "0.5981227" ]
0.0
-1
Test case number: 22 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test022() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("[ ("); xPathLexer0.setPreviousToken((Token) null); assertEquals("[ (", xPathLexer0.getXPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.73020464", "0.72149575", "0.69220763", "0.681606", "0.68160087", "0.67781615", "0.6773558", "0.6764663", "0.67372936", "0.67338", "0.671426", "0.6712453", "0.67084104", "0.67063254", "0.67035335", "0.66827923", "0.6665277", "0.66591877", "0.66589344", "0.6610869", "0.6606544", "0.6576475", "0.6518656", "0.6508882", "0.64904934", "0.648889", "0.6463527", "0.6457673", "0.64529455", "0.64430314", "0.64422995", "0.6436142", "0.6428157", "0.6406618", "0.6394864", "0.6394237", "0.6371557", "0.6367847", "0.63643676", "0.6356293", "0.63542324", "0.6345623", "0.63387835", "0.63360405", "0.6330265", "0.6322531", "0.63223064", "0.63190097", "0.63155454", "0.6313906", "0.63083696", "0.6306331", "0.62982476", "0.6282359", "0.6266457", "0.62598157", "0.6257173", "0.625333", "0.6248365", "0.6241085", "0.624055", "0.6240043", "0.62324727", "0.6231817", "0.6227552", "0.62182635", "0.6184821", "0.6184373", "0.6182571", "0.6182224", "0.61749476", "0.61558425", "0.6153673", "0.61516666", "0.6151585", "0.6151023", "0.6148806", "0.61444604", "0.6142189", "0.6138379", "0.6134822", "0.6133808", "0.6131768", "0.6119757", "0.61163586", "0.61145043", "0.6112285", "0.61120814", "0.61096066", "0.61095977", "0.60837054", "0.6058086", "0.60502625", "0.60418636", "0.6037116", "0.6035029", "0.6029518", "0.6016787", "0.60102093", "0.5988187", "0.59793615" ]
0.0
-1
Test case number: 23 /Coverage entropy=1.0397207708399179
@Test(timeout = 4000) public void test023() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("Z&9#+FDLX&o2GJ-"); boolean boolean0 = xPathLexer0.isIdentifierStartChar(']'); assertFalse(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.7329618", "0.71937203", "0.69777423", "0.6875025", "0.68441397", "0.6822753", "0.68149966", "0.6797749", "0.6780461", "0.6778162", "0.6767427", "0.6763882", "0.6743807", "0.6742609", "0.6739295", "0.6734186", "0.672747", "0.6723429", "0.66824013", "0.6667204", "0.66086066", "0.65963995", "0.6572377", "0.6569007", "0.65542483", "0.6553163", "0.651302", "0.6501078", "0.6493348", "0.6435734", "0.6418181", "0.6417228", "0.6415598", "0.6411944", "0.6407174", "0.6405215", "0.63907635", "0.63900065", "0.6387462", "0.63834417", "0.6378588", "0.6377201", "0.63762367", "0.63752824", "0.6362243", "0.6360095", "0.6358683", "0.6344545", "0.63354236", "0.6326634", "0.63203233", "0.6313622", "0.631179", "0.6298113", "0.6288577", "0.6284036", "0.6281483", "0.62796247", "0.6278559", "0.62783974", "0.62687075", "0.62675405", "0.6241701", "0.6224644", "0.6203032", "0.6190979", "0.61642754", "0.61619234", "0.6160922", "0.6153177", "0.6150678", "0.6144648", "0.61401784", "0.61364824", "0.6132114", "0.61267835", "0.61265504", "0.61254877", "0.6118526", "0.6115839", "0.6106117", "0.60953665", "0.60890603", "0.60880333", "0.6075729", "0.6075221", "0.60597354", "0.6059532", "0.60540885", "0.60478115", "0.6044287", "0.60439676", "0.603666", "0.6028344", "0.6016348", "0.5997931", "0.5978026", "0.5969063", "0.5966476", "0.5961884", "0.5958364" ]
0.0
-1
Test case number: 24 /Coverage entropy=1.0397207708399179
@Test(timeout = 4000) public void test024() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("zO=t1k%z["); boolean boolean0 = xPathLexer0.isIdentifierStartChar('1'); assertFalse(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }" ]
[ "0.7366296", "0.72404015", "0.6976215", "0.69100535", "0.69032747", "0.6899739", "0.68586326", "0.68545437", "0.68408066", "0.68220156", "0.6799754", "0.67997414", "0.6781595", "0.67712355", "0.6764916", "0.67349494", "0.67309296", "0.67036444", "0.6703621", "0.6689411", "0.66698164", "0.66553456", "0.6653027", "0.6602529", "0.6596349", "0.65775913", "0.65576756", "0.65491533", "0.6536134", "0.6517212", "0.65036505", "0.64850307", "0.64796054", "0.6468926", "0.64619184", "0.6439", "0.6431871", "0.64318526", "0.64286184", "0.6426993", "0.64242244", "0.6393532", "0.638195", "0.6380759", "0.6373882", "0.6373204", "0.63662547", "0.6361975", "0.63613784", "0.63574547", "0.6344084", "0.6341962", "0.63214225", "0.6296643", "0.62840295", "0.6279623", "0.62706786", "0.62693554", "0.62693", "0.62507594", "0.6221623", "0.62041473", "0.62000173", "0.61956036", "0.6195259", "0.6191649", "0.61838734", "0.6182348", "0.61746955", "0.61673665", "0.61628985", "0.6162616", "0.61543757", "0.6136973", "0.6136803", "0.6134169", "0.6117198", "0.6096259", "0.6093116", "0.6091888", "0.6086081", "0.6085547", "0.60818833", "0.6073633", "0.60705346", "0.60684127", "0.60651207", "0.606485", "0.60598665", "0.6035535", "0.6033818", "0.6023467", "0.6023134", "0.60066223", "0.5991811", "0.5958296", "0.59572613", "0.59511846", "0.59459835", "0.5940655", "0.59405994" ]
0.0
-1
Test case number: 25 /Coverage entropy=1.0397207708399179
@Test(timeout = 4000) public void test025() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("d>%NV0"); boolean boolean0 = xPathLexer0.isIdentifierStartChar('A'); assertTrue(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }" ]
[ "0.73800486", "0.7178986", "0.7048528", "0.6986841", "0.68936133", "0.6875953", "0.68151855", "0.6811682", "0.68116707", "0.6805172", "0.6792118", "0.67911613", "0.6782121", "0.6777539", "0.6745634", "0.6726797", "0.66888106", "0.6686851", "0.66629595", "0.6658712", "0.661903", "0.661359", "0.6605958", "0.6584154", "0.6571935", "0.6563156", "0.6528079", "0.65185237", "0.65102494", "0.650263", "0.6494333", "0.649082", "0.6490116", "0.6466843", "0.64484465", "0.6438917", "0.6420944", "0.6405539", "0.6387747", "0.63871974", "0.63862664", "0.63760585", "0.6375597", "0.63755965", "0.63745207", "0.6368506", "0.636751", "0.6352164", "0.6345339", "0.63410497", "0.6340584", "0.6339201", "0.6336177", "0.63354087", "0.63204396", "0.63158345", "0.63078445", "0.6305868", "0.62959754", "0.62737334", "0.62649655", "0.62507844", "0.6240174", "0.6222841", "0.622185", "0.6221567", "0.6218047", "0.62151307", "0.62136304", "0.6210777", "0.62035173", "0.6201694", "0.619584", "0.6195088", "0.61944366", "0.61822873", "0.6177697", "0.61757046", "0.61634904", "0.61537373", "0.61485595", "0.61479825", "0.6145426", "0.6144249", "0.61408275", "0.610395", "0.6099534", "0.6087235", "0.6082805", "0.60798365", "0.6070935", "0.6065838", "0.60572433", "0.60419935", "0.60365677", "0.6024225", "0.6016155", "0.6014694", "0.60126454", "0.6000845", "0.599501" ]
0.0
-1
Test case number: 26 /Coverage entropy=0.5623351446188083
@Test(timeout = 4000) public void test026() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); boolean boolean0 = xPathLexer0.isIdentifierChar('}'); assertFalse(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void chiSquaredTest2() {\n long[] occs = new long[26];\n occs[0] = 195;\n occs[1] = 51;\n occs[2] = 96;\n occs[3] = 51;\n occs[4] = 305;\n occs[5] = 72;\n occs[6] = 32;\n occs[7] = 130;\n occs[8] = 194;\n occs[9] = 1;\n occs[10] = 4;\n occs[11] = 119;\n occs[12] = 64;\n occs[13] = 183;\n occs[14] = 236;\n occs[15] = 72;\n occs[16] = 8;\n occs[17] = 130;\n occs[18] = 159;\n occs[19] = 269;\n occs[20] = 62;\n occs[21] = 24;\n occs[22] = 40;\n occs[23] = 8;\n occs[24] = 48;\n occs[25] = 3;\n int textLen = 2556;\n\n assertEquals(136.9908235901, this.ic.chiSquared(occs,\n this.freq.getExpectedLetterFrequencies(), textLen), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.7439069", "0.7293258", "0.69797516", "0.69356835", "0.68726456", "0.6856563", "0.6843898", "0.68359804", "0.68322814", "0.6789753", "0.6780738", "0.6775112", "0.67750806", "0.674166", "0.67324877", "0.67245483", "0.67029035", "0.669452", "0.6681969", "0.6675998", "0.66678935", "0.6623534", "0.6585082", "0.65840477", "0.65776557", "0.65760946", "0.6551977", "0.6550936", "0.65226", "0.65083253", "0.65006495", "0.64866334", "0.64840376", "0.6445758", "0.6442279", "0.6439222", "0.6404921", "0.6404157", "0.63955617", "0.6393599", "0.6391475", "0.6387947", "0.6366063", "0.6344775", "0.63405377", "0.63402355", "0.63358885", "0.6331222", "0.63278294", "0.63259506", "0.6325807", "0.6315494", "0.63130236", "0.62973434", "0.6294853", "0.6292951", "0.62748307", "0.6273218", "0.6262902", "0.6254458", "0.62405074", "0.62384737", "0.6207369", "0.6201458", "0.61999863", "0.61940104", "0.61855155", "0.61827415", "0.6179074", "0.61775535", "0.61771584", "0.6175638", "0.6159235", "0.61506486", "0.61490613", "0.61418885", "0.6135728", "0.6127102", "0.61263436", "0.6115596", "0.61113685", "0.61028534", "0.61006135", "0.60979354", "0.6096286", "0.6090351", "0.6070573", "0.60487187", "0.6044901", "0.60337126", "0.6020356", "0.60181475", "0.6012336", "0.60087216", "0.60059714", "0.59903014", "0.5987308", "0.59819466", "0.597487", "0.5974581", "0.5967475" ]
0.0
-1
Test case number: 27 /Coverage entropy=0.5623351446188083
@Test(timeout = 4000) public void test027() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); boolean boolean0 = xPathLexer0.isIdentifierChar('3'); assertTrue(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }" ]
[ "0.7460919", "0.7316496", "0.7082961", "0.6994046", "0.6986558", "0.6952991", "0.6930862", "0.6887539", "0.6886621", "0.6868667", "0.6868491", "0.6848666", "0.68454796", "0.6843338", "0.6825498", "0.6815634", "0.6813469", "0.6813456", "0.67932695", "0.6763586", "0.6733953", "0.6717738", "0.6712576", "0.6671654", "0.66565794", "0.66300714", "0.66156834", "0.66139865", "0.6582328", "0.6562397", "0.654867", "0.65341634", "0.6520769", "0.6507968", "0.6502527", "0.6498439", "0.64926684", "0.64734375", "0.6456372", "0.64537805", "0.64448655", "0.64362866", "0.64341944", "0.6433893", "0.6433763", "0.64319664", "0.6427905", "0.64204437", "0.64121425", "0.640166", "0.63953024", "0.63917065", "0.6390159", "0.6378949", "0.6369466", "0.6355974", "0.633836", "0.6325888", "0.6317263", "0.63076484", "0.6304351", "0.6292005", "0.6288786", "0.6284242", "0.62833977", "0.6268647", "0.62679017", "0.62578696", "0.6227697", "0.6219906", "0.61987287", "0.61985326", "0.6192014", "0.6190436", "0.61785585", "0.6177281", "0.61771464", "0.6173771", "0.6169464", "0.61670154", "0.61662483", "0.6159445", "0.61521536", "0.61487836", "0.6121625", "0.6114405", "0.6102814", "0.61001945", "0.6099428", "0.6093834", "0.609151", "0.60665977", "0.6065155", "0.6063787", "0.60588944", "0.6056885", "0.6048868", "0.6044986", "0.6039473", "0.6029952", "0.6015007" ]
0.0
-1
Test case number: 28 /Coverage entropy=0.9502705392332347
@Test(timeout = 4000) public void test028() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("&b/Xk]"); boolean boolean0 = xPathLexer0.isIdentifierChar('z'); assertTrue(boolean0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }" ]
[ "0.73673433", "0.7272251", "0.70347446", "0.70181733", "0.68907124", "0.6873023", "0.685634", "0.68489075", "0.6847852", "0.6842984", "0.6824205", "0.6797535", "0.67222875", "0.67170113", "0.6698397", "0.6694695", "0.6689843", "0.6682484", "0.6679808", "0.6672968", "0.6665341", "0.6644604", "0.6641381", "0.6638789", "0.66249317", "0.65983725", "0.656983", "0.6551771", "0.653184", "0.65008175", "0.6499139", "0.6463648", "0.645618", "0.6450159", "0.64443636", "0.6431599", "0.6423832", "0.64213055", "0.6417995", "0.6413024", "0.64115846", "0.6409061", "0.6404209", "0.6381944", "0.6342363", "0.6332252", "0.632924", "0.63261783", "0.63241374", "0.6316416", "0.6313998", "0.6297964", "0.6293705", "0.6291995", "0.624505", "0.6242573", "0.6241447", "0.62199783", "0.62163806", "0.6199481", "0.61881775", "0.6184258", "0.6174831", "0.61594844", "0.61514777", "0.61440045", "0.6140217", "0.61272717", "0.6119216", "0.611839", "0.6113882", "0.60855377", "0.60843843", "0.60761005", "0.60719025", "0.6050108", "0.6049872", "0.6049079", "0.6046218", "0.60451996", "0.60442495", "0.60390925", "0.60270274", "0.5994938", "0.5989773", "0.5985485", "0.59799224", "0.595492", "0.5948444", "0.59464014", "0.59376544", "0.5919143", "0.59156585", "0.5912611", "0.5910698", "0.5909106", "0.5904543", "0.58919", "0.5891177", "0.588363", "0.5877013" ]
0.0
-1
Test case number: 29 /Coverage entropy=0.6931471805599453
@Test(timeout = 4000) public void test029() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume(0); assertNull(xPathLexer0.getXPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedMatthewsCorrelation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances((String) null, arrayList0, 1);\n attribute0.enumerateValues();\n double[] doubleArray0 = new double[18];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n Discretize discretize0 = new Discretize();\n discretize0.setInputFormat(instances0);\n discretize0.setInputFormat(instances1);\n discretize0.batchFinished();\n System.setCurrentTimeMillis(2);\n Filter.useFilter(instances0, discretize0);\n Locale.getISOLanguages();\n discretize0.input(sparseInstance0);\n discretize0.batchFinished();\n // Undeclared exception!\n try { \n discretize0.findNumBins(102);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 102\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}" ]
[ "0.7423143", "0.7236803", "0.7175687", "0.7025669", "0.70142347", "0.69934595", "0.69794077", "0.69609755", "0.69452447", "0.69408387", "0.68870276", "0.6870218", "0.68625885", "0.6809592", "0.6797503", "0.67761177", "0.6774072", "0.6752933", "0.67508626", "0.67472136", "0.6721348", "0.66883683", "0.6688285", "0.66448826", "0.6632213", "0.6594099", "0.6566503", "0.6564438", "0.654927", "0.6543205", "0.6530186", "0.6528192", "0.649776", "0.6497123", "0.64879686", "0.64558715", "0.643921", "0.6438123", "0.6431638", "0.64258236", "0.64187604", "0.6411456", "0.6387549", "0.6377946", "0.63578594", "0.6351763", "0.6345437", "0.6337405", "0.63349545", "0.6330618", "0.63207066", "0.629365", "0.627555", "0.62633586", "0.6262274", "0.6261665", "0.6253484", "0.62292695", "0.62252325", "0.62248296", "0.62081176", "0.6206696", "0.61961824", "0.61868703", "0.61665255", "0.6159884", "0.6157027", "0.6148182", "0.6147543", "0.6132373", "0.6129849", "0.61217004", "0.6121678", "0.61164373", "0.61164016", "0.6108055", "0.6097441", "0.6090824", "0.60855395", "0.6032751", "0.60294724", "0.602699", "0.59984714", "0.59954417", "0.5995276", "0.5983131", "0.5983095", "0.5983043", "0.5974735", "0.5972237", "0.59685344", "0.5946516", "0.5945381", "0.5937242", "0.59360397", "0.59333843", "0.5918733", "0.59174275", "0.58916456", "0.5889486", "0.5880484" ]
0.0
-1
Test case number: 30 /Coverage entropy=1.7917594692280547
@Test(timeout = 4000) public void test030() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(""); // Undeclared exception! try { xPathLexer0.LA(0); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }" ]
[ "0.73573405", "0.7158661", "0.7022319", "0.7012989", "0.6972419", "0.69376945", "0.6901601", "0.68542475", "0.6841279", "0.6829524", "0.67957836", "0.6770959", "0.6757322", "0.67336345", "0.6726466", "0.6713278", "0.6704958", "0.6699671", "0.668937", "0.66707593", "0.6650796", "0.6645452", "0.6601143", "0.6574526", "0.65637445", "0.65376663", "0.6537449", "0.6536851", "0.65262264", "0.65112716", "0.65087026", "0.6489805", "0.6486567", "0.64815474", "0.647634", "0.64691395", "0.6439632", "0.64375424", "0.64361775", "0.64342403", "0.64269227", "0.64165914", "0.6412441", "0.6397795", "0.63874173", "0.6387325", "0.6376539", "0.63748944", "0.6344836", "0.6337418", "0.6336589", "0.6331241", "0.63160545", "0.6304229", "0.6298729", "0.6293176", "0.6293138", "0.62919223", "0.6275676", "0.6258929", "0.62578475", "0.6251273", "0.6250256", "0.62427646", "0.62124527", "0.6203", "0.62028056", "0.6196035", "0.6187919", "0.6186525", "0.61781275", "0.6174508", "0.6161386", "0.61548036", "0.61535203", "0.61529666", "0.61351764", "0.61324126", "0.6126433", "0.6101269", "0.60986865", "0.60918623", "0.6091211", "0.60825205", "0.60757273", "0.6071683", "0.60463303", "0.60352814", "0.6035179", "0.6024331", "0.6017865", "0.60076743", "0.6003097", "0.5981942", "0.5979996", "0.5978039", "0.5975456", "0.59712565", "0.5966527", "0.5965544", "0.5962407" ]
0.0
-1
Test case number: 31 /Coverage entropy=1.0986122886681096
@Test(timeout = 4000) public void test031() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); char char0 = xPathLexer0.LA(1073); assertEquals('\uFFFF', char0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "public p207() {\n double target = 1/12345.0;\n double log2 = Math.log(2);\n\n for (int x = 2; x < 2000000; x++){\n double a = Math.floor(Math.log(x) / log2) / (x-1);\n if (a < target){\n System.out.println(x*(x-1L));\n break;\n }\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test\n public void deltaBarICTest1() {\n String text = \"The basic idea of information theory is the more one knows about a topic, the less new information one \"\n + \"is apt to get about it. If an event is very probable, it is no surprise when it happens and thus provides little \"\n + \"new information. Inversely, if the event was improbable, it is much more informative that the event happened. \"\n + \"Therefore, the information content is an increasing function of the inverse of the probability of the event (1/p). \"\n + \"Now, if more events may happen, entropy measures the average information content you can expect to get if one of \"\n + \"the events actually happens. This implies that casting a die has more entropy than tossing a coin because each outcome \"\n + \"of the die has smaller probability than each outcome of the coin.Thus, entropy is a measure of unpredictability of the \"\n + \"state, or equivalently, of its average information content. To get an intuitive understanding of these terms, consider \"\n + \"the example of a political poll. Usually, such polls happen because the outcome of the poll is not already known. \"\n + \"In other words, the outcome of the poll is relatively unpredictable, and actually performing the poll and learning \"\n + \"the results gives some new information; these are just different ways of saying that the a priori entropy of the poll \"\n + \"results is large. Now, consider the case that the same poll is performed a second time shortly after the first poll. \"\n + \"Since the result of the first poll is already known, the outcome of the second poll can be predicted well and the \"\n + \"results should not contain much new information; in this case the a priori entropy of the second poll result is small \"\n + \"relative to that of the first.Now consider the example of a coin toss. Assuming the probability of heads is the same \"\n + \"as the probability of tails, then the entropy of the coin toss is as high as it could be. This is because there is no \"\n + \"way to predict the outcome of the coin toss ahead of time: if we have to choose, the best we can do is predict that the \"\n + \"coin will come up heads, and this prediction will be correct with probability 1/2. Such a coin toss has one bit of \"\n + \"entropy since there are two possible outcomes that occur with equal probability, and learning the actual outcome \"\n + \"contains one bit of information. In contrast, a coin toss using a coin that has two heads and no tails has zero \"\n + \"entropy since the coin will always come up heads, and the outcome can be predicted perfectly. Analogously, \"\n + \"one binary-outcome with equiprobable values has a Shannon entropy of log 2 ⁡ 2 = 1 \"\n + \"{\\\\displaystyle \\\\log _{2}2=1} \\\\log _{2}2=1 bit. Similarly, one trit with equiprobable values contains \"\n + \"log 2 ⁡ 3 {\\\\displaystyle \\\\log _{2}3} \\\\log _{2}3 (about 1.58496) bits of information because it can have \"\n + \"one of three values.English text, treated as a string of characters, has fairly low entropy, i.e., is fairly \"\n + \"predictable. Even if we do not know exactly what is going to come next, we can be fairly certain that, \"\n + \"for example, 'e' will be far more common than 'z', that the combination 'qu' will be much more common than \"\n + \"any other combination with a 'q' in it, and that the combination 'th' will be more common than 'z', 'q', or 'qu'. \"\n + \"After the first few letters one can often guess the rest of the word. English text has between 0.6 \"\n + \"and 1.3 bits of entropy per character of the message.\";\n\n assertEquals(1.7489797231, this.ic.deltaBarIC(text.toLowerCase()), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }" ]
[ "0.7206907", "0.7034198", "0.69555384", "0.67892975", "0.677454", "0.6766129", "0.67387486", "0.6737825", "0.67363673", "0.67334676", "0.6681871", "0.6670178", "0.66580755", "0.6657863", "0.6645177", "0.664156", "0.6604663", "0.658638", "0.65800524", "0.6538957", "0.6538294", "0.65265876", "0.65147316", "0.6510939", "0.64886075", "0.6445154", "0.64185923", "0.63589066", "0.63532704", "0.6319587", "0.6289726", "0.6271359", "0.62634206", "0.62573546", "0.6237498", "0.6234676", "0.6225759", "0.62210643", "0.62143695", "0.62112236", "0.62095726", "0.61889094", "0.6180875", "0.6159548", "0.6155786", "0.6147447", "0.6142686", "0.6142171", "0.61307216", "0.6128562", "0.6124976", "0.6122867", "0.6115542", "0.61042875", "0.61028045", "0.61025584", "0.61012644", "0.60952944", "0.60933083", "0.6082797", "0.6064458", "0.60612446", "0.6032127", "0.6023989", "0.6021485", "0.5976929", "0.5975958", "0.5975098", "0.59672165", "0.5965751", "0.5950509", "0.59433365", "0.5931243", "0.59297806", "0.59170413", "0.59168285", "0.5911664", "0.59068114", "0.58922607", "0.5891848", "0.58846915", "0.58842343", "0.58820087", "0.5878369", "0.58736295", "0.58627385", "0.5837368", "0.5811279", "0.5805831", "0.58053935", "0.57876676", "0.5782962", "0.5780871", "0.57730156", "0.5768382", "0.5763116", "0.57586026", "0.5755588", "0.5754331", "0.57483894", "0.57360727" ]
0.0
-1
Test case number: 32 /Coverage entropy=2.2718685126965625
@Test(timeout = 4000) public void test032() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("<"); xPathLexer0.consume((-1311)); // Undeclared exception! try { xPathLexer0.whitespace(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void chiSquaredTest2() {\n long[] occs = new long[26];\n occs[0] = 195;\n occs[1] = 51;\n occs[2] = 96;\n occs[3] = 51;\n occs[4] = 305;\n occs[5] = 72;\n occs[6] = 32;\n occs[7] = 130;\n occs[8] = 194;\n occs[9] = 1;\n occs[10] = 4;\n occs[11] = 119;\n occs[12] = 64;\n occs[13] = 183;\n occs[14] = 236;\n occs[15] = 72;\n occs[16] = 8;\n occs[17] = 130;\n occs[18] = 159;\n occs[19] = 269;\n occs[20] = 62;\n occs[21] = 24;\n occs[22] = 40;\n occs[23] = 8;\n occs[24] = 48;\n occs[25] = 3;\n int textLen = 2556;\n\n assertEquals(136.9908235901, this.ic.chiSquared(occs,\n this.freq.getExpectedLetterFrequencies(), textLen), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }", "@Test\n public void chiSquaredTest1() {\n long[] occs = new long[26];\n occs[0] = 43;\n occs[1] = 453;\n occs[2] = 42;\n occs[3] = 4;\n occs[4] = 1;\n occs[5] = 0;\n occs[6] = 27;\n occs[7] = 29;\n occs[8] = 301;\n occs[9] = 107;\n occs[10] = 79;\n occs[11] = 201;\n occs[12] = 3;\n occs[13] = 5;\n occs[14] = 82;\n occs[15] = 36;\n occs[16] = 47;\n occs[17] = 90;\n occs[18] = 68;\n occs[19] = 45;\n occs[20] = 9;\n occs[21] = 23;\n occs[22] = 42;\n occs[23] = 421;\n occs[24] = 26;\n occs[25] = 2;\n int textLen = 2186;\n assertEquals(64388.4292706625, this.ic.chiSquared(occs,\n this.freq.getExpectedLetterFrequencies(), textLen), 0.01);\n\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.7417877", "0.72150296", "0.6960698", "0.69114214", "0.68704396", "0.68665093", "0.6830909", "0.680531", "0.6782925", "0.67598915", "0.6735138", "0.6728564", "0.6722217", "0.6688941", "0.668104", "0.665549", "0.65759414", "0.6573961", "0.6573713", "0.6573355", "0.65692973", "0.65406287", "0.65377533", "0.65239453", "0.65072614", "0.6463501", "0.64610547", "0.6419444", "0.6409312", "0.63436997", "0.63423187", "0.6330288", "0.63281447", "0.63176364", "0.6293647", "0.628656", "0.6285536", "0.625922", "0.6234123", "0.62336314", "0.6210095", "0.62022567", "0.6193095", "0.6185982", "0.61698914", "0.6168792", "0.61667854", "0.6158529", "0.6157762", "0.6148584", "0.61310863", "0.61202866", "0.610767", "0.6099122", "0.6098819", "0.6089165", "0.60878927", "0.60820204", "0.6064139", "0.60626733", "0.60521907", "0.604917", "0.6046443", "0.6042348", "0.60359365", "0.6029377", "0.6027672", "0.6011326", "0.60084283", "0.5988372", "0.5988107", "0.59756315", "0.59710634", "0.59666693", "0.5962432", "0.5956033", "0.59489477", "0.59281796", "0.5890058", "0.58821535", "0.5870135", "0.5865729", "0.5865461", "0.5830707", "0.5828406", "0.58245677", "0.5822754", "0.5815104", "0.5810256", "0.58025014", "0.5797486", "0.57876533", "0.57854605", "0.577802", "0.57753414", "0.5772978", "0.577238", "0.57622266", "0.57586473", "0.5750799", "0.57442176" ]
0.0
-1
Test case number: 33 /Coverage entropy=2.1639556568820564
@Test(timeout = 4000) public void test033() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-3572)); // Undeclared exception! try { xPathLexer0.whitespace(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG3() {\n CuteNetlibCase.doTest(\"AGG3.SIF\", \"1.031211593508922E7\", \"5.746768863949547E9\", NumberContext.of(7, 4));\n }" ]
[ "0.73016244", "0.71785796", "0.701551", "0.6871254", "0.68401694", "0.68258303", "0.68214715", "0.6820613", "0.6789607", "0.6781485", "0.676859", "0.67529", "0.674725", "0.67471725", "0.674413", "0.6736866", "0.6715909", "0.670631", "0.6681525", "0.6668856", "0.66577953", "0.6657419", "0.6617396", "0.6607662", "0.65658414", "0.65628207", "0.65540606", "0.65319717", "0.6452467", "0.6434851", "0.64172715", "0.6410525", "0.6397526", "0.63773316", "0.63677675", "0.6367057", "0.63640547", "0.6340751", "0.6337076", "0.6329991", "0.632989", "0.63233733", "0.63203394", "0.63184804", "0.6305868", "0.6288152", "0.62874746", "0.62847996", "0.6281419", "0.62811124", "0.62621856", "0.6261499", "0.6247268", "0.6246406", "0.6242438", "0.6230189", "0.62080437", "0.6205295", "0.61930084", "0.6186446", "0.61860836", "0.6179559", "0.6178218", "0.6167766", "0.6160812", "0.6159187", "0.61573714", "0.6105543", "0.6101566", "0.6097795", "0.6076942", "0.60458577", "0.604126", "0.60138464", "0.6002727", "0.59928167", "0.5991961", "0.59813726", "0.59781176", "0.597199", "0.59597373", "0.59545976", "0.59510493", "0.5943885", "0.59397995", "0.5934284", "0.59324557", "0.59299624", "0.5924563", "0.59027135", "0.59004825", "0.58972406", "0.58940864", "0.5887874", "0.5868552", "0.5866698", "0.5861671", "0.58576894", "0.58487445", "0.58484364", "0.58444124" ]
0.0
-1
Test case number: 34 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test034() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-3572)); // Undeclared exception! try { xPathLexer0.slashes(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }" ]
[ "0.7357316", "0.7222703", "0.7041825", "0.6951721", "0.6938212", "0.689494", "0.6888827", "0.68721604", "0.6865252", "0.6857013", "0.68532914", "0.6816319", "0.6802424", "0.678941", "0.67639685", "0.6746206", "0.6744787", "0.67402875", "0.6732342", "0.6728569", "0.671765", "0.6697652", "0.66954", "0.66814", "0.66729146", "0.66345376", "0.6583461", "0.6545845", "0.65416217", "0.64911747", "0.6480143", "0.6476885", "0.64329904", "0.64269114", "0.64250153", "0.64246976", "0.6421499", "0.6412418", "0.64107627", "0.64027816", "0.6401703", "0.63855404", "0.6369022", "0.6368336", "0.636288", "0.6352737", "0.63409823", "0.63404465", "0.63383114", "0.63351595", "0.6321923", "0.62994915", "0.6296618", "0.6283425", "0.62760335", "0.62758106", "0.6262073", "0.6261123", "0.62411106", "0.6235712", "0.6223434", "0.6222028", "0.61790556", "0.6174274", "0.61665726", "0.6162948", "0.61274105", "0.6115565", "0.6085518", "0.60757", "0.60630935", "0.60600424", "0.60338515", "0.60221624", "0.601711", "0.60159063", "0.6012983", "0.60028356", "0.5998772", "0.59977543", "0.5986864", "0.59812534", "0.5977829", "0.5970131", "0.59672314", "0.5966322", "0.59660727", "0.5961083", "0.59492695", "0.59453684", "0.59430295", "0.59360284", "0.5933283", "0.593049", "0.59268594", "0.5926322", "0.59216714", "0.59167296", "0.59079605", "0.5893707", "0.58921635" ]
0.0
-1
Test case number: 35 /Coverage entropy=0.6931471805599453
@Test(timeout = 4000) public void test035() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); // Undeclared exception! try { xPathLexer0.setXPath((String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }" ]
[ "0.74974763", "0.7281045", "0.7147801", "0.71346444", "0.7056516", "0.7017714", "0.70102733", "0.70042205", "0.7002626", "0.6991774", "0.69848675", "0.69803286", "0.6959996", "0.6927615", "0.6909476", "0.68870485", "0.68794245", "0.68554366", "0.68548274", "0.679263", "0.6785073", "0.6765575", "0.672549", "0.67161894", "0.6696445", "0.66801494", "0.663899", "0.66178", "0.6612232", "0.6584281", "0.6572885", "0.65432346", "0.6531254", "0.65088344", "0.6507238", "0.6488977", "0.6479978", "0.6479469", "0.6463248", "0.64556676", "0.6446457", "0.6440853", "0.6437432", "0.6437065", "0.64031696", "0.6382081", "0.63792515", "0.63705474", "0.635511", "0.63529223", "0.6347182", "0.63449967", "0.6336998", "0.6326813", "0.6319125", "0.63010526", "0.6298262", "0.62876505", "0.62819207", "0.6271318", "0.6268963", "0.6259616", "0.62200934", "0.62194437", "0.6204562", "0.6184854", "0.6182811", "0.61763656", "0.61485523", "0.61323506", "0.61182743", "0.6115712", "0.61098427", "0.6100085", "0.60918593", "0.60900366", "0.60869414", "0.6073791", "0.6069104", "0.6048322", "0.6046941", "0.60348445", "0.60269684", "0.60206074", "0.60043347", "0.6001225", "0.5998009", "0.5995578", "0.5995215", "0.5994449", "0.5992968", "0.5989588", "0.5978752", "0.5977554", "0.597211", "0.59635246", "0.5956644", "0.59564906", "0.594926", "0.5940091", "0.5933672" ]
0.0
-1
Test case number: 36 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test036() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-91)); // Undeclared exception! try { xPathLexer0.relationalOperator(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n public void deltaBarICTest1() {\n String text = \"The basic idea of information theory is the more one knows about a topic, the less new information one \"\n + \"is apt to get about it. If an event is very probable, it is no surprise when it happens and thus provides little \"\n + \"new information. Inversely, if the event was improbable, it is much more informative that the event happened. \"\n + \"Therefore, the information content is an increasing function of the inverse of the probability of the event (1/p). \"\n + \"Now, if more events may happen, entropy measures the average information content you can expect to get if one of \"\n + \"the events actually happens. This implies that casting a die has more entropy than tossing a coin because each outcome \"\n + \"of the die has smaller probability than each outcome of the coin.Thus, entropy is a measure of unpredictability of the \"\n + \"state, or equivalently, of its average information content. To get an intuitive understanding of these terms, consider \"\n + \"the example of a political poll. Usually, such polls happen because the outcome of the poll is not already known. \"\n + \"In other words, the outcome of the poll is relatively unpredictable, and actually performing the poll and learning \"\n + \"the results gives some new information; these are just different ways of saying that the a priori entropy of the poll \"\n + \"results is large. Now, consider the case that the same poll is performed a second time shortly after the first poll. \"\n + \"Since the result of the first poll is already known, the outcome of the second poll can be predicted well and the \"\n + \"results should not contain much new information; in this case the a priori entropy of the second poll result is small \"\n + \"relative to that of the first.Now consider the example of a coin toss. Assuming the probability of heads is the same \"\n + \"as the probability of tails, then the entropy of the coin toss is as high as it could be. This is because there is no \"\n + \"way to predict the outcome of the coin toss ahead of time: if we have to choose, the best we can do is predict that the \"\n + \"coin will come up heads, and this prediction will be correct with probability 1/2. Such a coin toss has one bit of \"\n + \"entropy since there are two possible outcomes that occur with equal probability, and learning the actual outcome \"\n + \"contains one bit of information. In contrast, a coin toss using a coin that has two heads and no tails has zero \"\n + \"entropy since the coin will always come up heads, and the outcome can be predicted perfectly. Analogously, \"\n + \"one binary-outcome with equiprobable values has a Shannon entropy of log 2 ⁡ 2 = 1 \"\n + \"{\\\\displaystyle \\\\log _{2}2=1} \\\\log _{2}2=1 bit. Similarly, one trit with equiprobable values contains \"\n + \"log 2 ⁡ 3 {\\\\displaystyle \\\\log _{2}3} \\\\log _{2}3 (about 1.58496) bits of information because it can have \"\n + \"one of three values.English text, treated as a string of characters, has fairly low entropy, i.e., is fairly \"\n + \"predictable. Even if we do not know exactly what is going to come next, we can be fairly certain that, \"\n + \"for example, 'e' will be far more common than 'z', that the combination 'qu' will be much more common than \"\n + \"any other combination with a 'q' in it, and that the combination 'th' will be more common than 'z', 'q', or 'qu'. \"\n + \"After the first few letters one can often guess the rest of the word. English text has between 0.6 \"\n + \"and 1.3 bits of entropy per character of the message.\";\n\n assertEquals(1.7489797231, this.ic.deltaBarIC(text.toLowerCase()), 0.01);\n }" ]
[ "0.75003606", "0.7351776", "0.70869946", "0.7059385", "0.7051654", "0.7022435", "0.7005667", "0.6984458", "0.697418", "0.69467145", "0.69450724", "0.694344", "0.6933639", "0.6921382", "0.69128203", "0.686584", "0.68342686", "0.6834009", "0.68138987", "0.6773396", "0.6756915", "0.67485654", "0.6744906", "0.67278856", "0.6717891", "0.67011654", "0.66970724", "0.665337", "0.66032946", "0.6579867", "0.6569599", "0.65424347", "0.65321743", "0.65292436", "0.65222776", "0.6505635", "0.65041316", "0.65037984", "0.6503378", "0.650239", "0.6485259", "0.6471862", "0.64549613", "0.64469093", "0.64147496", "0.63784486", "0.63709307", "0.635789", "0.6354693", "0.63404024", "0.6336156", "0.6332188", "0.6322977", "0.6322658", "0.63160175", "0.6304482", "0.6297108", "0.62819916", "0.6277335", "0.6263008", "0.6236405", "0.6219903", "0.6194412", "0.61820036", "0.61680514", "0.6164688", "0.61547464", "0.6132559", "0.61298174", "0.6115875", "0.6111241", "0.6099426", "0.60964626", "0.60912627", "0.6080067", "0.6067324", "0.60655326", "0.6057631", "0.6023889", "0.6019563", "0.6007132", "0.60022056", "0.59848034", "0.598472", "0.59741634", "0.5970159", "0.5967669", "0.59659463", "0.5964929", "0.59639764", "0.59627485", "0.5962038", "0.5951038", "0.59421", "0.59329915", "0.59271896", "0.5903965", "0.58958846", "0.5892383", "0.5889273", "0.58858496" ]
0.0
-1
Test case number: 37 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test037() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("[Sdf yy*X>HdSr %<}"); xPathLexer0.consume((-1189)); // Undeclared exception! try { xPathLexer0.or(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }" ]
[ "0.7439303", "0.7299318", "0.70774746", "0.70563245", "0.6982963", "0.6974257", "0.6969972", "0.6962873", "0.69348943", "0.6920888", "0.69009906", "0.6895283", "0.68846", "0.6847107", "0.6833799", "0.6818429", "0.6811205", "0.68037695", "0.676031", "0.67459303", "0.6740714", "0.6732205", "0.6723096", "0.6722739", "0.67201096", "0.67143834", "0.66763884", "0.66066325", "0.66061765", "0.6595079", "0.65110946", "0.6505202", "0.6504322", "0.64930737", "0.64789176", "0.64702636", "0.6456352", "0.64540124", "0.64427817", "0.64372724", "0.64216644", "0.6420709", "0.64080375", "0.6391669", "0.63894117", "0.6387318", "0.63837296", "0.6365892", "0.63657975", "0.6358486", "0.63538903", "0.635227", "0.6341238", "0.63395375", "0.63276535", "0.632495", "0.63078123", "0.63034666", "0.6286949", "0.62860227", "0.62823224", "0.6269147", "0.6258362", "0.6256073", "0.6203212", "0.6177677", "0.616288", "0.61368257", "0.6114504", "0.6086676", "0.60819596", "0.607913", "0.6070415", "0.6063509", "0.60580444", "0.60461146", "0.6036065", "0.60258174", "0.6025759", "0.6012146", "0.6008028", "0.6004181", "0.6003231", "0.5982043", "0.5980829", "0.5977234", "0.5974877", "0.5969119", "0.59622556", "0.5955355", "0.5948475", "0.5945188", "0.5937173", "0.5933218", "0.5928921", "0.5927994", "0.59216523", "0.5911517", "0.59034395", "0.58887064", "0.58794415" ]
0.0
-1
Test case number: 38 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test038() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-2535)); // Undeclared exception! try { xPathLexer0.or(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }" ]
[ "0.7391054", "0.7225463", "0.7062261", "0.70534617", "0.7019792", "0.70058155", "0.6976073", "0.695002", "0.6947342", "0.690256", "0.6876788", "0.6868207", "0.6862065", "0.68575567", "0.6847389", "0.6842623", "0.6830686", "0.6800812", "0.6793789", "0.67434716", "0.6734262", "0.67267096", "0.67243326", "0.67104715", "0.67046005", "0.6648957", "0.664482", "0.6606741", "0.6584455", "0.65570384", "0.6555804", "0.65234435", "0.6508813", "0.65033644", "0.65025085", "0.64729226", "0.646376", "0.64575684", "0.64527446", "0.64508104", "0.64405435", "0.6430094", "0.64127415", "0.6405691", "0.6397302", "0.63965493", "0.63960904", "0.6387577", "0.6370001", "0.63603526", "0.6360227", "0.63442665", "0.633152", "0.62999517", "0.62889844", "0.62807274", "0.62710834", "0.6269235", "0.62648773", "0.62500334", "0.62369514", "0.6233471", "0.62213707", "0.6196994", "0.61719894", "0.6166542", "0.6131114", "0.61293846", "0.6124031", "0.61160177", "0.61076576", "0.60951", "0.60820043", "0.60623944", "0.6048457", "0.6047676", "0.6037893", "0.6029585", "0.6027702", "0.6014822", "0.6003269", "0.59934866", "0.59757966", "0.59728986", "0.5965757", "0.59622675", "0.5961115", "0.59567374", "0.59555256", "0.5952609", "0.5948178", "0.59433734", "0.5943289", "0.593811", "0.5929469", "0.59176815", "0.5916296", "0.5912506", "0.5905814", "0.590446", "0.58968055" ]
0.0
-1
Test case number: 39 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test039() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("[ ("); xPathLexer0.consume((-663)); // Undeclared exception! try { xPathLexer0.operatorName(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.73857933", "0.7216915", "0.70358795", "0.6982751", "0.6950932", "0.6941329", "0.6930603", "0.6923182", "0.68749017", "0.6869802", "0.68676287", "0.6842234", "0.6828703", "0.68269193", "0.6799602", "0.67903966", "0.6772774", "0.6756528", "0.67523885", "0.6727343", "0.6713915", "0.66887635", "0.6667303", "0.66546386", "0.66397625", "0.66369116", "0.6565202", "0.6556034", "0.65433025", "0.65239125", "0.650185", "0.64861697", "0.64777", "0.6442631", "0.644047", "0.6437967", "0.6425749", "0.64213836", "0.64210695", "0.6420388", "0.63954055", "0.6379955", "0.6371268", "0.6368987", "0.6357444", "0.6356923", "0.6348711", "0.6338353", "0.63370377", "0.63261914", "0.63261306", "0.63001865", "0.6282844", "0.6280169", "0.62739867", "0.62694687", "0.6252126", "0.6249709", "0.6245876", "0.62217796", "0.62010103", "0.6198182", "0.6187797", "0.6174341", "0.6173389", "0.6156099", "0.6153991", "0.6152232", "0.6128897", "0.6128415", "0.6102595", "0.6101522", "0.6087246", "0.6081125", "0.6078933", "0.6078874", "0.60737413", "0.6072558", "0.60708606", "0.60293865", "0.60206246", "0.6019075", "0.6018902", "0.6002315", "0.6001386", "0.5997993", "0.5995382", "0.59922415", "0.5975964", "0.59735984", "0.59691805", "0.5960134", "0.5942211", "0.59346217", "0.5930832", "0.5926724", "0.5926328", "0.5913066", "0.59114385", "0.5900244", "0.58961093" ]
0.0
-1
Test case number: 40 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test040() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("com.werken.saxpath.XPathLexer"); xPathLexer0.consume((-796)); // Undeclared exception! try { xPathLexer0.number(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.73514235", "0.71251196", "0.7029289", "0.69905674", "0.6958436", "0.6931662", "0.68841815", "0.68749106", "0.6826996", "0.68189573", "0.6793022", "0.6769548", "0.6764855", "0.67460966", "0.67346954", "0.6734594", "0.67162806", "0.6691644", "0.6679024", "0.66020465", "0.65851796", "0.6576297", "0.6556644", "0.6547472", "0.65272725", "0.6503558", "0.6493034", "0.6486357", "0.64741653", "0.64674944", "0.64375997", "0.6427893", "0.6400491", "0.639787", "0.63807166", "0.63663787", "0.6359876", "0.6359873", "0.6338536", "0.6334478", "0.63269025", "0.63239175", "0.63205254", "0.63171685", "0.6307918", "0.6288519", "0.62870085", "0.6286362", "0.62828225", "0.62806237", "0.6269573", "0.6264353", "0.6257309", "0.6229548", "0.6226884", "0.62255746", "0.6219605", "0.6215081", "0.6205907", "0.6195401", "0.6190692", "0.61754024", "0.61690587", "0.6153389", "0.61510015", "0.6130779", "0.6125445", "0.61246437", "0.612228", "0.6120954", "0.6110019", "0.61090237", "0.610579", "0.6091209", "0.6073623", "0.6070475", "0.60688746", "0.6066208", "0.6060038", "0.6056437", "0.6040849", "0.6038411", "0.60213566", "0.6012681", "0.60126555", "0.599612", "0.5987394", "0.5973031", "0.59696686", "0.59624505", "0.5950282", "0.5934921", "0.5930736", "0.5928835", "0.59250003", "0.5921377", "0.58954275", "0.58932245", "0.58892184", "0.588667", "0.5868947" ]
0.0
-1
Test case number: 41 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test041() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("com.werken.saxpath.XPathLexer"); xPathLexer0.consume((-2521)); // Undeclared exception! try { xPathLexer0.nextToken(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public static void main(String[] args) {\n\n\n\n int timeSteps = 2;\n int variables = 100;\n RandomGenerator rg = new RandomGenerator();\n rg.setSeed(System.currentTimeMillis());\n\n// Create many columns in a multidimensional array (2 rows by 100 columns),\n// where the next time step (row 2) copies the value of the column on the left\n// from the previous time step (row 1):\n int[][] twoDTimeSeries = new int[timeSteps][];\n twoDTimeSeries[0] = rg.generateRandomInts(variables, 2); //表示产生服从0-2均匀分布的100个随机数\n twoDTimeSeries[1] = new int[variables];\n twoDTimeSeries[1][0] = twoDTimeSeries[0][variables - 1];\n System.arraycopy(twoDTimeSeries[0], 0, twoDTimeSeries[1], 1, variables - 1);\n\n// Create a TE calculator and run it:\n TransferEntropyCalculatorDiscrete teCalc=\n new TransferEntropyCalculatorDiscrete(2, 1);\n teCalc.initialise();\n// Add observations of transfer across one cell to the right (j=1)\n// per time step:\n teCalc.addObservations(twoDTimeSeries, 1);\n\n double result2D = teCalc.computeAverageLocalOfObservations();\n System.out.printf(\"The result should be close to 1 bit here, \" +\n \"since we are executing copy operations of what is effectively \" +\n \"a random bit to each cell here: %.3f bits\\n\", result2D);\n\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.731225", "0.71517956", "0.69464004", "0.69152474", "0.6864693", "0.68573684", "0.68396336", "0.6832984", "0.6806807", "0.6799906", "0.6796874", "0.6774524", "0.6757184", "0.67198086", "0.6689242", "0.66798055", "0.667657", "0.6653683", "0.6649758", "0.6639835", "0.66105723", "0.6606828", "0.65620255", "0.6548537", "0.6539256", "0.65186363", "0.64810866", "0.64661396", "0.6423048", "0.64084554", "0.6363183", "0.6349242", "0.6344147", "0.63417715", "0.6333516", "0.63318884", "0.6302119", "0.6301876", "0.6299454", "0.6293758", "0.62869614", "0.62783957", "0.6274658", "0.62712497", "0.6262139", "0.6254648", "0.6252539", "0.62520444", "0.62458247", "0.6239277", "0.6237674", "0.6227625", "0.62128794", "0.6200885", "0.6198435", "0.61958444", "0.61831695", "0.61781245", "0.61760914", "0.6162481", "0.61509585", "0.614254", "0.6139913", "0.6134173", "0.6099102", "0.60945696", "0.60645866", "0.6057832", "0.60505986", "0.6049357", "0.60332763", "0.6032041", "0.6010024", "0.6005064", "0.60034424", "0.5996411", "0.59960246", "0.5995437", "0.5991941", "0.5990053", "0.59877497", "0.59699625", "0.59609056", "0.5957716", "0.5950135", "0.5941354", "0.59382594", "0.5938023", "0.5924459", "0.59032005", "0.58951366", "0.58895606", "0.58857", "0.5883765", "0.588131", "0.5876977", "0.5876871", "0.58751935", "0.58591914", "0.5857223", "0.58521265" ]
0.0
-1
Test case number: 42 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test042() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-4759)); // Undeclared exception! try { xPathLexer0.nextToken(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_18() {\n CuteNetlibCase.doTest(\"KEN-18.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testWOOD1P() {\n CuteNetlibCase.doTest(\"WOOD1P.SIF\", \"1.44290241157344\", \"9.99999999999964\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_D() {\n CuteNetlibCase.doTest(\"CRE-D.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }" ]
[ "0.7399133", "0.7225592", "0.69444644", "0.69158286", "0.688044", "0.68718743", "0.68718386", "0.6846492", "0.68218035", "0.6805855", "0.6760812", "0.6754457", "0.67395306", "0.67328435", "0.6727205", "0.67242885", "0.67094994", "0.67041236", "0.6698398", "0.6674786", "0.66682905", "0.6654049", "0.66446954", "0.66322833", "0.66284305", "0.6621145", "0.66030616", "0.65530413", "0.6550172", "0.6516502", "0.65104324", "0.65101475", "0.6508737", "0.64892596", "0.64773583", "0.64620656", "0.6462057", "0.6460453", "0.6457635", "0.64571667", "0.6449267", "0.6438347", "0.63980967", "0.6393704", "0.63864446", "0.6379068", "0.6368838", "0.63678855", "0.63673866", "0.6367317", "0.6367047", "0.6351138", "0.63454604", "0.6341186", "0.6335365", "0.6334096", "0.6333915", "0.63283926", "0.6315245", "0.6304595", "0.6304264", "0.6303316", "0.6297539", "0.62957525", "0.6294966", "0.6289624", "0.6284626", "0.62805545", "0.62783444", "0.6273397", "0.62707585", "0.6267408", "0.6259295", "0.6247911", "0.6245266", "0.62445164", "0.6240185", "0.6238366", "0.62367773", "0.62335974", "0.6229486", "0.6229398", "0.6224587", "0.6209195", "0.62085813", "0.6203111", "0.61913097", "0.61891866", "0.6184472", "0.618079", "0.6172574", "0.6168645", "0.6164174", "0.61557233", "0.61355287", "0.6117358", "0.6112002", "0.61107457", "0.6108923", "0.6108251", "0.6100564" ]
0.0
-1
Test case number: 43 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test043() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("F#VsZ=,K/"); xPathLexer0.consume((-3281)); // Undeclared exception! try { xPathLexer0.mod(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }" ]
[ "0.72534496", "0.71233517", "0.6954463", "0.69240606", "0.6848789", "0.6826214", "0.68129456", "0.68024945", "0.6790559", "0.67623824", "0.6745034", "0.67409045", "0.67376703", "0.67330736", "0.6728787", "0.6720357", "0.6705051", "0.6703527", "0.6683001", "0.66692555", "0.6660596", "0.66375804", "0.6572445", "0.65724105", "0.65460694", "0.65246534", "0.6485176", "0.64607453", "0.6455479", "0.64096963", "0.6396136", "0.63842696", "0.63825333", "0.6379575", "0.6373511", "0.6370588", "0.63654804", "0.6361872", "0.63537943", "0.6340504", "0.63368446", "0.63280016", "0.63267064", "0.6320586", "0.6319542", "0.63072026", "0.6303088", "0.63025653", "0.6291888", "0.62850827", "0.62826335", "0.6279676", "0.62776726", "0.6273018", "0.62607294", "0.6253973", "0.6230692", "0.62230915", "0.62130946", "0.62049353", "0.61929137", "0.6191123", "0.61875623", "0.61829114", "0.6160724", "0.6154759", "0.6152904", "0.61454624", "0.61345536", "0.6123792", "0.6117519", "0.6104733", "0.60809207", "0.60756403", "0.6063638", "0.6056093", "0.60438037", "0.60416055", "0.60344493", "0.6033852", "0.6032661", "0.603127", "0.60296553", "0.60270137", "0.60238093", "0.60113716", "0.59953815", "0.5989914", "0.598487", "0.5976169", "0.5970181", "0.59642285", "0.59546226", "0.59499186", "0.59416425", "0.5938867", "0.59373444", "0.5927159", "0.5915741", "0.59113663", "0.590991" ]
0.0
-1
Test case number: 44 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test044() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-863)); // Undeclared exception! try { xPathLexer0.mod(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }" ]
[ "0.7211339", "0.7154959", "0.6869758", "0.68577164", "0.6822561", "0.6808369", "0.6760561", "0.6751464", "0.6751245", "0.67357063", "0.6724888", "0.6713769", "0.67073005", "0.66990846", "0.6684505", "0.66792625", "0.6675933", "0.665164", "0.6644639", "0.663884", "0.6587001", "0.6570696", "0.6563717", "0.6562537", "0.6538943", "0.6533777", "0.6527547", "0.6504571", "0.6464905", "0.6432744", "0.6429025", "0.6424387", "0.6422533", "0.642014", "0.6387188", "0.63823307", "0.6381241", "0.6374924", "0.63705826", "0.6360172", "0.63600886", "0.6349913", "0.634173", "0.6332514", "0.6332103", "0.63277596", "0.63211405", "0.6311176", "0.6304841", "0.63040465", "0.6302519", "0.62972164", "0.627434", "0.6270546", "0.62705135", "0.6262904", "0.6241709", "0.621937", "0.6216258", "0.62074727", "0.61909086", "0.61902887", "0.61863625", "0.61760134", "0.6159786", "0.61433303", "0.6140581", "0.6114704", "0.61103827", "0.61062324", "0.6094094", "0.6088598", "0.6084479", "0.6068793", "0.6058807", "0.6054941", "0.60502946", "0.60406244", "0.6033874", "0.603252", "0.60269034", "0.6024319", "0.60217357", "0.60183436", "0.60145855", "0.6005076", "0.5989389", "0.5982922", "0.5981688", "0.59715307", "0.5968213", "0.59664875", "0.5960368", "0.59595025", "0.5949951", "0.5949532", "0.5945667", "0.59428096", "0.5920397", "0.5919996", "0.59196264" ]
0.0
-1
Test case number: 45 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test045() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer("hN!SM~8ux(wB"); xPathLexer0.consume((-1)); // Undeclared exception! try { xPathLexer0.literal(); fail("Expecting exception: StringIndexOutOfBoundsException"); } catch(StringIndexOutOfBoundsException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void testRulesetHighlife() {\n System.out.println(\"Highlife: B36/S23\");\n byte[][] highlife = { \n {0,0,0,0},\n {0,0,1,0},\n {0,1,1,0},\n {0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0},\n {0,1,1,0},\n {0,1,1,0},\n {0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"23\");\n byte[][] result = ng.calcNextGen(highlife);\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }" ]
[ "0.71960515", "0.7073087", "0.69002086", "0.6824983", "0.67850214", "0.67645705", "0.67444533", "0.66752934", "0.6662625", "0.6656003", "0.6640276", "0.6611567", "0.6608392", "0.65993994", "0.6599319", "0.6565999", "0.6560424", "0.65592414", "0.65531147", "0.6543652", "0.65379566", "0.6532951", "0.64775646", "0.64536226", "0.64373714", "0.6392627", "0.6375186", "0.6370814", "0.63596576", "0.6356655", "0.6333465", "0.6327325", "0.6321847", "0.6312879", "0.6303789", "0.6291643", "0.62879646", "0.6286025", "0.6280679", "0.627576", "0.6269894", "0.6262967", "0.6256759", "0.62508124", "0.6215921", "0.62114924", "0.62105304", "0.6203793", "0.6196727", "0.61930245", "0.61884576", "0.6188404", "0.6173943", "0.6168856", "0.616518", "0.61508137", "0.61496997", "0.6148672", "0.61439854", "0.6140326", "0.613845", "0.613027", "0.61200047", "0.61142033", "0.6113767", "0.611112", "0.61090827", "0.6095673", "0.60765946", "0.60682803", "0.6058982", "0.60589296", "0.6044423", "0.6042902", "0.6042869", "0.6038049", "0.60365385", "0.60268664", "0.60181206", "0.6017878", "0.60096884", "0.6003916", "0.6001392", "0.6001119", "0.6001009", "0.5990832", "0.59903806", "0.5988445", "0.5981802", "0.59804744", "0.5973441", "0.59723365", "0.5969905", "0.5962967", "0.5924323", "0.5924191", "0.5920875", "0.5920078", "0.5914139", "0.59138376", "0.5910073" ]
0.0
-1
Test case number: 46 /Coverage entropy=1.945910149055313
@Test(timeout = 4000) public void test046() throws Throwable { XPathLexer xPathLexer0 = new XPathLexer(); xPathLexer0.consume((-2568)); // Undeclared exception! try { xPathLexer0.literal(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.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(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }" ]
[ "0.7304202", "0.7160091", "0.6989217", "0.6935542", "0.68930715", "0.6864995", "0.6826209", "0.68048656", "0.680415", "0.68000865", "0.67791665", "0.6770209", "0.6759161", "0.6756402", "0.6734161", "0.6726059", "0.6717321", "0.67112577", "0.66991615", "0.6676969", "0.6651634", "0.66504884", "0.6641807", "0.66345745", "0.65890205", "0.65575397", "0.65418106", "0.6539721", "0.64935464", "0.64796674", "0.6471924", "0.64523315", "0.6429401", "0.64143676", "0.63839436", "0.63808256", "0.6376623", "0.6370631", "0.6366603", "0.63634604", "0.6361687", "0.6358035", "0.63466674", "0.6321177", "0.6319997", "0.631954", "0.63177913", "0.6314684", "0.6305954", "0.62966824", "0.62881553", "0.628564", "0.62830114", "0.62735265", "0.6271941", "0.62675935", "0.6263389", "0.6247809", "0.62469953", "0.6242316", "0.6239113", "0.62320316", "0.6221071", "0.6219", "0.6196638", "0.61887515", "0.6162084", "0.6155164", "0.6130099", "0.6107729", "0.6096288", "0.60951", "0.6090707", "0.6061309", "0.60593253", "0.60580087", "0.60575086", "0.60562545", "0.60558486", "0.60519177", "0.60367423", "0.6032817", "0.6032786", "0.6020043", "0.60155964", "0.60090756", "0.60058177", "0.59928936", "0.5988813", "0.5973776", "0.59608114", "0.59426343", "0.59422857", "0.59383833", "0.59355", "0.59266967", "0.5915654", "0.59155816", "0.59145796", "0.59113556", "0.5910305" ]
0.0
-1