#vulnerable code 
                                @Test
    public void testEmptyInput() throws Exception {
        final ExtendedBufferedReader br = getBufferedReader("");
        assertEquals(END_OF_STREAM, br.read());
        assertEquals(END_OF_STREAM, br.lookAhead());
        assertEquals(END_OF_STREAM, br.getLastChar());
        assertNull(br.readLine());
        assertEquals(0, br.read(new char[10], 0, 0));
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testEmptyInput() throws Exception {
        final ExtendedBufferedReader br = getBufferedReader("");
        assertEquals(END_OF_STREAM, br.read());
        assertEquals(END_OF_STREAM, br.lookAhead());
        assertEquals(END_OF_STREAM, br.getLastChar());
        assertNull(br.readLine());
        assertEquals(0, br.read(new char[10], 0, 0));
        br.close();
    }