Program: 92448
Project: 92448
Buggy source:
public void run(){
  if (s_logger.isLoggable(Level.FINE))   s_logger.fine("String_Node_Str");
  m_threadPool.start();
  for (; ; ) {
    try {
      if (m_state != ST_STOPPING)       m_selector.select();
 else {
        if (m_selector.keys().size() == 0)         break;
 else         m_selector.selectNow();
      }
    }
 catch (    IOException ex) {
      if (s_logger.isLoggable(Level.WARNING))       s_logger.warning(ex.toString());
    }
    SelectorThreadRunnable strHead;
    assert(m_dummyRunnable.nextSelectorThreadRunnable == null);
    if (m_strTail.compareAndSet(null,m_dummyRunnable)) {
      assert(m_strHead == null);
      strHead=m_dummyRunnable;
    }
 else {
      while (m_strHead == null)       ;
      strHead=m_strHead;
      m_strHead=null;
    }
    Set<SelectionKey> selectedKeys=m_selector.selectedKeys();
    for (    SelectionKey key : selectedKeys) {
      ChannelHandler channelHandler=(ChannelHandler)key.attachment();
      channelHandler.handleReadyOps(m_threadPool);
    }
    selectedKeys.clear();
    while (strHead != null) {
      strHead.runInSelectorThread();
      SelectorThreadRunnable next=strHead.nextSelectorThreadRunnable;
      if (next == null) {
        if (m_strTail.compareAndSet(strHead,null))         break;
        while (strHead.nextSelectorThreadRunnable == null)         ;
        next=strHead.nextSelectorThreadRunnable;
      }
      strHead.nextSelectorThreadRunnable=null;
      strHead=next;
    }
  }
  try {
    m_threadPool.stopAndWait();
  }
 catch (  InterruptedException ex) {
    if (s_logger.isLoggable(Level.WARNING))     s_logger.warning(ex.toString());
  }
  for (  Map.Entry<Integer,DataBlockCache> me : m_dataBlockCache.entrySet())   me.getValue().clear(s_logger);
  m_dataBlockCache.clear();
  System.out.println(SocketChannelReader.s_pc.getStats());
  if (s_logger.isLoggable(Level.FINE))   s_logger.fine("String_Node_Str");
}

Fixed version (ground truth):
public void run(){
  if (s_logger.isLoggable(Level.FINE))   s_logger.fine("String_Node_Str");
  m_threadPool.start();
  for (; ; ) {
    try {
      if (m_state != ST_STOPPING)       m_selector.select();
 else {
        if (m_selector.keys().size() == 0)         break;
 else         m_selector.selectNow();
      }
    }
 catch (    IOException ex) {
      if (s_logger.isLoggable(Level.WARNING))       s_logger.warning(ex.toString());
    }
    SelectorThreadRunnable strHead;
    assert(m_dummyRunnable.nextSelectorThreadRunnable == null);
    if (m_strTail.compareAndSet(null,m_dummyRunnable)) {
      assert(m_strHead == null);
      strHead=m_dummyRunnable;
    }
 else {
      while (m_strHead == null)       ;
      strHead=m_strHead;
      m_strHead=null;
    }
    Set<SelectionKey> selectedKeys=m_selector.selectedKeys();
    for (    SelectionKey key : selectedKeys) {
      ChannelHandler channelHandler=(ChannelHandler)key.attachment();
      channelHandler.handleReadyOps(m_threadPool);
    }
    selectedKeys.clear();
    while (strHead != null) {
      strHead.runInSelectorThread();
      SelectorThreadRunnable next=strHead.nextSelectorThreadRunnable;
      if (next == null) {
        if (m_strTail.compareAndSet(strHead,null))         break;
        while (strHead.nextSelectorThreadRunnable == null)         ;
        next=strHead.nextSelectorThreadRunnable;
      }
      strHead.nextSelectorThreadRunnable=null;
      strHead=next;
    }
  }
  try {
    m_threadPool.stopAndWait();
  }
 catch (  InterruptedException ex) {
    if (s_logger.isLoggable(Level.WARNING))     s_logger.warning(ex.toString());
  }
  for (  Map.Entry<Integer,DataBlockCache> me : m_dataBlockCache.entrySet())   me.getValue().clear(s_logger);
  m_dataBlockCache.clear();
  System.out.println(SocketChannelReader.s_pc.getStats());
  System.out.println(SocketChannelReader.s_sc.getStats());
  if (s_logger.isLoggable(Level.FINE))   s_logger.fine("String_Node_Str");
}