Program: 54655
Project: 54655
Buggy source:
public String toJava(int indent){
  if (functype <= FUNCTION_USHR) {
    return wrapOperandString(lstOperands.get(0),false,indent) + operators[functype] + wrapOperandString(lstOperands.get(1),true,indent);
  }
  if (functype >= FUNCTION_EQ) {
    return wrapOperandString(lstOperands.get(0),false,indent) + operators[functype - FUNCTION_EQ + 11] + wrapOperandString(lstOperands.get(1),true,indent);
  }
switch (functype) {
case FUNCTION_BITNOT:
    return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_BOOLNOT:
  return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_NEG:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_CAST:
return "String_Node_Str" + lstOperands.get(1).toJava(indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_ARRAYLENGTH:
Exprent arr=lstOperands.get(0);
String res=wrapOperandString(arr,false,indent);
if (arr.getExprType().arraydim == 0) {
VarType objarr=VarType.VARTYPE_OBJECT.copy();
objarr.arraydim=1;
res="String_Node_Str" + ExprProcessor.getCastTypeName(objarr) + "String_Node_Str"+ res+ "String_Node_Str";
}
return res + "String_Node_Str";
case FUNCTION_IIF:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str" + wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str"+ wrapOperandString(lstOperands.get(2),true,indent);
case FUNCTION_IPP:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str";
case FUNCTION_PPI:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_IMM:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str";
case FUNCTION_MMI:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_INSTANCEOF:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str" + wrapOperandString(lstOperands.get(1),true,indent);
}
if (functype <= FUNCTION_I2S) {
return "String_Node_Str" + ExprProcessor.getTypeName(types[functype - FUNCTION_I2L]) + "String_Node_Str"+ wrapOperandString(lstOperands.get(0),true,indent);
}
throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
public String toJava(int indent){
  if (functype <= FUNCTION_USHR) {
    return wrapOperandString(lstOperands.get(0),false,indent) + operators[functype] + wrapOperandString(lstOperands.get(1),true,indent);
  }
  if (functype >= FUNCTION_EQ) {
    return wrapOperandString(lstOperands.get(0),false,indent) + operators[functype - FUNCTION_EQ + 11] + wrapOperandString(lstOperands.get(1),true,indent);
  }
switch (functype) {
case FUNCTION_BITNOT:
    return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_BOOLNOT:
  return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_NEG:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_CAST:
return "String_Node_Str" + lstOperands.get(1).toJava(indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_ARRAYLENGTH:
Exprent arr=lstOperands.get(0);
String res=wrapOperandString(arr,false,indent);
if (arr.getExprType().arraydim == 0) {
VarType objarr=VarType.VARTYPE_OBJECT.copy();
objarr.arraydim=1;
res="String_Node_Str" + ExprProcessor.getCastTypeName(objarr) + "String_Node_Str"+ res+ "String_Node_Str";
}
return res + "String_Node_Str";
case FUNCTION_IIF:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str" + wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str"+ wrapOperandString(lstOperands.get(2),true,indent);
case FUNCTION_IPP:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str";
case FUNCTION_PPI:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_IMM:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str";
case FUNCTION_MMI:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent);
case FUNCTION_INSTANCEOF:
return wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str" + wrapOperandString(lstOperands.get(1),true,indent);
case FUNCTION_LCMP:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str";
case FUNCTION_FCMPL:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str";
case FUNCTION_FCMPG:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str";
case FUNCTION_DCMPL:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str";
case FUNCTION_DCMPG:
return "String_Node_Str" + wrapOperandString(lstOperands.get(0),true,indent) + "String_Node_Str"+ wrapOperandString(lstOperands.get(1),true,indent)+ "String_Node_Str";
}
if (functype <= FUNCTION_I2S) {
return "String_Node_Str" + ExprProcessor.getTypeName(types[functype - FUNCTION_I2L]) + "String_Node_Str"+ wrapOperandString(lstOperands.get(0),true,indent);
}
throw new RuntimeException("String_Node_Str");
}