#vulnerable code 
                                public void handleRequest(Buffer buffer) throws IOException {
        log.info("Received SSH_MSG_CHANNEL_REQUEST on channel {}", id);
        String req = buffer.getString();
        if ("exit-status".equals(req)) {
            buffer.getBoolean();
            synchronized (lock) {
                exitStatus = buffer.getInt();
                lock.notifyAll();
            }
        } else if ("exit-signal".equals(req)) {
            buffer.getBoolean();
            synchronized (lock) {
                exitSignal = buffer.getString();
                lock.notifyAll();
            }
        }
        // TODO: handle other channel requests
    } 
                            #location 13 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void handleRequest(Buffer buffer) throws IOException {
        log.info("Received SSH_MSG_CHANNEL_REQUEST on channel {}", id);
        String req = buffer.getString();
        if ("exit-status".equals(req)) {
            buffer.getBoolean();
            exitStatus = buffer.getInt();
            notifyStateChanged();
        } else if ("exit-signal".equals(req)) {
            buffer.getBoolean();
            exitSignal = buffer.getString();
            notifyStateChanged();
        }
        // TODO: handle other channel requests
    }