Program: 85160
Project: 85160
Buggy source:
private void processInsn(int opcode){
switch (opcode) {
case DUP:
{
      this.ensureStack(this.stackIndex + 1);
      this.stack[this.stackIndex]=this.stack[this.stackIndex - 1];
      this.stackIndex++;
      return;
    }
case DUP_X1:
{
    this.ensureStack(this.stackIndex + 1);
    this.stack[this.stackIndex]=this.stack[this.stackIndex - 2];
    this.stackIndex++;
    return;
  }
case DUP_X2:
{
  this.ensureStack(this.stackIndex + 1);
  this.stack[this.stackIndex]=this.stack[this.stackIndex - 3];
  this.stackIndex++;
  return;
}
case DUP2:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 2];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 1];
this.stackIndex+=2;
return;
}
case DUP2_X1:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 3];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 2];
this.stackIndex+=2;
return;
}
case DUP2_X2:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 4];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 3];
this.stackIndex+=2;
return;
}
case SWAP:
{
Object o=this.stack[this.stackIndex];
this.stack[this.stackIndex]=this.stack[this.stackIndex - 1];
this.stack[this.stackIndex - 1]=o;
return;
}
case POP:
{
this.pop();
return;
}
case POP2:
{
this.pop();
this.pop();
return;
}
case ICONST_0:
case ICONST_1:
case ICONST_2:
case ICONST_3:
case ICONST_4:
case ICONST_5:
case ICONST_M1:
this.push(INT);
return;
case LCONST_0:
case LCONST_1:
this.push(LONG);
return;
case FCONST_0:
case FCONST_1:
case FCONST_2:
this.push(FLOAT);
return;
case DCONST_0:
case DCONST_1:
this.push(DOUBLE);
return;
case ACONST_NULL:
this.push(NULL);
return;
case ARRAYLENGTH:
this.set(INT);
return;
case RETURN:
this.clear();
this.hasReturn=true;
return;
case ATHROW:
this.clear();
this.visitFrame=true;
return;
case BALOAD:
case SALOAD:
case CALOAD:
case IALOAD:
this.pop();
this.pop();
this.push(INT);
return;
case LALOAD:
this.pop();
this.pop();
this.push(LONG);
return;
case FALOAD:
this.pop();
this.pop();
this.push(FLOAT);
return;
case DALOAD:
this.pop();
this.pop();
this.push(DOUBLE);
return;
case AALOAD:
this.pop();
this.pop();
this.push(TOP);
return;
case IADD:
case ISUB:
case IMUL:
case IDIV:
case IREM:
case ISHL:
case ISHR:
case IUSHR:
this.pop();
this.pop();
this.push(INT);
return;
case LADD:
case LSUB:
case LMUL:
case LDIV:
case LREM:
case LSHL:
case LSHR:
case LUSHR:
this.pop();
this.pop();
this.push(LONG);
return;
case FADD:
case FSUB:
case FMUL:
case FDIV:
case FREM:
this.pop();
this.pop();
this.push(FLOAT);
return;
case DADD:
case DSUB:
case DMUL:
case DDIV:
case DREM:
this.pop();
this.pop();
this.push(DOUBLE);
return;
case L2I:
case F2I:
case D2I:
this.set(INT);
return;
case I2L:
case F2L:
case D2L:
this.set(LONG);
return;
case I2F:
case L2F:
case D2F:
this.set(FLOAT);
return;
case LCMP:
case FCMPL:
case FCMPG:
case DCMPL:
case DCMPG:
this.pop();
this.pop();
this.push(INT);
return;
}
}

Fixed version (ground truth):
private void processInsn(int opcode){
switch (opcode) {
case DUP:
{
      this.ensureStack(this.stackIndex + 1);
      this.stack[this.stackIndex]=this.stack[this.stackIndex - 1];
      this.stackIndex++;
      return;
    }
case DUP_X1:
{
    this.ensureStack(this.stackIndex + 1);
    this.stack[this.stackIndex]=this.stack[this.stackIndex - 2];
    this.stackIndex++;
    return;
  }
case DUP_X2:
{
  this.ensureStack(this.stackIndex + 1);
  this.stack[this.stackIndex]=this.stack[this.stackIndex - 3];
  this.stackIndex++;
  return;
}
case DUP2:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 2];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 1];
this.stackIndex+=2;
return;
}
case DUP2_X1:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 3];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 2];
this.stackIndex+=2;
return;
}
case DUP2_X2:
{
this.ensureStack(this.stackIndex + 2);
this.stack[this.stackIndex]=this.stack[this.stackIndex - 4];
this.stack[this.stackIndex + 1]=this.stack[this.stackIndex - 3];
this.stackIndex+=2;
return;
}
case SWAP:
{
Object o=this.stack[this.stackIndex];
this.stack[this.stackIndex]=this.stack[this.stackIndex - 1];
this.stack[this.stackIndex - 1]=o;
return;
}
case POP:
{
this.pop();
return;
}
case POP2:
{
this.pop();
this.pop();
return;
}
case ICONST_0:
case ICONST_1:
case ICONST_2:
case ICONST_3:
case ICONST_4:
case ICONST_5:
case ICONST_M1:
this.push(INT);
return;
case LCONST_0:
case LCONST_1:
this.push(LONG);
return;
case FCONST_0:
case FCONST_1:
case FCONST_2:
this.push(FLOAT);
return;
case DCONST_0:
case DCONST_1:
this.push(DOUBLE);
return;
case ACONST_NULL:
this.push(NULL);
return;
case ARRAYLENGTH:
this.set(INT);
return;
case RETURN:
this.clear();
this.hasReturn=true;
return;
case ATHROW:
this.clear();
this.visitFrame=true;
return;
case BALOAD:
case SALOAD:
case CALOAD:
case IALOAD:
this.pop();
this.pop();
this.push(INT);
return;
case LALOAD:
this.pop();
this.pop();
this.push(LONG);
return;
case FALOAD:
this.pop();
this.pop();
this.push(FLOAT);
return;
case DALOAD:
this.pop();
this.pop();
this.push(DOUBLE);
return;
case AALOAD:
this.pop();
this.pop();
this.push(TOP);
return;
case IADD:
case ISUB:
case IMUL:
case IDIV:
case IREM:
case ISHL:
case ISHR:
case IUSHR:
case IAND:
case IOR:
case IXOR:
this.pop();
this.pop();
this.push(INT);
return;
case LADD:
case LSUB:
case LMUL:
case LDIV:
case LREM:
case LSHL:
case LSHR:
case LUSHR:
case LAND:
case LOR:
case LXOR:
this.pop();
this.pop();
this.push(LONG);
return;
case FADD:
case FSUB:
case FMUL:
case FDIV:
case FREM:
this.pop();
this.pop();
this.push(FLOAT);
return;
case DADD:
case DSUB:
case DMUL:
case DDIV:
case DREM:
this.pop();
this.pop();
this.push(DOUBLE);
return;
case L2I:
case F2I:
case D2I:
this.set(INT);
return;
case I2L:
case F2L:
case D2L:
this.set(LONG);
return;
case I2F:
case L2F:
case D2F:
this.set(FLOAT);
return;
case LCMP:
case FCMPL:
case FCMPG:
case DCMPL:
case DCMPG:
this.pop();
this.pop();
this.push(INT);
return;
}
}