Program: 83645
Project: 83645
Buggy source:
public static void writeHashCode(MethodWriter writer,IField field){
  writer.writeVarInsn(ALOAD,0);
  field.writeGet(writer,null);
  IType type=field.getType();
  if (type.isPrimitive()) {
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
{
        Label elseLabel=new Label();
        Label endLabel=new Label();
        writer.writeJumpInsn(IFEQ,elseLabel);
        writer.writeLDC(1231);
        writer.writeJumpInsn(GOTO,endLabel);
        writer.writeLabel(elseLabel);
        writer.writeLDC(1237);
        writer.writeLabel(endLabel);
        return;
      }
case ClassFormat.T_BYTE:
    return;
case ClassFormat.T_SHORT:
  return;
case ClassFormat.T_CHAR:
return;
case ClassFormat.T_INT:
return;
case ClassFormat.T_LONG:
writer.writeInsn(DUP2);
writer.writeLDC(32);
writer.writeInsn(LUSHR);
writer.writeInsn(LOR);
writer.writeInsn(L2I);
return;
case ClassFormat.T_FLOAT:
writer.writeInvokeInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
return;
case ClassFormat.T_DOUBLE:
writer.writeInvokeInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
writer.writeInsn(DUP2);
writer.writeLDC(32);
writer.writeInsn(LUSHR);
writer.writeInsn(LOR);
writer.writeInsn(L2I);
return;
}
}
Label elseLabel=new Label();
Label endLabel=new Label();
writer.writeInsn(DUP);
writer.writeJumpInsn(IFNULL,elseLabel);
writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str","String_Node_Str",false);
writer.writeJumpInsn(GOTO,endLabel);
writer.writeLabel(elseLabel);
writer.writeInsn(POP);
writer.writeLDC(0);
writer.writeLabel(endLabel);
}

Fixed version (ground truth):
public static void writeHashCode(MethodWriter writer,IType type){
  if (type.isPrimitive()) {
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
{
        Label elseLabel=new Label();
        Label endLabel=new Label();
        writer.writeJumpInsn(IFEQ,elseLabel);
        writer.writeLDC(1231);
        writer.writeJumpInsn(GOTO,endLabel);
        writer.writeLabel(elseLabel);
        writer.writeLDC(1237);
        writer.writeLabel(endLabel);
        return;
      }
case ClassFormat.T_BYTE:
    return;
case ClassFormat.T_SHORT:
  return;
case ClassFormat.T_CHAR:
return;
case ClassFormat.T_INT:
return;
case ClassFormat.T_LONG:
writer.writeInsn(DUP2);
writer.writeLDC(32);
writer.writeInsn(LUSHR);
writer.writeInsn(LOR);
writer.writeInsn(L2I);
return;
case ClassFormat.T_FLOAT:
writer.writeInvokeInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
return;
case ClassFormat.T_DOUBLE:
writer.writeInvokeInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
writer.writeInsn(DUP2);
writer.writeLDC(32);
writer.writeInsn(LUSHR);
writer.writeInsn(LOR);
writer.writeInsn(L2I);
return;
}
}
Label elseLabel=new Label();
Label endLabel=new Label();
writer.writeInsn(DUP);
writer.writeJumpInsn(IFNULL,elseLabel);
if (type.isArrayType()) {
writeArrayHashCode(writer,type.getElementType());
}
 else {
writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}
writer.writeJumpInsn(GOTO,endLabel);
writer.writeLabel(elseLabel);
writer.writeInsn(POP);
writer.writeLDC(0);
writer.writeLabel(endLabel);
}