#vulnerable code 
                                public void close() {
        if (rpcChannel != null) {
            rpcChannel.close();
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void close() {
        Collection<RpcChannel> rpcChannels = rpcChannelMap.values();
        for (RpcChannel rpcChann : rpcChannels) {
            try {
                rpcChann.close();
            } catch (Exception e) {
                LOG.log(Level.SEVERE, e.getMessage(), e.getCause());
            }
        }
        
    }