#fixed code
                                boolean hasConnected() {
        return connected;
    }
#vulnerable code 
                                void setTLSCertificateKeyPair(TLSCertificateKeyPair tlsCertificateKeyPair) {
        properties.put("clientKeyBytes", tlsCertificateKeyPair.getKeyPemBytes());
        properties.put("clientCertBytes", tlsCertificateKeyPair.getCertPEMBytes());

        Endpoint endpoint = Endpoint.createEndpoint(url, properties);
        foundClientTLSCertificateDigest = true;
        clientTLSCertificateDigest = endpoint.getClientTLSCertificateDigest();
        endorserClent = new EndorserClient(endpoint.getChannelBuilder());
    } 
                            #location 5 
                            #vulnerability type THREAD_SAFETY_VIOLATION