#vulnerable code 
                                public void testForEach() {
        List<String[]> records = new ArrayList<String[]>();
        
        String code = "a,b,c\n1,2,3\nx,y,z";
        Reader in = new StringReader(code);
        
        for (String[] record : new CSVParser(in)) {
            records.add(record);
        }
        
        assertEquals(3, records.size());
        assertTrue(Arrays.equals(new String[] {"a", "b", "c"}, records.get(0)));
        assertTrue(Arrays.equals(new String[]{"1", "2", "3"}, records.get(1)));
        assertTrue(Arrays.equals(new String[] {"x", "y", "z"}, records.get(2)));
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void testForEach() {
        List<String[]> records = new ArrayList<String[]>();
        
        Reader in = new StringReader("a,b,c\n1,2,3\nx,y,z");
        
        for (String[] record : CSVFormat.DEFAULT.parse(in)) {
            records.add(record);
        }
        
        assertEquals(3, records.size());
        assertTrue(Arrays.equals(new String[]{"a", "b", "c"}, records.get(0)));
        assertTrue(Arrays.equals(new String[]{"1", "2", "3"}, records.get(1)));
        assertTrue(Arrays.equals(new String[]{"x", "y", "z"}, records.get(2)));
    }