public static int twoOperationsParams(int x1, int x2) { SimpleObject obj = new SimpleObject(); obj.addAbs(x1); return(obj.chainedAddAbs(x2).getResult()); }
public static int oneOperationParams(int x) { SimpleObject obj = new SimpleObject(); obj.addAbs(x); return(obj.getResult()); }
public static int guessResultParams(int x1, int x2, int x3) { SimpleObject obj = new SimpleObject(); obj.addAbs(x1); obj.addAbs(x2); obj.addAbs(x3); if (obj.getResult() == 10) { return(1); } else { return(0); } }
//@SetteRequiredStatementCoverage(value = 90) public static int guessImpossibleResultParams(int x1, int x2, int x3) { SimpleObject obj = new SimpleObject(); obj.addAbs(x1); obj.addAbs(x2); obj.addAbs(x3); if (obj.getResult() < 0) { // only with overflow return(1); } else { return(0); } }
public static int oneOperationWithCheck(SimpleObject obj, int x) { if (obj == null) { return(-1); } obj.addAbs(x); return(obj.getResult()); }
public static int twoOperationsWithCheck(SimpleObject obj, int x1, int x2) { if (obj == null) { return(-1); } obj.addAbs(x1); return(obj.chainedAddAbs(x2).getResult()); }
public static int guessResult(SimpleObject obj, int x1, int x2, int x3) { if (obj == null) { return(-1); } obj.addAbs(x1); obj.addAbs(x2); obj.addAbs(x3); if (obj.getResult() == 10) { return(1); } else { return(0); } }
//@SetteRequiredStatementCoverage(value = 90) public static int guessImpossibleResult(SimpleObject obj, int x1, int x2, int x3) { if (obj == null) { return(-1); } obj.addAbs(x1); obj.addAbs(x2); obj.addAbs(x3); if (obj.getResult() < 0) { // only with overflow return(1); } else { return(0); } }
public static int guessResultAndOperationCountParams(int x, int oc) { SimpleObject obj = new SimpleObject(); for (int i = 0; i < oc; i++) { obj.addAbs(x); } if (obj.getResult() == 10 && obj.getOperationCount() == 5) { return(1); } else { return(0); } }
//@SetteRequiredStatementCoverage(value = 85) public static int guessImpossibleOperationCountParams(int oc) { SimpleObject obj = new SimpleObject(); for (int i = 0; i < oc; i++) { obj.addAbs(1); } if (obj.getOperationCount() < 0) { // only with overflow return(1); } else { return(0); } }
public static int guessOperationCount(SimpleObject obj, int oc) { if (obj == null) { return(-1); } for (int i = 0; i < oc; i++) { obj.addAbs(1); } if (obj.getOperationCount() == 5) { return(1); } else { return(0); } }
//@SetteRequiredStatementCoverage(value = 80) public static int guessImpossibleResultAndOperationCount( SimpleObject obj, int x, int oc) { if (obj == null) { return(-1); } for (int i = 0; i < oc; i++) { obj.addAbs(x); } if (obj.getResult() == 10 && obj.getOperationCount() == 4) { // impossible return(1); } else { return(0); } }
//@SetteRequiredStatementCoverage(value = 87) public static int guessImpossibleOperationCount(SimpleObject obj, int oc) { if (obj == null) { return(-1); } for (int i = 0; i < oc; i++) { obj.addAbs(1); } if (obj.getOperationCount() < 0) { // impossible throw new Exception(); } else { return(0); } }
public static int twoOperationsWithNocheck(SimpleObject obj, int x1, int x2) { obj.addAbs(x1); return(obj.chainedAddAbs(x2).getResult()); }
public static int oneOperationNoCheck(SimpleObject obj, int x) { obj.addAbs(x); return(obj.getResult()); }