#vulnerable code 
                                @Override
    public HttpURLConnection openConnection(URL url, Proxy proxy) throws IOException {
        HttpURLConnection conn = super.openConnection(url, proxy);
        if (conn instanceof HttpsURLConnection) {
            ((HttpsURLConnection) conn).setSSLSocketFactory(createSocketFactory());
        }
        return conn;
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public HttpURLConnection openConnection(URL url, Proxy proxy) throws IOException {
        HttpURLConnection conn = super.openConnection(url, proxy);
        if (conn instanceof HttpsURLConnection) {
            HttpsURLConnection conns = (HttpsURLConnection) conn;
            conns.setSSLSocketFactory(createSocketFactory());
            conns.setHostnameVerifier(ALLOW_ALL_HOSTNAME_VERIFIER);
        }
        return conn;
    }