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