#fixed code
                                public void testEndOfFileBehaviourExcel() throws Exception {
        String[] codes = {
                "hello,\r\n\r\nworld,\r\n",
                "hello,\r\n\r\nworld,",
                "hello,\r\n\r\nworld,\"\"\r\n",
                "hello,\r\n\r\nworld,\"\"",
                "hello,\r\n\r\nworld,\n",
                "hello,\r\n\r\nworld,",
                "hello,\r\n\r\nworld,\"\"\n",
                "hello,\r\n\r\nworld,\"\""
        };
        String[][] res = {
                {"hello", ""},
                {""},  // Excel format does not ignore empty lines
                {"world", ""}
        };
        
        for (String code : codes) {
            CSVParser parser = new CSVParser(new StringReader(code), CSVFormat.EXCEL);
            String[][] tmp = parser.getAllValues();
            assertEquals(res.length, tmp.length);
            assertTrue(tmp.length > 0);
            for (int i = 0; i < res.length; i++) {
                assertTrue(Arrays.equals(res[i], tmp[i]));
            }
        }
    }
#vulnerable code 
                                public void testEndOfFileBehaviourExcel() throws Exception {
        String[] codes = {
                "hello,\r\n\r\nworld,\r\n",
                "hello,\r\n\r\nworld,",
                "hello,\r\n\r\nworld,\"\"\r\n",
                "hello,\r\n\r\nworld,\"\"",
                "hello,\r\n\r\nworld,\n",
                "hello,\r\n\r\nworld,",
                "hello,\r\n\r\nworld,\"\"\n",
                "hello,\r\n\r\nworld,\"\""
        };
        String[][] res = {
                {"hello", ""},
                {""},  // Excel format does not ignore empty lines
                {"world", ""}
        };
        String code;
        for (int codeIndex = 0; codeIndex < codes.length; codeIndex++) {
            code = codes[codeIndex];
            CSVParser parser = new CSVParser(new StringReader(code), CSVFormat.EXCEL);
            String[][] tmp = parser.getAllValues();
            assertEquals(res.length, tmp.length);
            assertTrue(tmp.length > 0);
            for (int i = 0; i < res.length; i++) {
                assertTrue(Arrays.equals(res[i], tmp[i]));
            }
        }
    } 
                            #location 21 
                            #vulnerability type RESOURCE_LEAK