#vulnerable code 
                                public InputStream openClassfile(String classname) {
        try {
            if (packageName == null || classname.startsWith(packageName)) {
                String jarname
                    = directory + classname.replace('.', '/') + ".class";
                URLConnection con = fetchClass0(hostname, port, jarname);
                return con.getInputStream();
            }
        }
        catch (IOException e) {}
        return null;    // not found
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public InputStream openClassfile(String classname) {
        try {
            URLConnection con = openClassfile0(classname);
            if (con != null)
                return con.getInputStream();
        }
        catch (IOException e) {}
        return null;        // not found
    }