Program: 85312
Project: 85312
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  Variable var=this.variable;
  if (this.type == DEFAULT) {
    if (var != null) {
      writer.addLocal(var.index,MethodWriter.TOP);
      var.value.writeExpression(writer);
      var.writeSet(writer);
    }
    writer.visitLabel(this.startLabel);
    if (this.condition != null) {
      this.condition.writeJump(writer,this.endLabel);
    }
    if (this.then != null) {
      this.then.writeStatement(writer);
    }
    writer.visitLabel(this.updateLabel);
    if (this.update != null) {
      this.update.writeStatement(writer);
    }
    writer.visitJumpInsn(Opcodes.GOTO,this.startLabel);
    writer.visitLabel(this.endLabel);
    if (var != null) {
      writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.startLabel,this.endLabel,var.index);
    }
    return;
  }
  if (this.type == ARRAY) {
    Variable arrayVar=this.arrayVar;
    Variable indexVar=this.indexVar;
    writer.addLocal(var.index,MethodWriter.TOP);
    writer.addLocal(indexVar.index,indexVar.type);
    writer.addLocal(this.lengthVar.index,this.lengthVar.type);
    writer.addLocal(arrayVar.index,arrayVar.type);
    var.value.writeExpression(writer);
    writer.visitInsn(Opcodes.DUP);
    arrayVar.writeSet(writer);
    writer.visitInsn(Opcodes.ARRAYLENGTH);
    this.lengthVar.writeSet(writer);
    writer.visitLdcInsn(0);
    indexVar.writeSet(writer);
    writer.visitJumpInsn(Opcodes.GOTO,this.updateLabel);
    writer.visitLabel(this.startLabel);
    arrayVar.writeGet(writer);
    indexVar.writeGet(writer);
    writer.visitInsn(arrayVar.type.getArrayLoadOpcode());
    var.writeSet(writer);
    this.then.writeStatement(writer);
    writer.visitIincInsn(indexVar.index,1);
    writer.visitLabel(this.updateLabel);
    indexVar.writeGet(writer);
    this.lengthVar.writeGet(writer);
    writer.visitJumpInsn(Opcodes.IF_ICMPLT,this.startLabel);
    writer.visitLabel(this.endLabel);
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.startLabel,this.endLabel,var.index);
    writer.visitLocalVariable("String_Node_Str","String_Node_Str",null,this.startLabel,this.endLabel,indexVar.index);
    writer.visitLocalVariable("String_Node_Str","String_Node_Str",null,this.startLabel,this.endLabel,this.lengthVar.index);
    writer.visitLocalVariable("String_Node_Str",arrayVar.type.getExtendedName(),arrayVar.type.getSignature(),this.startLabel,this.endLabel,arrayVar.index);
    return;
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  Variable var=this.variable;
  if (this.type == DEFAULT) {
    if (var != null) {
      writer.addLocal(var.index,var.type);
      var.value.writeExpression(writer);
      var.writeSet(writer);
    }
    writer.visitLabel(this.startLabel);
    if (this.condition != null) {
      this.condition.writeJump(writer,this.endLabel);
    }
    if (this.then != null) {
      this.then.writeStatement(writer);
    }
    writer.visitLabel(this.updateLabel);
    if (this.update != null) {
      this.update.writeStatement(writer);
    }
    writer.visitJumpInsn(Opcodes.GOTO,this.startLabel);
    writer.visitLabel(this.endLabel);
    if (var != null) {
      writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.startLabel,this.endLabel,var.index);
    }
    return;
  }
  if (this.type == ARRAY) {
    Variable arrayVar=this.arrayVar;
    Variable indexVar=this.indexVar;
    writer.addLocal(var.index,MethodWriter.TOP);
    writer.addLocal(indexVar.index,indexVar.type);
    writer.addLocal(this.lengthVar.index,this.lengthVar.type);
    writer.addLocal(arrayVar.index,arrayVar.type);
    var.value.writeExpression(writer);
    writer.visitInsn(Opcodes.DUP);
    arrayVar.writeSet(writer);
    writer.visitInsn(Opcodes.ARRAYLENGTH);
    this.lengthVar.writeSet(writer);
    writer.visitLdcInsn(0);
    indexVar.writeSet(writer);
    writer.visitJumpInsn(Opcodes.GOTO,this.updateLabel);
    writer.visitLabel(this.startLabel);
    arrayVar.writeGet(writer);
    indexVar.writeGet(writer);
    writer.visitInsn(arrayVar.type.getArrayLoadOpcode());
    var.writeSet(writer);
    this.then.writeStatement(writer);
    writer.visitIincInsn(indexVar.index,1);
    writer.visitLabel(this.updateLabel);
    indexVar.writeGet(writer);
    this.lengthVar.writeGet(writer);
    writer.visitJumpInsn(Opcodes.IF_ICMPLT,this.startLabel);
    writer.visitLabel(this.endLabel);
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.startLabel,this.endLabel,var.index);
    writer.visitLocalVariable("String_Node_Str","String_Node_Str",null,this.startLabel,this.endLabel,indexVar.index);
    writer.visitLocalVariable("String_Node_Str","String_Node_Str",null,this.startLabel,this.endLabel,this.lengthVar.index);
    writer.visitLocalVariable("String_Node_Str",arrayVar.type.getExtendedName(),arrayVar.type.getSignature(),this.startLabel,this.endLabel,arrayVar.index);
    return;
  }
}