Program: 64680
Project: 64680
Buggy source:
protected byte[] createEnum(EnumInfo enumInfo){
  String[] enumValues=enumInfo.getLiteralLabels();
  String className=enumInfo.getClassName();
  String internalClassName=className.replace('.','/');
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES);
  cw.visit(V1_5,ACC_PUBLIC + ACC_FINAL + ACC_SUPER+ ACC_ENUM,internalClassName,null,"String_Node_Str",null);
  for (  String enumValue : enumValues) {
    cw.visitField(ACC_PUBLIC + ACC_FINAL + ACC_STATIC+ ACC_ENUM,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  }
  cw.visitField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC+ ACC_SYNTHETIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  MethodVisitor mv=cw.visitMethod(ACC_PUBLIC + ACC_STATIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  mv.visitFieldInsn(GETSTATIC,internalClassName,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitMethodInsn(INVOKEVIRTUAL,"String_Node_Str" + internalClassName + "String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitTypeInsn(CHECKCAST,"String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitInsn(ARETURN);
  mv.visitMaxs(1,0);
  mv=cw.visitMethod(ACC_PUBLIC + ACC_STATIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  mv.visitLdcInsn(Type.getType("String_Node_Str" + internalClassName + "String_Node_Str"));
  mv.visitVarInsn(ALOAD,0);
  mv.visitMethodInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitTypeInsn(CHECKCAST,internalClassName);
  mv.visitInsn(ARETURN);
  mv.visitMaxs(2,1);
  mv=cw.visitMethod(ACC_PRIVATE,"String_Node_Str","String_Node_Str",null,null);
  mv.visitVarInsn(ALOAD,0);
  mv.visitVarInsn(ALOAD,1);
  mv.visitVarInsn(ILOAD,2);
  mv.visitMethodInsn(INVOKESPECIAL,"String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitInsn(RETURN);
  mv.visitMaxs(3,3);
  mv=cw.visitMethod(ACC_STATIC,"String_Node_Str","String_Node_Str",null,null);
  int lastCount=0;
  for (int i=0; i < enumValues.length; i++) {
    String enumValue=enumValues[i];
    mv.visitTypeInsn(NEW,internalClassName);
    mv.visitInsn(DUP);
    mv.visitLdcInsn(enumValue);
    if (i <= 5) {
      mv.visitInsn(ICONST[i]);
    }
 else {
      mv.visitIntInsn(BIPUSH,i);
    }
    mv.visitMethodInsn(INVOKESPECIAL,internalClassName,"String_Node_Str","String_Node_Str");
    mv.visitFieldInsn(PUTSTATIC,internalClassName,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str");
    lastCount=i;
  }
  if (lastCount < 5) {
    mv.visitInsn(ICONST[lastCount + 1]);
  }
 else {
    mv.visitIntInsn(BIPUSH,lastCount + 1);
  }
  mv.visitTypeInsn(ANEWARRAY,internalClassName);
  for (int i=0; i < enumValues.length; i++) {
    String enumValue=enumValues[i];
    mv.visitInsn(DUP);
    if (i <= 5) {
      mv.visitInsn(ICONST[i]);
    }
 else {
      mv.visitIntInsn(BIPUSH,i);
    }
    mv.visitFieldInsn(GETSTATIC,internalClassName,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str");
    mv.visitInsn(AASTORE);
  }
  mv.visitFieldInsn(PUTSTATIC,internalClassName,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitInsn(RETURN);
  mv.visitMaxs(4,0);
  cw.visitEnd();
  return cw.toByteArray();
}

Fixed version (ground truth):
protected byte[] createEnum(EnumInfo enumInfo){
  String[] enumValues=enumInfo.getLiteralLabels();
  String className=enumInfo.getClassName();
  String internalClassName=className.replace('.','/');
  ClassWriter cw=new ClassWriter(ClassWriter.COMPUTE_FRAMES);
  cw.visit(V1_5,ACC_PUBLIC + ACC_FINAL + ACC_SUPER+ ACC_ENUM,internalClassName,null,"String_Node_Str",null);
  for (  String enumValue : enumValues) {
    cw.visitField(ACC_PUBLIC + ACC_FINAL + ACC_STATIC+ ACC_ENUM,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  }
  cw.visitField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC+ ACC_SYNTHETIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  MethodVisitor mv=cw.visitMethod(ACC_PUBLIC + ACC_STATIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  mv.visitFieldInsn(GETSTATIC,internalClassName,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitMethodInsn(INVOKEVIRTUAL,"String_Node_Str" + internalClassName + "String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitTypeInsn(CHECKCAST,"String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitInsn(ARETURN);
  mv.visitMaxs(1,0);
  mv=cw.visitMethod(ACC_PUBLIC + ACC_STATIC,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str",null,null);
  mv.visitLdcInsn(Type.getType("String_Node_Str" + internalClassName + "String_Node_Str"));
  mv.visitVarInsn(ALOAD,0);
  mv.visitMethodInsn(INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitTypeInsn(CHECKCAST,internalClassName);
  mv.visitInsn(ARETURN);
  mv.visitMaxs(2,1);
  mv=cw.visitMethod(ACC_PRIVATE,"String_Node_Str","String_Node_Str",null,null);
  mv.visitVarInsn(ALOAD,0);
  mv.visitVarInsn(ALOAD,1);
  mv.visitVarInsn(ILOAD,2);
  mv.visitMethodInsn(INVOKESPECIAL,"String_Node_Str","String_Node_Str","String_Node_Str");
  mv.visitInsn(RETURN);
  mv.visitMaxs(3,3);
  mv=cw.visitMethod(ACC_STATIC,"String_Node_Str","String_Node_Str",null,null);
  int lastCount=0;
  for (int i=0; i < enumValues.length; i++) {
    String enumValue=enumValues[i];
    mv.visitTypeInsn(NEW,internalClassName);
    mv.visitInsn(DUP);
    mv.visitLdcInsn(enumValue);
    if (i <= 5) {
      mv.visitInsn(ICONST[i]);
    }
 else     if (i <= 127) {
      mv.visitIntInsn(BIPUSH,i);
    }
 else {
      mv.visitIntInsn(SIPUSH,i);
    }
    mv.visitMethodInsn(INVOKESPECIAL,internalClassName,"String_Node_Str","String_Node_Str");
    mv.visitFieldInsn(PUTSTATIC,internalClassName,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str");
    lastCount=i;
  }
  if (lastCount < 5) {
    mv.visitInsn(ICONST[lastCount + 1]);
  }
 else   if (lastCount < 127) {
    mv.visitIntInsn(BIPUSH,lastCount + 1);
  }
 else {
    mv.visitIntInsn(SIPUSH,lastCount + 1);
  }
  mv.visitTypeInsn(ANEWARRAY,internalClassName);
  for (int i=0; i < enumValues.length; i++) {
    String enumValue=enumValues[i];
    mv.visitInsn(DUP);
    if (i <= 5) {
      mv.visitInsn(ICONST[i]);
    }
 else     if (i <= 127) {
      mv.visitIntInsn(BIPUSH,i);
    }
 else {
      mv.visitIntInsn(SIPUSH,i);
    }
    mv.visitFieldInsn(GETSTATIC,internalClassName,enumValue,"String_Node_Str" + internalClassName + "String_Node_Str");
    mv.visitInsn(AASTORE);
  }
  mv.visitFieldInsn(PUTSTATIC,internalClassName,"String_Node_Str","String_Node_Str" + internalClassName + "String_Node_Str");
  mv.visitInsn(RETURN);
  mv.visitMaxs(4,0);
  cw.visitEnd();
  return cw.toByteArray();
}