#fixed code
                                @Test
    public void testOverflow()
    {
        ArrayList<Statement> verifyList = new ArrayList<>();

        FastStatementList list = new FastStatementList();
        for (int i = 0; i < 100; i++)
        {
            StubStatement statement = new StubStatement();
            list.add(statement);
            verifyList.add(statement);
        }

        for (int i = 0; i < 100; i++)
        {
            Assert.assertNotNull("Element " + i, list.get(i));
            Assert.assertSame(verifyList.get(i), list.get(i));
        }
    }
#vulnerable code 
                                @Test
    public void testOverflow()
    {
        FastStatementList list = new FastStatementList();
        for (int i = 0; i < 100; i++)
        {
            list.add(new StubStatement());
        }

        for (int i = 0; i < 100; i++)
        {
            Assert.assertNotNull("Element " + i, list.get(i));
        }
    } 
                            #location 12 
                            #vulnerability type RESOURCE_LEAK