Buggy code:
public class CSVFormat implements Serializable { private static final long serialVersionUID = 1L ; static boolean isLineBreak ( final Character c ) { } private final char delimiter ; private final Character quoteChar ; private final Quote quotePolicy ; private final Character commentStart ; private final Character escape ; private final boolean ignoreSurroundingSpaces ; private final boolean ignoreEmptyLines ; private final String recordSeparator ; private final String nullString ; private final String [ ] header ; private final boolean skipHeaderRecord ; public static final CSVFormat DEFAULT = new CSVFormat ( Constants . COMMA , Constants . DOUBLE_QUOTE_CHAR , null , null , null , false , true , Constants . CRLF , null , null , false ) ; public static final CSVFormat RFC4180 = CSVFormat . DEFAULT . withIgnoreEmptyLines ( false ) ; public static final CSVFormat EXCEL = CSVFormat . DEFAULT . withIgnoreEmptyLines ( false ) ; public static final CSVFormat TDF = CSVFormat . DEFAULT . withDelimiter ( Constants . TAB ) . withIgnoreSurroundingSpaces ( true ) ; public static final CSVFormat MYSQL = CSVFormat . DEFAULT . withDelimiter ( Constants . TAB ) . withEscape ( Constants . BACKSLASH ) . withIgnoreEmptyLines ( false ) . withQuoteChar ( null ) . withRecordSeparator ( Constants . LF ) ; static boolean isLineBreak ( final char c ) { } public static CSVFormat newFormat ( final char delimiter ) { } CSVFormat ( final char delimiter , final Character quoteChar , final Quote quotePolicy , final Character commentStart , final Character escape , final boolean ignoreSurroundingSpaces , final boolean ignoreEmptyLines , final String recordSeparator , final String nullString , final String [ ] header , boolean skipHeaderRecord ) { } @ Override public boolean equals ( final Object obj ) { } public String format ( final Object ... values ) { } public Character getCommentStart ( ) { } public char getDelimiter ( ) { } public Character getEscape ( ) { } public String [ ] getHeader ( ) { } public boolean getIgnoreEmptyLines ( ) { } public boolean getIgnoreSurroundingSpaces ( ) { } public String getNullString ( ) { } public Character getQuoteChar ( ) { } public Quote getQuotePolicy ( ) { } public String getRecordSeparator ( ) { } public boolean getSkipHeaderRecord ( ) { } @ Override public int hashCode ( ) { } public boolean isCommentingEnabled ( ) { } public boolean isEscaping ( ) { } public boolean isQuoting ( ) { } public CSVParser parse ( final Reader in ) throws IOException { } @ Override public String toString ( ) { } void validate ( ) throws IllegalStateException { if ( ( ( quoteChar ) != null ) && ( ( delimiter ) == ( quoteChar . charValue ( ) ) ) ) { throw new IllegalStateException ( ( ( "The<seq2seq4repair_space>quoteChar<seq2seq4repair_space>character<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>delimiter<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>('" + ( quoteChar ) ) + "')" ) ) ; } if ( ( ( escape ) != null ) && ( ( delimiter ) == ( escape . charValue ( ) ) ) ) { throw new IllegalStateException ( ( ( "The<seq2seq4repair_space>escape<seq2seq4repair_space>character<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>delimiter<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>('" + ( escape ) ) + "')" ) ) ; } if ( ( ( commentStart ) != null ) && ( ( delimiter ) == ( commentStart . charValue ( ) ) ) ) { throw new IllegalStateException ( ( ( "The<seq2seq4repair_space>comment<seq2seq4repair_space>start<seq2seq4repair_space>character<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>delimiter<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>('" + ( commentStart ) ) + "')" ) ) ; } if ( ( ( quoteChar ) != null ) && ( quoteChar . equals ( commentStart ) ) ) { throw new IllegalStateException ( ( ( "The<seq2seq4repair_space>comment<seq2seq4repair_space>start<seq2seq4repair_space>character<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>quoteChar<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>('" + ( commentStart ) ) + "')" ) ) ; } if ( ( ( escape ) != null ) && ( escape . equals ( commentStart ) ) ) { throw new IllegalStateException ( ( ( "The<seq2seq4repair_space>comment<seq2seq4repair_space>start<seq2seq4repair_space>and<seq2seq4repair_space>the<seq2seq4repair_space>escape<seq2seq4repair_space>character<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>('" + ( commentStart ) ) + "')" ) ) ; } if ( ( ( escape ) == null ) && ( ( quotePolicy ) == ( Quote . NONE ) ) ) { throw new IllegalStateException ( "No<seq2seq4repair_space>quotes<seq2seq4repair_space>mode<seq2seq4repair_space>set<seq2seq4repair_space>but<seq2seq4repair_space>no<seq2seq4repair_space>escape<seq2seq4repair_space>character<seq2seq4repair_space>is<seq2seq4repair_space>set" ) ; } if ( ( header ) != null ) { <START_BUG> Set < String > set = new HashSet < String > ( header . length ) ; <END_BUG> set . addAll ( Arrays . asList ( header ) ) ; if ( ( set . size ( ) ) != ( header . length ) ) { throw new IllegalStateException ( ( "The<seq2seq4repair_space>header<seq2seq4repair_space>contains<seq2seq4repair_space>duplicate<seq2seq4repair_space>names:<seq2seq4repair_space>" + ( Arrays . toString ( header ) ) ) ) ; } } } public CSVFormat withCommentStart ( final char commentStart ) { } public CSVFormat withCommentStart ( final Character commentStart ) { } public CSVFormat withDelimiter ( final char delimiter ) { } public CSVFormat withEscape ( final char escape ) { } public CSVFormat withEscape ( final Character escape ) { } public CSVFormat withHeader ( final String ... header ) { } public CSVFormat withIgnoreEmptyLines ( final boolean ignoreEmptyLines ) { } public CSVFormat withIgnoreSurroundingSpaces ( final boolean ignoreSurroundingSpaces ) { } public CSVFormat withNullString ( final String nullString ) { } public CSVFormat withQuoteChar ( final char quoteChar ) { } public CSVFormat withQuoteChar ( final Character quoteChar ) { } public CSVFormat withQuotePolicy ( final Quote quotePolicy ) { } public CSVFormat withRecordSeparator ( final char recordSeparator ) { } public CSVFormat withRecordSeparator ( final String recordSeparator ) { } public CSVFormat withSkipHeaderRecord ( final boolean skipHeaderRecord ) { } }

Fix:
final Set < String > set = new HashSet < String > ( header . length ) ;