Buggy code:
public class CSVParserTest { private static final String CSVINPUT = "a,b,c,d\n" + ( ( "<seq2seq4repair_space>a<seq2seq4repair_space>,<seq2seq4repair_space>b<seq2seq4repair_space>,<seq2seq4repair_space>1<seq2seq4repair_space>2<seq2seq4repair_space>\n" + "\"foo<seq2seq4repair_space>baar\",<seq2seq4repair_space>b,\n" ) + "<seq2seq4repair_space>\"foo\n,,\n\"\",,\n\"\"\",d,e\n" ) ; private static final String [ ] [ ] RESULT = new String [ ] [ ] { new String [ ] { "a" , "b" , "c" , "d" } , new String [ ] { "a" , "b" , "1<seq2seq4repair_space>2" } , new String [ ] { "foo<seq2seq4repair_space>baar" , "b" , "" } , new String [ ] { "foo\n,,\n\",,\n\"" , "d" , "e" } } ; @ Test public void testGetLine ( ) throws IOException { } @ Test public void testGetRecords ( ) throws IOException { } @ Test public void testExcelFormat1 ( ) throws IOException { } @ Test public void testExcelFormat2 ( ) throws Exception { } @ Test public void testEndOfFileBehaviourExcel ( ) throws Exception { } @ Test public void testEndOfFileBehaviorCSV ( ) throws Exception { } @ Test public void testEmptyLineBehaviourExcel ( ) throws Exception { } @ Test public void testEmptyLineBehaviourCSV ( ) throws Exception { } @ Test public void testEmptyFile ( ) throws Exception { } @ Test public void testCSV57 ( ) throws Exception { } @ Test @ Ignore public void testBackslashEscapingOld ( ) throws IOException { } @ Test public void testBackslashEscaping ( ) throws IOException { final String code = "one,two,three\n" + ( ( ( ( ( ( ( ( ( "\'\',\'\'\n" + "//\',//\'\n" ) + "\'//\'\',\'//\'\'\n" ) + "\'\'\'\',\'\'\'\'\n" ) + "//,,//,\n" ) + "////,////\n" ) + "\'////\',\'////\'\n" ) + "<seq2seq4repair_space>8<seq2seq4repair_space>,<seq2seq4repair_space>\"quoted<seq2seq4repair_space>\"\"<seq2seq4repair_space>//\"<seq2seq4repair_space>////<seq2seq4repair_space>string\"<seq2seq4repair_space>\n" ) + "9,<seq2seq4repair_space>//\n<seq2seq4repair_space>\n" ) + "" ) ; <START_BUG> final String [ ] [ ] res = new String [ ] [ ] { new String [ ] { "one" , "two" , "three" } , new String [ ] { "" , "" } , new String [ ] { "'" , "'" } , new String [ ] { "'" , "'" } , new String [ ] { "'" , "'" } , new String [ ] { "," , "," } , new String [ ] { "//" , "//" } , new String [ ] { "//" , "//" } , new String [ ] { "<seq2seq4repair_space>8<seq2seq4repair_space>" , "<seq2seq4repair_space>\"quoted<seq2seq4repair_space>\"\"<seq2seq4repair_space>\"<seq2seq4repair_space>//<seq2seq4repair_space>string\"<seq2seq4repair_space>" } , new String [ ] { "9" , "<seq2seq4repair_space>\n<seq2seq4repair_space>" } } ; <END_BUG> final CSVFormat format = CSVFormat . newBuilder ( ',' ) . withQuoteChar ( '\'' ) . withEscape ( '//' ) . withIgnoreEmptyLines ( true ) . withRecordSeparator ( Constants . CRLF ) . build ( ) ; final CSVParser parser = new CSVParser ( code , format ) ; final List < CSVRecord > records = parser . getRecords ( ) ; assertTrue ( ( ( records . size ( ) ) > 0 ) ) ; Utils . compare ( "Records<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>expected<seq2seq4repair_space>result" , res , records ) ; } @ Test public void testBackslashEscaping2 ( ) throws IOException { } @ Test public void testDefaultFormat ( ) throws IOException { } @ Test public void testCarriageReturnLineFeedEndings ( ) throws IOException { } @ Test public void testCarriageReturnEndings ( ) throws IOException { } @ Test public void testLineFeedEndings ( ) throws IOException { } @ Test public void testIgnoreEmptyLines ( ) throws IOException { } @ Test public void testForEach ( ) throws Exception { } @ Test public void testRoundtrip ( ) throws Exception { } @ Test public void testIterator ( ) throws Exception { } @ Test public void testHeader ( ) throws Exception { } @ Test public void testHeaderComment ( ) throws Exception { } @ Test public void testProvidedHeader ( ) throws Exception { } @ Test public void testMappedButNotSetAsOutlook2007ContactExport ( ) throws Exception { } @ Test public void testGetHeaderMap ( ) throws Exception { } @ Test public void testGetLineNumberWithLF ( ) throws Exception { } @ Test public void testGetLineNumberWithCRLF ( ) throws Exception { } @ Test public void testGetLineNumberWithCR ( ) throws Exception { } @ Test public void testGetRecordNumberWithLF ( ) throws Exception { } @ Test public void testGetRecordWithMultiiLineValues ( ) throws Exception { } @ Test public void testGetRecordNumberWithCRLF ( ) throws Exception { } @ Test public void testGetRecordNumberWithCR ( ) throws Exception { } private void validateRecordNumbers ( final String lineSeparator ) throws IOException { } private void validateLineNumbers ( final String lineSeparator ) throws IOException { } }

Fix:
final String [ ] [ ] res = new String [ ] [ ] { new String [ ] { "one" , "two" , "three" } , new String [ ] { "" , "" } , new String [ ] { "'" , "'" } , new String [ ] { "'" , "'" } , new String [ ] { "'" , "'" } , new String [ ] { "," , "," } , new String [ ] { "//" , "//" } , new String [ ] { "//" , "//" } , new String [ ] { "<seq2seq4repair_space>8<seq2seq4repair_space>" , "<seq2seq4repair_space>\"quoted<seq2seq4repair_space>\"\"<seq2seq4repair_space>//\"<seq2seq4repair_space>//<seq2seq4repair_space>string\"<seq2seq4repair_space>" } , new String [ ] { "9" , "<seq2seq4repair_space>\n<seq2seq4repair_space>" } } ;