#fixed code
                                public void exceptionCaught(Throwable t) {
        log.warn("Exception caught", t);
        try {
            if (t instanceof SshException) {
                int code = ((SshException) t).getDisconnectCode();
                if (code > 0) {
                    disconnect(code, t.getMessage());
                    return;
                }
            }
        } catch (Throwable t2) {
            // Ignore
        }
        close();
    }
#vulnerable code 
                                public void exceptionCaught(Throwable t) {
        log.warn("Exception caught", t);
        try {
            if (t instanceof SshException) {
                int code = ((SshException) t).getDisconnectCode();
                if (code > 0) {
                    disconnect(code, t.getMessage());
                }
            }
        } catch (Throwable t2) {
            // Ignore
        }
        close();
    } 
                            #location 13 
                            #vulnerability type THREAD_SAFETY_VIOLATION