Program: 49468
Project: 49468
Buggy source:
private void tryToConnect(final InetSocketAddress socketAddress,final int timeout) throws Exception {
  final SocketChannel socketChannel=SocketChannel.open();
  connectionManager.initSocket(socketChannel.socket());
  if (!connectionManager.ioService.isSocketBindAny()) {
    final Address thisAddress=connectionManager.ioService.getThisAddress();
    socketChannel.socket().bind(new InetSocketAddress(thisAddress.getInetAddress(),0));
  }
  final String message="String_Node_Str" + socketAddress + "String_Node_Str"+ timeout+ "String_Node_Str"+ connectionManager.ioService.isSocketBindAny();
  log(Level.FINEST,message);
  try {
    socketChannel.configureBlocking(true);
    if (timeout > 0) {
      socketChannel.socket().connect(socketAddress,timeout);
    }
 else {
      socketChannel.connect(socketAddress);
    }
    log(Level.FINEST,"String_Node_Str" + address + "String_Node_Str"+ socketChannel.socket());
    MemberSocketInterceptor memberSocketInterceptor=connectionManager.getMemberSocketInterceptor();
    if (memberSocketInterceptor != null) {
      log(Level.FINEST,"String_Node_Str" + memberSocketInterceptor + "String_Node_Str"+ socketChannel);
      memberSocketInterceptor.onConnect(socketChannel.socket());
    }
    socketChannel.configureBlocking(false);
    final SocketChannelWrapper socketChannelWrapper=connectionManager.wrapSocketChannel(socketChannel,true);
    Connection connection=connectionManager.assignSocketChannel(socketChannelWrapper);
    connectionManager.sendBindRequest(connection,address,true);
  }
 catch (  Exception e) {
    closeSocket(socketChannel);
    final Level level=silent ? Level.FINEST : Level.INFO;
    log(level,"String_Node_Str" + socketAddress + "String_Node_Str"+ e.getClass().getSimpleName()+ "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
    throw e;
  }
}

Fixed version (ground truth):
private void tryToConnect(final InetSocketAddress socketAddress,final int timeout) throws Exception {
  final SocketChannel socketChannel=SocketChannel.open();
  connectionManager.initSocket(socketChannel.socket());
  if (!connectionManager.ioService.isSocketBindAny()) {
    final Address thisAddress=connectionManager.ioService.getThisAddress();
    socketChannel.socket().bind(new InetSocketAddress(thisAddress.getInetAddress(),0));
  }
  final String message="String_Node_Str" + socketAddress + "String_Node_Str"+ timeout+ "String_Node_Str"+ connectionManager.ioService.isSocketBindAny();
  log(Level.INFO,message);
  try {
    socketChannel.configureBlocking(true);
    if (timeout > 0) {
      socketChannel.socket().connect(socketAddress,timeout);
    }
 else {
      socketChannel.connect(socketAddress);
    }
    log(Level.FINEST,"String_Node_Str" + address + "String_Node_Str"+ socketChannel.socket());
    MemberSocketInterceptor memberSocketInterceptor=connectionManager.getMemberSocketInterceptor();
    if (memberSocketInterceptor != null) {
      log(Level.FINEST,"String_Node_Str" + memberSocketInterceptor + "String_Node_Str"+ socketChannel);
      memberSocketInterceptor.onConnect(socketChannel.socket());
    }
    socketChannel.configureBlocking(false);
    final SocketChannelWrapper socketChannelWrapper=connectionManager.wrapSocketChannel(socketChannel,true);
    Connection connection=connectionManager.assignSocketChannel(socketChannelWrapper);
    connectionManager.sendBindRequest(connection,address,true);
  }
 catch (  Exception e) {
    closeSocket(socketChannel);
    final Level level=silent ? Level.FINEST : Level.INFO;
    log(level,"String_Node_Str" + socketAddress + "String_Node_Str"+ e.getClass().getSimpleName()+ "String_Node_Str"+ e.getMessage()+ "String_Node_Str");
    throw e;
  }
}