#vulnerable code 
                                @Test
    public void testImporter() throws IOException, ParserConfigurationException, SAXException,
            TransformationException {
        BxPage page = new TrueVizToBxDocumentReader().read(new InputStreamReader(TrueVizToBxDocumentReaderTest.class.getResourceAsStream("/pl/edu/icm/cermine/structure/imports/MargImporterTest1.xml"))).get(0);
        boolean contains = false;
        boolean rightText = false;
        boolean rightSize = false;
        for (BxZone zone : page) {
            if (zone.getLabel() != null) {
                if (zone.getLabel().equals(BxZoneLabel.MET_AUTHOR)) {
                    contains = true;
                    if (zone.toText().trim().equalsIgnoreCase("Howard M  Schachter   Ba  Pham   Jim King tt\nStephanie Langford   David Moher".trim())) {
                        rightText = true;
                    }
                    if (zone.getBounds().getX() == 72 && zone.getBounds().getY() == 778 && zone.getBounds().getWidth() == 989 && zone.getBounds().getHeight() == 122) {
                        rightSize = true;
                    }
                }
            }
        }
        assertTrue(contains);
        assertTrue(rightText);
        assertTrue(rightSize);

        BxWord word = page.getChild(0).getChild(0).getChild(0);
        assertEquals("font-1", word.getChild(0).getFontName());
        assertEquals("font-2", word.getChild(1).getFontName());
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testImporter() throws IOException, ParserConfigurationException, SAXException,
            TransformationException {
        BxPage page = new TrueVizToBxDocumentReader().read(new InputStreamReader(TrueVizToBxDocumentReaderTest.class.getResourceAsStream("/pl/edu/icm/cermine/structure/imports/MargImporterTest1.xml"), "UTF-8")).get(0);
        boolean contains = false;
        boolean rightText = false;
        boolean rightSize = false;
        for (BxZone zone : page) {
            if (zone.getLabel() != null) {
                if (zone.getLabel().equals(BxZoneLabel.MET_AUTHOR)) {
                    contains = true;
                    if (zone.toText().trim().equalsIgnoreCase("Howard M  Schachter   Ba  Pham   Jim King tt\nStephanie Langford   David Moher".trim())) {
                        rightText = true;
                    }
                    if (zone.getBounds().getX() == 72 && zone.getBounds().getY() == 778 && zone.getBounds().getWidth() == 989 && zone.getBounds().getHeight() == 122) {
                        rightSize = true;
                    }
                }
            }
        }
        assertTrue(contains);
        assertTrue(rightText);
        assertTrue(rightSize);

        BxWord word = page.getChild(0).getChild(0).getChild(0);
        assertEquals("font-1", word.getChild(0).getFontName());
        assertEquals("font-2", word.getChild(1).getFontName());
    }