Program: 10992
Project: 10992
Buggy source:
public void visitMaxs(final int maxStack,final int maxLocals){
  if (ClassReader.FRAMES && compute == FRAMES) {
    Handler handler=firstHandler;
    while (handler != null) {
      Label l=handler.start.getFirst();
      Label h=handler.handler.getFirst();
      Label e=handler.end.getFirst();
      String t=handler.desc == null ? "String_Node_Str" : handler.desc;
      int kind=Frame.OBJECT | cw.addType(t);
      h.status|=Label.TARGET;
      while (l != e) {
        Edge b=new Edge();
        b.info=kind;
        b.successor=h;
        b.next=l.successors;
        l.successors=b;
        l=l.successor;
      }
      handler=handler.next;
    }
    Frame f=labels.frame;
    Type[] args=Type.getArgumentTypes(descriptor);
    f.initInputFrame(cw,access,args,this.maxLocals);
    visitFrame(f);
    int max=0;
    Label changed=labels;
    while (changed != null) {
      Label l=changed;
      changed=changed.next;
      l.next=null;
      f=l.frame;
      if ((l.status & Label.TARGET) != 0) {
        l.status|=Label.STORE;
      }
      l.status|=Label.REACHABLE;
      int blockMax=f.inputStack.length + l.outputStackMax;
      if (blockMax > max) {
        max=blockMax;
      }
      Edge e=l.successors;
      while (e != null) {
        Label n=e.successor.getFirst();
        boolean change=f.merge(cw,n.frame,e.info);
        if (change && n.next == null) {
          n.next=changed;
          changed=n;
        }
        e=e.next;
      }
    }
    this.maxStack=max;
    Label l=labels;
    while (l != null) {
      f=l.frame;
      if ((l.status & Label.STORE) != 0) {
        visitFrame(f);
      }
      if ((l.status & Label.REACHABLE) == 0) {
        Label k=l.successor;
        int start=l.position;
        int end=(k == null ? code.length : k.position) - 1;
        if (end >= start) {
          for (int i=start; i < end; ++i) {
            code.data[i]=Opcodes.NOP;
          }
          code.data[end]=(byte)Opcodes.ATHROW;
          startFrame(start,0,1);
          frame[frameIndex++]=Frame.OBJECT | cw.addType("String_Node_Str");
          endFrame();
        }
      }
      l=l.successor;
    }
  }
 else   if (compute == MAXS) {
    Handler handler=firstHandler;
    while (handler != null) {
      Label l=handler.start;
      Label h=handler.handler;
      Label e=handler.end;
      while (l != e) {
        Edge b=new Edge();
        b.info=Edge.EXCEPTION;
        b.successor=h;
        if ((l.status & Label.JSR) == 0) {
          b.next=l.successors;
          l.successors=b;
        }
 else {
          b.next=l.successors.next.next;
          l.successors.next.next=b;
        }
        l=l.successor;
      }
      handler=handler.next;
    }
    if (subroutines > 0) {
      int id=0;
      labels.visitSubroutine(null,1,subroutines);
      Label l=labels;
      while (l != null) {
        if ((l.status & Label.JSR) != 0) {
          Label subroutine=l.successors.next.successor;
          if ((subroutine.status & Label.VISITED) == 0) {
            id+=1;
            subroutine.visitSubroutine(null,(id / 32L) << 32 | (1L << (id % 32)),subroutines);
          }
        }
        l=l.successor;
      }
      l=labels;
      while (l != null) {
        if ((l.status & Label.JSR) != 0) {
          Label L=labels;
          while (L != null) {
            L.status&=~Label.VISITED;
            L=L.successor;
          }
          Label subroutine=l.successors.next.successor;
          subroutine.visitSubroutine(l,0,subroutines);
        }
        l=l.successor;
      }
    }
    int max=0;
    Label stack=labels;
    while (stack != null) {
      Label l=stack;
      stack=stack.next;
      int start=l.inputStackTop;
      int blockMax=start + l.outputStackMax;
      if (blockMax > max) {
        max=blockMax;
      }
      Edge b=l.successors;
      if ((l.status & Label.JSR) != 0) {
        b=b.next;
      }
      while (b != null) {
        l=b.successor;
        if ((l.status & Label.PUSHED) == 0) {
          l.inputStackTop=b.info == Edge.EXCEPTION ? 1 : start + b.info;
          l.status|=Label.PUSHED;
          l.next=stack;
          stack=l;
        }
        b=b.next;
      }
    }
    this.maxStack=max;
  }
 else {
    this.maxStack=maxStack;
    this.maxLocals=maxLocals;
  }
}

Fixed version (ground truth):
public void visitMaxs(final int maxStack,final int maxLocals){
  if (ClassReader.FRAMES && compute == FRAMES) {
    Handler handler=firstHandler;
    while (handler != null) {
      Label l=handler.start.getFirst();
      Label h=handler.handler.getFirst();
      Label e=handler.end.getFirst();
      String t=handler.desc == null ? "String_Node_Str" : handler.desc;
      int kind=Frame.OBJECT | cw.addType(t);
      h.status|=Label.TARGET;
      while (l != e) {
        Edge b=new Edge();
        b.info=kind;
        b.successor=h;
        b.next=l.successors;
        l.successors=b;
        l=l.successor;
      }
      handler=handler.next;
    }
    Frame f=labels.frame;
    Type[] args=Type.getArgumentTypes(descriptor);
    f.initInputFrame(cw,access,args,this.maxLocals);
    visitFrame(f);
    int max=0;
    Label changed=labels;
    while (changed != null) {
      Label l=changed;
      changed=changed.next;
      l.next=null;
      f=l.frame;
      if ((l.status & Label.TARGET) != 0) {
        l.status|=Label.STORE;
      }
      l.status|=Label.REACHABLE;
      int blockMax=f.inputStack.length + l.outputStackMax;
      if (blockMax > max) {
        max=blockMax;
      }
      Edge e=l.successors;
      while (e != null) {
        Label n=e.successor.getFirst();
        boolean change=f.merge(cw,n.frame,e.info);
        if (change && n.next == null) {
          n.next=changed;
          changed=n;
        }
        e=e.next;
      }
    }
    Label l=labels;
    while (l != null) {
      f=l.frame;
      if ((l.status & Label.STORE) != 0) {
        visitFrame(f);
      }
      if ((l.status & Label.REACHABLE) == 0) {
        Label k=l.successor;
        int start=l.position;
        int end=(k == null ? code.length : k.position) - 1;
        if (end >= start) {
          max=Math.max(max,1);
          for (int i=start; i < end; ++i) {
            code.data[i]=Opcodes.NOP;
          }
          code.data[end]=(byte)Opcodes.ATHROW;
          startFrame(start,0,1);
          frame[frameIndex++]=Frame.OBJECT | cw.addType("String_Node_Str");
          endFrame();
        }
      }
      l=l.successor;
    }
    this.maxStack=max;
  }
 else   if (compute == MAXS) {
    Handler handler=firstHandler;
    while (handler != null) {
      Label l=handler.start;
      Label h=handler.handler;
      Label e=handler.end;
      while (l != e) {
        Edge b=new Edge();
        b.info=Edge.EXCEPTION;
        b.successor=h;
        if ((l.status & Label.JSR) == 0) {
          b.next=l.successors;
          l.successors=b;
        }
 else {
          b.next=l.successors.next.next;
          l.successors.next.next=b;
        }
        l=l.successor;
      }
      handler=handler.next;
    }
    if (subroutines > 0) {
      int id=0;
      labels.visitSubroutine(null,1,subroutines);
      Label l=labels;
      while (l != null) {
        if ((l.status & Label.JSR) != 0) {
          Label subroutine=l.successors.next.successor;
          if ((subroutine.status & Label.VISITED) == 0) {
            id+=1;
            subroutine.visitSubroutine(null,(id / 32L) << 32 | (1L << (id % 32)),subroutines);
          }
        }
        l=l.successor;
      }
      l=labels;
      while (l != null) {
        if ((l.status & Label.JSR) != 0) {
          Label L=labels;
          while (L != null) {
            L.status&=~Label.VISITED;
            L=L.successor;
          }
          Label subroutine=l.successors.next.successor;
          subroutine.visitSubroutine(l,0,subroutines);
        }
        l=l.successor;
      }
    }
    int max=0;
    Label stack=labels;
    while (stack != null) {
      Label l=stack;
      stack=stack.next;
      int start=l.inputStackTop;
      int blockMax=start + l.outputStackMax;
      if (blockMax > max) {
        max=blockMax;
      }
      Edge b=l.successors;
      if ((l.status & Label.JSR) != 0) {
        b=b.next;
      }
      while (b != null) {
        l=b.successor;
        if ((l.status & Label.PUSHED) == 0) {
          l.inputStackTop=b.info == Edge.EXCEPTION ? 1 : start + b.info;
          l.status|=Label.PUSHED;
          l.next=stack;
          stack=l;
        }
        b=b.next;
      }
    }
    this.maxStack=max;
  }
 else {
    this.maxStack=maxStack;
    this.maxLocals=maxLocals;
  }
}