Program: 84962
Project: 84962
Buggy source:
@Override public void write(ClassWriter writer){
  String internalName=this.getInternalName();
  String signature=this.getSignature();
  String superClass=null;
  String[] interfaces=this.getInterfaceArray();
  if (this.superType != null) {
    superClass=this.superType.getInternalName();
  }
  writer.visit(DyvilCompiler.classVersion,this.modifiers & 0xFFFF,internalName,signature,superClass,interfaces);
  if (this.outerClass != null) {
    writer.visitOuterClass(this.outerClass.getInternalName(),null,null);
  }
  if ((this.modifiers & Modifiers.OBJECT_CLASS) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  if ((this.modifiers & Modifiers.SEALED) != 0) {
    writer.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.DEPRECATED) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  if ((this.modifiers & Modifiers.FUNCTIONAL) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  for (int i=0; i < this.annotationCount; i++) {
    this.annotations[i].write(writer);
  }
  if (this.outerClass != null) {
    this.writeInnerClassInfo(writer);
  }
  if (this.superType != null) {
    IClass iclass=this.superType.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i];
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  int fields=0;
  int constructors=0;
  int methods=0;
  int properties=0;
  if (this.body != null) {
    fields=this.body.fieldCount();
    methods=this.body.methodCount();
    constructors=this.body.constructorCount();
    properties=this.body.propertyCount();
    int classes=this.body.classCount();
    for (int i=0; i < classes; i++) {
      this.body.getClass(i).writeInnerClassInfo(writer);
    }
  }
  ThisValue thisValue=new ThisValue(this.type);
  StatementList instanceFields=new StatementList();
  StatementList staticFields=new StatementList();
  for (int i=0; i < fields; i++) {
    IField f=this.body.getField(i);
    f.write(writer);
    if (f.hasModifier(Modifiers.LAZY)) {
      continue;
    }
    if (f.hasModifier(Modifiers.STATIC)) {
      FieldAssign assign=new FieldAssign(null);
      assign.name=f.getName();
      assign.value=f.getValue();
      assign.field=f;
      staticFields.addValue(assign);
    }
 else {
      FieldAssign assign=new FieldAssign(null);
      assign.name=f.getName();
      assign.instance=thisValue;
      assign.value=f.getValue();
      assign.field=f;
      instanceFields.addValue(assign);
    }
  }
  this.metadata.write(writer,instanceFields);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].write(writer);
  }
  for (int i=0; i < constructors; i++) {
    this.body.getConstructor(i).write(writer,instanceFields);
  }
  for (int i=0; i < properties; i++) {
    this.body.getProperty(i).write(writer);
  }
  for (int i=0; i < methods; i++) {
    this.body.getMethod(i).write(writer);
  }
  for (int i=0; i < this.compilableCount; i++) {
    this.compilables[i].write(writer);
  }
  IField instanceField=this.metadata.getInstanceField();
  if (instanceField != null) {
    FieldAssign assign=new FieldAssign(null);
    assign.name=Name.instance;
    assign.field=instanceField;
    ConstructorCall call=new ConstructorCall(null);
    call.type=this.type;
    call.constructor=this.metadata.getConstructor();
    assign.value=call;
    staticFields.addValue(assign);
  }
 else   if (staticFields.isEmpty()) {
    return;
  }
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(Modifiers.STATIC,"String_Node_Str","String_Node_Str",null,null));
  mw.begin();
  staticFields.writeStatement(mw);
  mw.end(Types.VOID);
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  String internalName=this.getInternalName();
  String signature=this.getSignature();
  String superClass=null;
  String[] interfaces=this.getInterfaceArray();
  if (this.superType != null) {
    superClass=this.superType.getInternalName();
  }
  writer.visit(DyvilCompiler.classVersion,this.modifiers & 0xFFFF | Opcodes.ACC_SUPER,internalName,signature,superClass,interfaces);
  if (this.outerClass != null) {
    writer.visitOuterClass(this.outerClass.getInternalName(),null,null);
  }
  if ((this.modifiers & Modifiers.OBJECT_CLASS) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  if ((this.modifiers & Modifiers.SEALED) != 0) {
    writer.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.DEPRECATED) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  if ((this.modifiers & Modifiers.FUNCTIONAL) != 0) {
    writer.visitAnnotation("String_Node_Str",true);
  }
  for (int i=0; i < this.annotationCount; i++) {
    this.annotations[i].write(writer);
  }
  if (this.outerClass != null) {
    this.writeInnerClassInfo(writer);
  }
  if (this.superType != null) {
    IClass iclass=this.superType.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i];
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  int fields=0;
  int constructors=0;
  int methods=0;
  int properties=0;
  if (this.body != null) {
    fields=this.body.fieldCount();
    methods=this.body.methodCount();
    constructors=this.body.constructorCount();
    properties=this.body.propertyCount();
    int classes=this.body.classCount();
    for (int i=0; i < classes; i++) {
      this.body.getClass(i).writeInnerClassInfo(writer);
    }
  }
  ThisValue thisValue=new ThisValue(this.type);
  StatementList instanceFields=new StatementList();
  StatementList staticFields=new StatementList();
  for (int i=0; i < fields; i++) {
    IField f=this.body.getField(i);
    f.write(writer);
    if (f.hasModifier(Modifiers.LAZY)) {
      continue;
    }
    if (f.hasModifier(Modifiers.STATIC)) {
      FieldAssign assign=new FieldAssign(null);
      assign.name=f.getName();
      assign.value=f.getValue();
      assign.field=f;
      staticFields.addValue(assign);
    }
 else {
      FieldAssign assign=new FieldAssign(null);
      assign.name=f.getName();
      assign.instance=thisValue;
      assign.value=f.getValue();
      assign.field=f;
      instanceFields.addValue(assign);
    }
  }
  this.metadata.write(writer,instanceFields);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].write(writer);
  }
  for (int i=0; i < constructors; i++) {
    this.body.getConstructor(i).write(writer,instanceFields);
  }
  for (int i=0; i < properties; i++) {
    this.body.getProperty(i).write(writer);
  }
  for (int i=0; i < methods; i++) {
    this.body.getMethod(i).write(writer);
  }
  for (int i=0; i < this.compilableCount; i++) {
    this.compilables[i].write(writer);
  }
  IField instanceField=this.metadata.getInstanceField();
  if (instanceField != null) {
    FieldAssign assign=new FieldAssign(null);
    assign.name=Name.instance;
    assign.field=instanceField;
    ConstructorCall call=new ConstructorCall(null);
    call.type=this.type;
    call.constructor=this.metadata.getConstructor();
    assign.value=call;
    staticFields.addValue(assign);
  }
 else   if (staticFields.isEmpty()) {
    return;
  }
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(Modifiers.STATIC,"String_Node_Str","String_Node_Str",null,null));
  mw.begin();
  staticFields.writeStatement(mw);
  mw.end(Types.VOID);
}