#vulnerable code 
                                @Test
    public void readerWriterTest() throws URISyntaxException, IOException, TransformationException, SAXException {
        File file = new File(HTMLDocContentStructureConvertersTest.class.getResource(modelFilePath).toURI());
        String expectedHTML = FileUtils.readFileToString(file, "UTF-8");
        
        InputStream is = HTMLDocContentStructureConvertersTest.class.getResourceAsStream(modelFilePath);
        InputStreamReader isr = new InputStreamReader(is);
        ContentStructure structure = reader.read(isr);
        String structureHTML = writer.write(structure);
        
        XMLUnit.setIgnoreWhitespace(true);
        Diff diff = new Diff(expectedHTML, structureHTML);
        
        assertTrue(diff.similar());
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void readerWriterTest() throws URISyntaxException, IOException, TransformationException, SAXException {
        File file = new File(HTMLDocContentStructureConvertersTest.class.getResource(modelFilePath).toURI());
        String expectedHTML = FileUtils.readFileToString(file, "UTF-8");
        
        InputStream is = HTMLDocContentStructureConvertersTest.class.getResourceAsStream(modelFilePath);
        InputStreamReader isr = new InputStreamReader(is, "UTF-8");
        ContentStructure structure = reader.read(isr);
        String structureHTML = writer.write(structure);
        
        XMLUnit.setIgnoreWhitespace(true);
        Diff diff = new Diff(expectedHTML, structureHTML);
        
        assertTrue(diff.similar());
    }