Program: 96595
Project: 96595
Buggy source:
private <T extends ConnectFuture>IoSessionInitializer<ConnectFuture> createParentInitializer(final ResourceAddress connectAddressNext,final IoHandler handler,final IoSessionInitializer<T> initializer,final DefaultConnectFuture wseConnectFuture){
  final ResourceAddress connectAddress=connectAddressNext.getTransport();
  Protocol protocol=bridgeServiceFactory.getTransportFactory().getProtocol(connectAddress.getResource());
  if (!(protocol instanceof HttpProtocol)) {
    final String message=format("String_Node_Str",connectAddressNext);
    if (logger.isInfoEnabled()) {
      logger.info(message);
    }
    throw new RuntimeException(message);
  }
  return new IoSessionInitializer<ConnectFuture>(){
    @Override public void initializeSession(    final IoSession parent,    ConnectFuture future){
      final IoSessionInitializer<T> wseSessionInitializer=new IoSessionInitializer<T>(){
        @Override public void initializeSession(        IoSession session,        T future){
          WsebSession wseSession=(WsebSession)session;
          wseSession.setHandler(handler);
          wseSession.getTransportSession().getFilterChain().fireSessionCreated();
          wseSession.getTransportSession().getFilterChain().fireSessionOpened();
          if (initializer != null) {
            initializer.initializeSession(session,future);
          }
        }
      }
;
      final long sequenceNo=0;
      final HttpSession httpSession=(HttpSession)parent;
      httpSession.setWriteHeader(HEADER_X_ACCEPT_COMMANDS,"String_Node_Str");
      httpSession.setWriteHeader(HttpHeaders.HEADER_X_SEQUENCE_NO,Long.toString(sequenceNo));
      final IoBufferAllocatorEx<WsBuffer> allocator=new WsebBufferAllocator(httpSession.getBufferAllocator());
      Callable<WsebSession> createSession=new Callable<WsebSession>(){
        @Override public WsebSession call() throws Exception {
          Callable<WsebSession> wseSessionFactory=new Callable<WsebSession>(){
            @Override public WsebSession call() throws Exception {
              WsebSession wsebSession=new WsebSession(httpSession.getIoLayer(),httpSession.getIoThread(),httpSession.getIoExecutor(),WsebConnector.this,getProcessor(),connectAddressNext,connectAddressNext,allocator,null,0,connectAddressNext.getOption(INACTIVITY_TIMEOUT),false,sequenceNo);
              wsebSession.suspendWrite();
              return wsebSession;
            }
          }
;
          return newSession(wseSessionInitializer,wseConnectFuture,wseSessionFactory);
        }
      }
;
      WSE_SESSION_FACTORY_KEY.set(httpSession,createSession);
      WSE_CONNECT_FUTURE_KEY.set(httpSession,wseConnectFuture);
    }
  }
;
}

Fixed version (ground truth):
private <T extends ConnectFuture>IoSessionInitializer<ConnectFuture> createParentInitializer(final ResourceAddress connectAddressNext,final IoHandler handler,final IoSessionInitializer<T> initializer,final DefaultConnectFuture wseConnectFuture){
  final ResourceAddress connectAddress=connectAddressNext.getTransport();
  Protocol protocol=bridgeServiceFactory.getTransportFactory().getProtocol(connectAddress.getResource());
  if (!(protocol instanceof HttpProtocol)) {
    final String message=format("String_Node_Str",connectAddressNext);
    if (logger.isInfoEnabled()) {
      logger.info(message);
    }
    throw new RuntimeException(message);
  }
  return new IoSessionInitializer<ConnectFuture>(){
    @Override public void initializeSession(    final IoSession parent,    ConnectFuture future){
      final IoSessionInitializer<T> wseSessionInitializer=new IoSessionInitializer<T>(){
        @Override public void initializeSession(        IoSession session,        T future){
          WsebSession wseSession=(WsebSession)session;
          wseSession.setHandler(handler);
          wseSession.getTransportSession().getFilterChain().fireSessionCreated();
          wseSession.getTransportSession().getFilterChain().fireSessionOpened();
          if (initializer != null) {
            initializer.initializeSession(session,future);
          }
        }
      }
;
      final long sequenceNo=0;
      final HttpSession httpSession=(HttpSession)parent;
      httpSession.setWriteHeader(HEADER_X_ACCEPT_COMMANDS,"String_Node_Str");
      httpSession.setWriteHeader(HttpHeaders.HEADER_X_SEQUENCE_NO,Long.toString(sequenceNo));
      final IoBufferAllocatorEx<WsBuffer> allocator=new WsebBufferAllocator(httpSession.getBufferAllocator());
      Callable<WsebSession> createSession=new Callable<WsebSession>(){
        @Override public WsebSession call() throws Exception {
          Callable<WsebSession> wseSessionFactory=new Callable<WsebSession>(){
            @Override public WsebSession call() throws Exception {
              WsebSession wsebSession=new WsebSession(httpSession.getIoLayer(),httpSession.getIoThread(),httpSession.getIoExecutor(),WsebConnector.this,getProcessor(),connectAddressNext,connectAddressNext,allocator,null,0,connectAddressNext.getOption(INACTIVITY_TIMEOUT),false,sequenceNo,null);
              wsebSession.suspendWrite();
              return wsebSession;
            }
          }
;
          return newSession(wseSessionInitializer,wseConnectFuture,wseSessionFactory);
        }
      }
;
      WSE_SESSION_FACTORY_KEY.set(httpSession,createSession);
      WSE_CONNECT_FUTURE_KEY.set(httpSession,wseConnectFuture);
    }
  }
;
}