Program: 57814
Project: 57814
Buggy source:
@Override public void run(){
  LOG.info(this + "String_Node_Str" + interruptCheckPeriodMs);
  final TreeMap<Integer,Entry> entries=new TreeMap<Integer,Entry>();
  FdSet fdSet=new FdSet();
  addNotificationSocket(entries,fdSet);
  try {
    while (true) {
      lock.lock();
      try {
        for (        int fd : fdSet.getAndClearReadableFds()) {
          sendCallback("String_Node_Str",entries,fdSet,fd);
        }
        if (!(toAdd.isEmpty() && toRemove.isEmpty())) {
          for (Iterator<Entry> iter=toAdd.iterator(); iter.hasNext(); ) {
            Entry entry=iter.next();
            DomainSocket sock=entry.getDomainSocket();
            Entry prevEntry=entries.put(sock.fd,entry);
            Preconditions.checkState(prevEntry == null,this + "String_Node_Str" + "String_Node_Str"+ sock);
            if (LOG.isTraceEnabled()) {
              LOG.trace(this + "String_Node_Str" + sock.fd);
            }
            fdSet.add(sock.fd);
            iter.remove();
          }
          while (true) {
            Map.Entry<Integer,DomainSocket> entry=toRemove.firstEntry();
            if (entry == null)             break;
            sendCallback("String_Node_Str",entries,fdSet,entry.getValue().fd);
          }
          processedCond.signalAll();
        }
        if (closed) {
          LOG.info(toString() + "String_Node_Str");
          return;
        }
        if (Thread.interrupted()) {
          throw new InterruptedException();
        }
      }
  finally {
        lock.unlock();
      }
      doPoll0(interruptCheckPeriodMs,fdSet);
    }
  }
 catch (  InterruptedException e) {
    LOG.info(toString() + "String_Node_Str");
  }
catch (  IOException e) {
    LOG.error(toString() + "String_Node_Str",e);
  }
 finally {
    kick();
    for (    Entry entry : entries.values()) {
      sendCallback("String_Node_Str",entries,fdSet,entry.getDomainSocket().fd);
    }
    entries.clear();
    fdSet.close();
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (LOG.isDebugEnabled()) {
    LOG.debug(this + "String_Node_Str" + interruptCheckPeriodMs);
  }
  final TreeMap<Integer,Entry> entries=new TreeMap<Integer,Entry>();
  FdSet fdSet=new FdSet();
  addNotificationSocket(entries,fdSet);
  try {
    while (true) {
      lock.lock();
      try {
        for (        int fd : fdSet.getAndClearReadableFds()) {
          sendCallback("String_Node_Str",entries,fdSet,fd);
        }
        if (!(toAdd.isEmpty() && toRemove.isEmpty())) {
          for (Iterator<Entry> iter=toAdd.iterator(); iter.hasNext(); ) {
            Entry entry=iter.next();
            DomainSocket sock=entry.getDomainSocket();
            Entry prevEntry=entries.put(sock.fd,entry);
            Preconditions.checkState(prevEntry == null,this + "String_Node_Str" + "String_Node_Str"+ sock);
            if (LOG.isTraceEnabled()) {
              LOG.trace(this + "String_Node_Str" + sock.fd);
            }
            fdSet.add(sock.fd);
            iter.remove();
          }
          while (true) {
            Map.Entry<Integer,DomainSocket> entry=toRemove.firstEntry();
            if (entry == null)             break;
            sendCallback("String_Node_Str",entries,fdSet,entry.getValue().fd);
          }
          processedCond.signalAll();
        }
        if (closed) {
          if (LOG.isDebugEnabled()) {
            LOG.debug(toString() + "String_Node_Str");
          }
          return;
        }
        if (Thread.interrupted()) {
          throw new InterruptedException();
        }
      }
  finally {
        lock.unlock();
      }
      doPoll0(interruptCheckPeriodMs,fdSet);
    }
  }
 catch (  InterruptedException e) {
    LOG.info(toString() + "String_Node_Str");
  }
catch (  IOException e) {
    LOG.error(toString() + "String_Node_Str",e);
  }
 finally {
    kick();
    for (    Entry entry : entries.values()) {
      sendCallback("String_Node_Str",entries,fdSet,entry.getDomainSocket().fd);
    }
    entries.clear();
    fdSet.close();
  }
}