Program: 96601
Project: 96601
Buggy source:
@Override public void operationComplete(UpgradeFuture future){
  final IoSessionEx parent=(IoSessionEx)future.getSession();
  final Callable<WsnSession> createSession=new Callable<WsnSession>(){
    @Override public WsnSession call() throws Exception {
      Callable<WsnSession> wsnSessionFactory=new Callable<WsnSession>(){
        @Override public WsnSession call() throws Exception {
          final ResourceAddress localAddress=resourceAddressFactory.newResourceAddress(wsnConnectAddress,BridgeSession.LOCAL_ADDRESS.get(httpSession));
          IoBufferAllocatorEx<?> parentAllocator=parent.getBufferAllocator();
          WsBufferAllocator wsAllocator=new WsBufferAllocator(parentAllocator);
          return new WsnSession(WsnConnector.this,getProcessor(),localAddress,wsnConnectAddress,parent,wsAllocator,httpSession.getRequestURI(),null,WebSocketWireProtocol.RFC_6455);
        }
      }
;
      return newSession(wsnSessionInitializer,wsnConnectFuture,wsnSessionFactory);
    }
  }
;
  String wsAcceptHeader=httpSession.getReadHeader("String_Node_Str");
  if (wsAcceptHeader == null) {
    logger.info("String_Node_Str");
    wsnConnectFuture.setException(new Exception("String_Node_Str"));
    return;
  }
  String frameType=httpSession.getReadHeader("String_Node_Str");
  if ("String_Node_Str".equals(frameType)) {
    parent.setAttribute(ENCODING_KEY,Encoding.BINARY);
  }
 else   if ("String_Node_Str".equals(frameType)) {
    parent.setAttribute(ENCODING_KEY,Encoding.BASE64);
  }
 else {
    parent.setAttribute(ENCODING_KEY,Encoding.TEXT);
  }
  WSN_SESSION_FACTORY_KEY.set(parent,createSession);
  parent.setAttribute(WSN_CONNECT_ADDRESS_KEY,wsnConnectAddress);
}

Fixed version (ground truth):
@Override public void operationComplete(UpgradeFuture future){
  final IoSessionEx parent=(IoSessionEx)future.getSession();
  final Callable<WsnSession> createSession=new Callable<WsnSession>(){
    @Override public WsnSession call() throws Exception {
      Callable<WsnSession> wsnSessionFactory=new Callable<WsnSession>(){
        @Override public WsnSession call() throws Exception {
          final ResourceAddress localAddress=resourceAddressFactory.newResourceAddress(wsnConnectAddress,BridgeSession.LOCAL_ADDRESS.get(httpSession));
          IoBufferAllocatorEx<?> parentAllocator=parent.getBufferAllocator();
          WsBufferAllocator wsAllocator=new WsBufferAllocator(parentAllocator);
          return new WsnSession(WsnConnector.this,getProcessor(),localAddress,wsnConnectAddress,parent,wsAllocator,httpSession.getRequestURI(),null,WebSocketWireProtocol.RFC_6455,null);
        }
      }
;
      return newSession(wsnSessionInitializer,wsnConnectFuture,wsnSessionFactory);
    }
  }
;
  String wsAcceptHeader=httpSession.getReadHeader("String_Node_Str");
  if (wsAcceptHeader == null) {
    logger.info("String_Node_Str");
    wsnConnectFuture.setException(new Exception("String_Node_Str"));
    return;
  }
  String frameType=httpSession.getReadHeader("String_Node_Str");
  if ("String_Node_Str".equals(frameType)) {
    parent.setAttribute(ENCODING_KEY,Encoding.BINARY);
  }
 else   if ("String_Node_Str".equals(frameType)) {
    parent.setAttribute(ENCODING_KEY,Encoding.BASE64);
  }
 else {
    parent.setAttribute(ENCODING_KEY,Encoding.TEXT);
  }
  WSN_SESSION_FACTORY_KEY.set(parent,createSession);
  parent.setAttribute(WSN_CONNECT_ADDRESS_KEY,wsnConnectAddress);
}