Program: 133268
Project: 133268
Buggy source:
private Expression[] arithOpExpr(LocalOpcode op,ArrayList<Expression> argExpr){
switch (op) {
case PLUS_INT:
case PLUS_FLOAT:
case MINUS_INT:
case MINUS_FLOAT:
case MULT_INT:
case MULT_FLOAT:
case DIV_FLOAT:
case POW_FLOAT:
case EQ_INT:
case NEQ_INT:
case LT_INT:
case LTE_INT:
case GT_INT:
case GTE_INT:
case LT_FLOAT:
case LTE_FLOAT:
case GT_FLOAT:
case GTE_FLOAT:
case EQ_FLOAT:
case NEQ_FLOAT:
case EQ_BOOL:
case NEQ_BOOL:
case EQ_STRING:
case NEQ_STRING:
case AND:
case OR:
    assert(argExpr.size() == 2);
  return new Expression[]{argExpr.get(0),arithOpTok(op),argExpr.get(1)};
case NOT:
case NEGATE_INT:
case NEGATE_FLOAT:
assert(argExpr.size() == 1);
return new Expression[]{arithOpTok(op),argExpr.get(0)};
case IS_NAN:
assert(argExpr.size() == 1);
return new Expression[]{argExpr.get(0),new Token("String_Node_Str"),argExpr.get(0)};
case CEIL:
case FLOOR:
case ROUND:
case LOG:
case EXP:
case SQRT:
case ABS_FLOAT:
case ABS_INT:
return new Expression[]{arithOpTok(op),new Token("String_Node_Str"),argExpr.get(0),new Token("String_Node_Str")};
case RANDOM:
return new Expression[]{arithOpTok(op),new Token("String_Node_Str")};
case INTTOFLOAT:
assert(argExpr.size() == 1);
return new Expression[]{argExpr.get(0)};
case MAX_FLOAT:
case MAX_INT:
case MIN_FLOAT:
case MIN_INT:
String fnName;
if (op == LocalOpcode.MAX_FLOAT || op == LocalOpcode.MAX_INT) {
fnName="String_Node_Str";
}
 else {
fnName="String_Node_Str";
}
return new Expression[]{new Token(fnName),new Token("String_Node_Str"),argExpr.get(0),new Token("String_Node_Str"),argExpr.get(1),new Token("String_Node_Str")};
default :
throw new ParserRuntimeException("String_Node_Str" + "String_Node_Str" + op.toString());
}
}

Fixed version (ground truth):
private Expression[] arithOpExpr(LocalOpcode op,ArrayList<Expression> argExpr){
switch (op) {
case PLUS_INT:
case PLUS_FLOAT:
case MINUS_INT:
case MINUS_FLOAT:
case MULT_INT:
case MULT_FLOAT:
case DIV_FLOAT:
case POW_FLOAT:
case EQ_INT:
case NEQ_INT:
case LT_INT:
case LTE_INT:
case GT_INT:
case GTE_INT:
case LT_FLOAT:
case LTE_FLOAT:
case GT_FLOAT:
case GTE_FLOAT:
case EQ_FLOAT:
case NEQ_FLOAT:
case EQ_BOOL:
case NEQ_BOOL:
case EQ_STRING:
case NEQ_STRING:
case AND:
case OR:
    assert(argExpr.size() == 2);
  return new Expression[]{argExpr.get(0),arithOpTok(op),argExpr.get(1)};
case NOT:
case NEGATE_INT:
case NEGATE_FLOAT:
assert(argExpr.size() == 1);
return new Expression[]{arithOpTok(op),argExpr.get(0)};
case IS_NAN:
assert(argExpr.size() == 1);
return new Expression[]{argExpr.get(0),new Token("String_Node_Str"),argExpr.get(0)};
case LOG:
case EXP:
case SQRT:
case ABS_FLOAT:
case ABS_INT:
return new Expression[]{arithOpTok(op),new Token("String_Node_Str"),argExpr.get(0),new Token("String_Node_Str")};
case RANDOM:
return new Expression[]{arithOpTok(op),new Token("String_Node_Str")};
case INTTOFLOAT:
assert(argExpr.size() == 1);
return new Expression[]{new Token("String_Node_Str"),argExpr.get(0),new Token("String_Node_Str")};
case CEIL:
case FLOOR:
case ROUND:
{
String fname;
assert(argExpr.size() == 1);
switch (op) {
case CEIL:
fname="String_Node_Str";
break;
case FLOOR:
fname="String_Node_Str";
break;
case ROUND:
fname="String_Node_Str";
break;
default :
throw new STCRuntimeError("String_Node_Str");
}
return new Expression[]{new Token("String_Node_Str" + fname + "String_Node_Str"),argExpr.get(0),new Token("String_Node_Str")};
}
case MAX_FLOAT:
case MAX_INT:
case MIN_FLOAT:
case MIN_INT:
String fnName;
if (op == LocalOpcode.MAX_FLOAT || op == LocalOpcode.MAX_INT) {
fnName="String_Node_Str";
}
 else {
fnName="String_Node_Str";
}
return new Expression[]{new Token(fnName),new Token("String_Node_Str"),argExpr.get(0),new Token("String_Node_Str"),argExpr.get(1),new Token("String_Node_Str")};
default :
throw new ParserRuntimeException("String_Node_Str" + "String_Node_Str" + op.toString());
}
}