#vulnerable code 
                                public static BxDocument getDocument(File file) throws IOException, TransformationException {
        TrueVizToBxDocumentReader tvReader = new TrueVizToBxDocumentReader();
        BxDocument newDoc = new BxDocument();
        InputStream is = new FileInputStream(file);
        try {
            List<BxPage> pages = tvReader.read(new InputStreamReader(is));
            for (BxPage page : pages) {
                page.setParent(newDoc);
            }
            newDoc.setFilename(file.getName());
            newDoc.setPages(pages);
            return newDoc;
        } finally {
            is.close();
        }
    } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static BxDocument getDocument(File file) throws IOException, TransformationException {
        TrueVizToBxDocumentReader tvReader = new TrueVizToBxDocumentReader();
        BxDocument newDoc = new BxDocument();
        InputStream is = new FileInputStream(file);
        try {
            List<BxPage> pages = tvReader.read(new InputStreamReader(is, "UTF-8"));
            for (BxPage page : pages) {
                page.setParent(newDoc);
            }
            newDoc.setFilename(file.getName());
            newDoc.setPages(pages);
            return newDoc;
        } finally {
            is.close();
        }
    }