Program: 178277
Project: 178277
Buggy source:
@Override public void simulate(Stack stack){
  ConstantPushOpcode cpop=this.op.as(ConstantPushOpcode.class);
  if (cpop.getParameterTypes().length == 0) {
switch (cpop.baseCode) {
case Opcode.ICONST_0:
      stack.push(new IntegerConstant(cpop.getCode() - cpop.baseCode));
    break;
case Opcode.LCONST_0:
  stack.push2(new LongConstant(new Long(new Integer(cpop.getCode() - cpop.baseCode))));
break;
case Opcode.FCONST_0:
stack.push(new FloatConstant(new Float(cpop.getCode() - cpop.baseCode)));
break;
case Opcode.DCONST_0:
stack.push2(new DoubleConstant(new Double(cpop.getCode() - cpop.baseCode)));
break;
default :
throw new RuntimeException("String_Node_Str" + cpop.baseCode + "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
}
 else {
OpParameterType type=cpop.getParameterTypes()[0];
int value=cpop.decode(context,index).parameterValues[0];
if (type == OpParameterType.S1 || type == OpParameterType.S2) {
for (int i=0; i < getPops().length; i++) {
stack.pop(getPops()[i]);
}
stack.push(new IntegerConstant(cpop.decode(context,index).parameterValues[0]));
}
 else if (type == OpParameterType.U1 || type == OpParameterType.U2) {
Object o=context.behavior.getMethodInfo().getConstPool().getLdcValue(value);
if (o == null) {
ConstPool cp=context.behavior.getMethodInfo().getConstPool();
for (Method m : ConstPool.class.getDeclaredMethods()) {
if (m.getName().equals("String_Node_Str")) {
m.setAccessible(true);
try {
Object _o=m.invoke(cp,new Integer(value));
stack.push(new WhateverConstant(_o));
}
 catch (Exception e) {
e.printStackTrace();
}
}
}
return;
}
if (o instanceof Integer) stack.push(new IntegerConstant((Integer)o));
 else if (o instanceof Long) stack.push2(new LongConstant((Long)o));
 else if (o instanceof Float) stack.push(new FloatConstant((Float)o));
 else if (o instanceof Double) stack.push2(new DoubleConstant((Double)o));
 else if (o instanceof String) stack.push(new StringConstant((String)o));
 else throw new RuntimeException("String_Node_Str" + o.getClass() + "String_Node_Str"+ cpop.code+ "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
 else {
throw new RuntimeException("String_Node_Str" + cpop.code + "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
}
}

Fixed version (ground truth):
@Override public void simulate(Stack stack){
  ConstantPushOpcode cpop=this.op.as(ConstantPushOpcode.class);
  if (cpop.getParameterTypes().length == 0) {
switch (cpop.baseCode) {
case Opcode.ICONST_0:
      stack.push(new IntegerConstant(cpop.getCode() - cpop.baseCode));
    break;
case Opcode.LCONST_0:
  stack.push2(new LongConstant(new Long(new Integer(cpop.getCode() - cpop.baseCode))));
break;
case Opcode.FCONST_0:
stack.push(new FloatConstant(new Float(cpop.getCode() - cpop.baseCode)));
break;
case Opcode.DCONST_0:
stack.push2(new DoubleConstant(new Double(cpop.getCode() - cpop.baseCode)));
break;
default :
throw new RuntimeException("String_Node_Str" + cpop.baseCode + "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
}
 else {
OpParameterType type=cpop.getParameterTypes()[0];
int value=cpop.decode(context,index).parameterValues[0];
if (type == OpParameterType.S1 || type == OpParameterType.S2) {
for (int i=0; i < getPops().length; i++) {
stack.pop(getPops()[i]);
}
stack.push(new IntegerConstant(cpop.decode(context,index).parameterValues[0]));
}
 else if (type == OpParameterType.U1 || type == OpParameterType.U2) {
Object o=context.behavior.getMethodInfo().getConstPool().getLdcValue(value);
if (o == null) {
ConstPool cp=context.behavior.getMethodInfo().getConstPool();
for (Method m : ConstPool.class.getDeclaredMethods()) {
if (m.getName().equals("String_Node_Str")) {
m.setAccessible(true);
try {
Object _o=m.invoke(cp,new Integer(value));
stack.push(new WhateverConstant(_o));
}
 catch (Exception e) {
throw new RuntimeException(e);
}
}
}
return;
}
if (pushes[0].equals(StackElementLength.DOUBLE) && !(o instanceof Long) && !(o instanceof Double)) throw new RuntimeException("String_Node_Str" + op.getName() + "String_Node_Str"+ o+ "String_Node_Str");
if (o instanceof Integer) stack.push(new IntegerConstant((Integer)o));
 else if (o instanceof Long) stack.push2(new LongConstant((Long)o));
 else if (o instanceof Float) stack.push(new FloatConstant((Float)o));
 else if (o instanceof Double) stack.push2(new DoubleConstant((Double)o));
 else if (o instanceof String) stack.push(new StringConstant((String)o));
 else throw new RuntimeException("String_Node_Str" + o.getClass() + "String_Node_Str"+ cpop.code+ "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
 else {
throw new RuntimeException("String_Node_Str" + cpop.code + "String_Node_Str"+ cpop.getName()+ "String_Node_Str");
}
}
}