Program: 91296
Project: 91296
Buggy source:
/** 
 * binds to the server socket and process data This method will block until interrupted
 * @throws Exception
 */
private void process() throws Exception {
  connectClient(udpReplicatorBuilder.port()).register(selector,OP_READ);
  serverConnector.connect();
  if (udpReplicatorBuilder.throttle() > 0)   throttler=new Throttler(selector,throttleInterval,maxBytesInInterval);
  for (; ; ) {
    final int n=selector.select(100);
    register(this.pendingRegistrations);
    if (throttler != null)     throttler.checkThrottleInterval();
    if (n == 0) {
      continue;
    }
    final Iterator it=selector.selectedKeys().iterator();
    final Set<SelectionKey> selectionKeys=selector.selectedKeys();
    for (    final SelectionKey key : selectionKeys) {
      it.remove();
      try {
        if (key.isReadable()) {
          final DatagramChannel socketChannel=(DatagramChannel)key.channel();
          reader.readAll(socketChannel);
        }
        if (key.isWritable()) {
          final DatagramChannel socketChannel=(DatagramChannel)key.channel();
          try {
            int len=writer.writeAll(socketChannel,udpModificationIterator);
            throttler.checkUnregisterSelector(len);
          }
 catch (          NotYetConnectedException e) {
            if (LOG.isDebugEnabled())             LOG.debug("String_Node_Str",e);
            serverConnector.connect();
          }
catch (          IOException e) {
            if (LOG.isDebugEnabled())             LOG.debug("String_Node_Str",e);
            serverConnector.connect();
          }
        }
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        try {
          key.channel().close();
          throttler.remove(key.channel());
          closeables.remove(key.channel());
        }
 catch (        IOException ex) {
        }
      }
      selectionKeys.clear();
    }
  }
}

Fixed version (ground truth):
/** 
 * binds to the server socket and process data This method will block until interrupted
 * @throws Exception
 */
private void process() throws Exception {
  connectClient(udpReplicatorBuilder.port()).register(selector,OP_READ);
  serverConnector.connect();
  if (udpReplicatorBuilder.throttle() > 0)   throttler=new Throttler(selector,throttleInterval,maxBytesInInterval);
  for (; ; ) {
    final int n=selector.select(100);
    register(this.pendingRegistrations);
    if (throttler != null)     throttler.checkThrottleInterval();
    if (n == 0) {
      continue;
    }
    final Set<SelectionKey> selectionKeys=selector.selectedKeys();
    for (    final SelectionKey key : selectionKeys) {
      try {
        if (key.isReadable()) {
          final DatagramChannel socketChannel=(DatagramChannel)key.channel();
          reader.readAll(socketChannel);
        }
        if (key.isWritable()) {
          final DatagramChannel socketChannel=(DatagramChannel)key.channel();
          try {
            int len=writer.writeAll(socketChannel,udpModificationIterator);
            throttler.checkUnregisterSelector(len);
          }
 catch (          NotYetConnectedException e) {
            if (LOG.isDebugEnabled())             LOG.debug("String_Node_Str",e);
            serverConnector.connect();
          }
catch (          IOException e) {
            if (LOG.isDebugEnabled())             LOG.debug("String_Node_Str",e);
            serverConnector.connect();
          }
        }
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        try {
          key.channel().close();
          throttler.remove(key.channel());
          closeables.remove(key.channel());
        }
 catch (        IOException ex) {
        }
      }
    }
    selectionKeys.clear();
  }
}