#vulnerable code 
                                @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        NettyChannel channel = m_channelMapper.get(ctx);
        String clientID = (String) channel.getAttribute(NettyChannel.ATTR_KEY_CLIENTID);
        m_messaging.lostConnection(channel, clientID);
        ctx.close(/*false*/);
        synchronized(m_channelMapper) {
            m_channelMapper.remove(ctx);
        }
    } 
                            #location 5 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
//        NettyChannel channel = m_channelMapper.get(ctx);
//        String clientID = (String) channel.getAttribute(NettyChannel.ATTR_KEY_CLIENTID);
        String clientID = (String) NettyUtils.getAttribute(ctx, NettyChannel.ATTR_KEY_CLIENTID);
        m_messaging.lostConnection(clientID);
        ctx.close(/*false*/);
//        synchronized(m_channelMapper) {
//            m_channelMapper.remove(ctx);
//        }
    }