Program: 85267
Project: 85267
Buggy source:
@Override public void write(ClassWriter writer){
  String internalName=this.getInternalName();
  String signature=this.getSignature();
  String superClass=null;
  int interfaceCount=this.interfaces.size();
  String[] interfaces=new String[interfaceCount];
  if (this.superType != null) {
    superClass=this.superType.getInternalName();
  }
  for (int i=0; i < interfaceCount; i++) {
    IType type=this.interfaces.get(i);
    interfaces[i]=type.getInternalName();
  }
  writer.visit(Opcodes.V1_8,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 (  Annotation a : this.annotations) {
    a.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 < interfaceCount; i++) {
    IType type=this.interfaces.get(i);
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  List<IField> fields;
  List<IMethod> methods;
  List<IProperty> properties;
  if (this.body != null) {
    fields=this.body.fields;
    methods=this.body.methods;
    properties=this.body.properties;
    for (    IClass iclass : this.body.classes) {
      iclass.writeInnerClassInfo(writer);
    }
  }
 else {
    fields=Collections.EMPTY_LIST;
    methods=Collections.EMPTY_LIST;
    properties=Collections.EMPTY_LIST;
  }
  ThisValue thisValue=new ThisValue(null,this.type);
  IField instanceField=this.instanceField;
  StatementList instanceFields=new StatementList(null);
  StatementList staticFields=new StatementList(null);
  boolean hasConstructor=false;
  for (  IField f : fields) {
    f.write(writer);
    if (f.hasModifier(Modifiers.LAZY)) {
      continue;
    }
    if (f.hasModifier(Modifiers.STATIC)) {
      FieldAssign assign=new FieldAssign(null);
      assign.qualifiedName=f.getQualifiedName();
      assign.value=f.getValue();
      assign.field=f;
      staticFields.addValue(assign);
    }
 else {
      FieldAssign assign=new FieldAssign(null);
      assign.qualifiedName=f.getQualifiedName();
      assign.instance=thisValue;
      assign.value=f.getValue();
      assign.field=f;
      instanceFields.addValue(assign);
    }
  }
  if (this.superConstructor != null) {
    MethodCall call=new MethodCall(null);
    call.instance=new SuperValue(null,this.superType);
    call.method=this.superConstructor;
    call.name="String_Node_Str";
    call.qualifiedName="String_Node_Str";
    call.arguments=Util.EMPTY_VALUES;
    instanceFields.getValues().add(0,call);
  }
  if (this.constructor != null) {
    this.constructor.setValue(instanceFields);
    this.constructor.write(writer);
  }
  for (  IProperty p : properties) {
    p.write(writer);
  }
  for (  IMethod m : methods) {
    String name=m.getName();
    m.write(writer);
  }
  if ((this.modifiers & Modifiers.CASE_CLASS) != 0) {
    MethodWriter mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.visitParameter("String_Node_Str","String_Node_Str",0);
    mw.addLocal(1,this.type);
    mw.visitCode();
    CaseClasses.writeEquals(mw,this,fields);
    mw.visitEnd();
    mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.addLocal(0,this.type);
    mw.visitCode();
    CaseClasses.writeHashCode(mw,this,fields);
    mw.visitEnd();
    mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.addLocal(0,this.type);
    mw.visitCode();
    CaseClasses.writeToString(mw,this,fields);
    mw.visitEnd();
  }
  if (instanceField != null) {
    instanceField.write(writer);
    FieldAssign assign=new FieldAssign(null);
    assign.name=assign.qualifiedName="String_Node_Str";
    assign.field=instanceField;
    ConstructorCall call=new ConstructorCall(null);
    call.type=this.type;
    call.method=this.constructor;
    assign.value=call;
    staticFields.addValue(assign);
  }
  if (!staticFields.isEmpty()) {
    Method m=new Method(this);
    m.setQualifiedName("String_Node_Str");
    m.setType(Type.VOID);
    m.setModifiers(Modifiers.STATIC | Modifiers.MANDATED);
    m.setValue(staticFields);
    m.write(writer);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  String internalName=this.getInternalName();
  String signature=this.getSignature();
  String superClass=null;
  int interfaceCount=this.interfaces.size();
  String[] interfaces=new String[interfaceCount];
  if (this.superType != null) {
    superClass=this.superType.getInternalName();
  }
  for (int i=0; i < interfaceCount; i++) {
    IType type=this.interfaces.get(i);
    interfaces[i]=type.getInternalName();
  }
  writer.visit(Opcodes.V1_8,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);
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.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 < interfaceCount; i++) {
    IType type=this.interfaces.get(i);
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      iclass.writeInnerClassInfo(writer);
    }
  }
  List<IField> fields;
  List<IMethod> methods;
  List<IProperty> properties;
  if (this.body != null) {
    fields=this.body.fields;
    methods=this.body.methods;
    properties=this.body.properties;
    for (    IClass iclass : this.body.classes) {
      iclass.writeInnerClassInfo(writer);
    }
  }
 else {
    fields=Collections.EMPTY_LIST;
    methods=Collections.EMPTY_LIST;
    properties=Collections.EMPTY_LIST;
  }
  ThisValue thisValue=new ThisValue(null,this.type);
  IField instanceField=this.instanceField;
  StatementList instanceFields=new StatementList(null);
  StatementList staticFields=new StatementList(null);
  boolean hasConstructor=false;
  for (  IField f : fields) {
    f.write(writer);
    if (f.hasModifier(Modifiers.LAZY)) {
      continue;
    }
    if (f.hasModifier(Modifiers.STATIC)) {
      FieldAssign assign=new FieldAssign(null);
      assign.qualifiedName=f.getQualifiedName();
      assign.value=f.getValue();
      assign.field=f;
      staticFields.addValue(assign);
    }
 else {
      FieldAssign assign=new FieldAssign(null);
      assign.qualifiedName=f.getQualifiedName();
      assign.instance=thisValue;
      assign.value=f.getValue();
      assign.field=f;
      instanceFields.addValue(assign);
    }
  }
  if (this.superConstructor != null) {
    MethodCall call=new MethodCall(null);
    call.instance=new SuperValue(null,this.superType);
    call.method=this.superConstructor;
    call.name="String_Node_Str";
    call.qualifiedName="String_Node_Str";
    call.arguments=Util.EMPTY_VALUES;
    instanceFields.getValues().add(0,call);
  }
  if (this.constructor != null) {
    this.constructor.setValue(instanceFields);
    this.constructor.write(writer);
  }
  for (  IProperty p : properties) {
    p.write(writer);
  }
  for (  IMethod m : methods) {
    String name=m.getName();
    m.write(writer);
  }
  if ((this.modifiers & Modifiers.CASE_CLASS) != 0) {
    MethodWriter mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.visitParameter("String_Node_Str","String_Node_Str",0);
    mw.addLocal(1,this.type);
    mw.visitCode();
    CaseClasses.writeEquals(mw,this,fields);
    mw.visitEnd();
    mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.addLocal(0,this.type);
    mw.visitCode();
    CaseClasses.writeHashCode(mw,this,fields);
    mw.visitEnd();
    mw=new MethodWriter(writer,writer.visitMethod(Modifiers.PUBLIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
    mw.addLocal(0,this.type);
    mw.visitCode();
    CaseClasses.writeToString(mw,this,fields);
    mw.visitEnd();
  }
  if (instanceField != null) {
    instanceField.write(writer);
    FieldAssign assign=new FieldAssign(null);
    assign.name=assign.qualifiedName="String_Node_Str";
    assign.field=instanceField;
    ConstructorCall call=new ConstructorCall(null);
    call.type=this.type;
    call.method=this.constructor;
    assign.value=call;
    staticFields.addValue(assign);
  }
  if (!staticFields.isEmpty()) {
    Method m=new Method(this);
    m.setQualifiedName("String_Node_Str");
    m.setType(Type.VOID);
    m.setModifiers(Modifiers.STATIC | Modifiers.MANDATED);
    m.setValue(staticFields);
    m.write(writer);
  }
}