#vulnerable code 
                                @Override
    public boolean isConnected(final Endpoint endpoint) {
        return this.rpcClient.checkConnection(endpoint.toString());
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                @Override
    public boolean isConnected(final Endpoint endpoint) {
        final RpcClient rc = this.rpcClient;
        return rc != null && isConnected(rc, endpoint);
    }