Program: 81227
Project: 81227
Buggy source:
/** 
 * Flush any buffered data and reset this instance.
 */
public void doFinal() throws ListenerException {
  ListenerException exception=null, current=null;
  if (ndx > 0) {
    int off=Math.max(0,ndx - config.blockLength);
    int len=Math.min(ndx,config.blockLength);
    config.weakSum.check(buffer,off,len);
    Long oldOff=hashSearch(buffer,off,len);
    if (oldOff != null) {
      if (off > 0) {
        DataBlock d=new DataBlock(count - ndx,buffer,0,off);
        for (        MatcherListener l : listeners) {
          try {
            l.update(new MatcherEvent(d));
          }
 catch (          ListenerException le) {
            if (exception != null) {
              current.setNext(le);
              current=le;
            }
 else {
              exception=le;
              current=le;
            }
          }
        }
        if (exception != null)         throw exception;
      }
      Offsets o=new Offsets(oldOff.longValue(),count - len,len);
      for (      MatcherListener l : listeners) {
        try {
          l.update(new MatcherEvent(o));
        }
 catch (        ListenerException le) {
          if (exception != null) {
            current.setNext(le);
            current=le;
          }
 else {
            exception=le;
            current=le;
          }
        }
      }
      if (exception != null)       throw exception;
    }
 else {
      DataBlock d=new DataBlock(count - ndx,buffer,0,ndx);
      for (      MatcherListener l : listeners) {
        try {
          l.update(new MatcherEvent(d));
        }
 catch (        ListenerException le) {
          if (exception != null) {
            current.setNext(le);
            current=le;
          }
 else {
            exception=le;
            current=le;
          }
        }
      }
      if (exception != null)       throw exception;
    }
  }
  reset();
}

Fixed version (ground truth):
/** 
 * Flush any buffered data and reset this instance.
 */
public void doFinal() throws ListenerException {
  if (config.debug) {
    System.out.printf("String_Node_Str");
  }
  ListenerException exception=null, current=null;
  if (ndx > 0) {
    int off=Math.max(0,ndx - config.blockLength);
    int len=Math.min(ndx,config.blockLength);
    config.weakSum.check(buffer,off,len);
    Long oldOff=hashSearch(buffer,off,len);
    if (oldOff != null) {
      if (off > 0) {
        DataBlock d=new DataBlock(count - ndx,buffer,0,off);
        for (        MatcherListener l : listeners) {
          try {
            l.update(new MatcherEvent(d));
          }
 catch (          ListenerException le) {
            if (exception != null) {
              current.setNext(le);
              current=le;
            }
 else {
              exception=le;
              current=le;
            }
          }
        }
        if (exception != null)         throw exception;
      }
      Offsets o=new Offsets(oldOff.longValue(),count - len,len);
      for (      MatcherListener l : listeners) {
        try {
          l.update(new MatcherEvent(o));
        }
 catch (        ListenerException le) {
          if (exception != null) {
            current.setNext(le);
            current=le;
          }
 else {
            exception=le;
            current=le;
          }
        }
      }
      if (exception != null)       throw exception;
    }
 else {
      DataBlock d=new DataBlock(count - ndx,buffer,0,ndx);
      for (      MatcherListener l : listeners) {
        try {
          l.update(new MatcherEvent(d));
        }
 catch (        ListenerException le) {
          if (exception != null) {
            current.setNext(le);
            current=le;
          }
 else {
            exception=le;
            current=le;
          }
        }
      }
      if (exception != null)       throw exception;
    }
  }
  reset();
}