#vulnerable code 
                                public void disconnect() throws IOException {
        shutdownLock.lock();
        try {
            if (isKeepAliveThreadRunning()) {
                keepAliveThreadExecutor.shutdownNow();
            }
            disconnectChannel();
        } finally {
            shutdownLock.unlock();
        }
        if (isKeepAliveThreadRunning()) {
            waitForKeepAliveThreadToBeTerminated();
        }
    } 
                            #location 7 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void disconnect() throws IOException {
        terminateKeepAliveThread();
        terminateConnect();
    }