#vulnerable code 
                                private BxDocument getDocumentFromZip(String filename) throws TransformationException, IOException {
        TrueVizToBxDocumentReader tvReader = new TrueVizToBxDocumentReader();
        Enumeration<? extends ZipEntry> entries = zipFile.entries();
        while (entries.hasMoreElements()) {
            ZipEntry zipEntry = (ZipEntry) entries.nextElement();
            if (zipEntry.getName().equals(filename)) {
                List<BxPage> pages = tvReader.read(new InputStreamReader(zipFile.getInputStream(zipEntry)));
                BxDocument newDoc = new BxDocument();
                for (BxPage page : pages) {
                    page.setParent(newDoc);
                }
                newDoc.setFilename(zipEntry.getName());
                newDoc.setPages(pages);
                return newDoc;
            }
        }
        return null;
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                private BxDocument getDocumentFromZip(String filename) throws TransformationException, IOException {
        TrueVizToBxDocumentReader tvReader = new TrueVizToBxDocumentReader();
        Enumeration<? extends ZipEntry> entries = zipFile.entries();
        while (entries.hasMoreElements()) {
            ZipEntry zipEntry = (ZipEntry) entries.nextElement();
            if (zipEntry.getName().equals(filename)) {
                List<BxPage> pages = tvReader.read(new InputStreamReader(zipFile.getInputStream(zipEntry), "UTF-8"));
                BxDocument newDoc = new BxDocument();
                for (BxPage page : pages) {
                    page.setParent(newDoc);
                }
                newDoc.setFilename(zipEntry.getName());
                newDoc.setPages(pages);
                return newDoc;
            }
        }
        return null;
    }