#vulnerable code 
                                @Test
    public void testContents() throws IOException {
        CompoundDocument document = createTestDocument();

        Entry root = document.getRootEntry();

        assertNotNull(root);

        SortedSet<Entry> children = new TreeSet<Entry>(root.getChildEntries());
        assertEquals(25, children.size());

        // Weirdness in the file format, name is *written backwards* 1-24 + Catalog
        for (String name : "1,2,3,4,5,6,7,8,9,01,02,11,12,21,22,31,32,41,42,51,61,71,81,91,Catalog".split(",")) {
            assertEquals(name, children.first().getName());
            children.remove(children.first());
        }
    } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testContents() throws IOException {
        try (CompoundDocument document = createTestDocument()) {
            Entry root = document.getRootEntry();

            assertNotNull(root);

            SortedSet<Entry> children = new TreeSet<Entry>(root.getChildEntries());
            assertEquals(25, children.size());

            // Weirdness in the file format, name is *written backwards* 1-24 + Catalog
            for (String name : "1,2,3,4,5,6,7,8,9,01,02,11,12,21,22,31,32,41,42,51,61,71,81,91,Catalog".split(",")) {
                assertEquals(name, children.first().getName());
                children.remove(children.first());
            }
        }
    }