output: #fixed code
                                  @Test
      public void testExcelPrintAllArrayOfLists() throws IOException {
          final StringWriter sw = new StringWriter();
          final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.EXCEL);
          printer.printRecords(new List[] { Arrays.asList(new String[] { "r1c1", "r1c2" }), Arrays.asList(new String[] { "r2c1", "r2c2" }) });
          assertEquals("r1c1,r1c2" + recordSeparator + "r2c1,r2c2" + recordSeparator, sw.toString());
          printer.close();
      }
input: #vulnerable code 
                                  @Test
      public void testExcelPrintAllArrayOfLists() throws IOException {
          final StringWriter sw = new StringWriter();
          final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.EXCEL);
          printer.printRecords(new List[] { Arrays.asList(new String[] { "r1c1", "r1c2" }), Arrays.asList(new String[] { "r2c1", "r2c2" }) });
          assertEquals("r1c1,r1c2" + recordSeparator + "r2c1,r2c2" + recordSeparator, sw.toString());
      } 
                              #location 5 
                              #vulnerability type RESOURCE_LEAK