Buggy code:
public class CsvParser < T > { private static final Logger LOGGER = Logger . getLogger ( CsvParser . class . getName ( ) ) ; private final Class < T > classOfCSVBean ; private final CsvBangConfiguration conf ; private final byte [ ] [ ] keywordTable ; private final CsvGrammarActionType [ ] actions ; private final ConcurrentSkipListMap < CsvParser < T > . ActionKey , Deque < CsvGrammarAction < ? > > > stackByOffset ; public CsvParser ( Class < T > classOfCSVBean , CsvBangConfiguration conf ) throws CsvBangException { } public CsvParsingResult < T > parse ( final CsvDatagram csvDatagram ) throws CsvBangException { } public CsvParsingResult < T > internalParse ( final byte [ ] csvContent , final Deque < CsvGrammarAction < ? > > stack , final long startOffset , final int fileID , final boolean isLastDatagram , final boolean canAddFooter ) throws CsvBangException { } private void tryExecuteStack ( final Deque < CsvGrammarAction < ? > > stack , final CsvParsingResult < T > result , final int fileID ) throws CsvBangException { } public CsvParsingResult < T > flush ( ) throws CsvBangException { } private CsvGrammarAction < ? > initAction ( final Deque < CsvGrammarAction < ? > > stack , final long fileOffset , final int contentLength ) throws CsvBangException { } private void initStack ( final Deque < CsvGrammarAction < ? > > stack , final int fileID , final long fileOffset ) { } private byte [ ] [ ] initGrammar ( final CsvBangConfiguration conf , final List < CsvGrammarActionType > actionList ) throws CsvBangException { } private void sortKeyword ( final List < String > sortedKeywords , final String keyword ) { } private void addKeyword ( final List < String > keywordSortedByLength , final byte [ ] [ ] tableKeyword , final List < CsvGrammarActionType > actionList , final String keyword , final CsvGrammarActionType action ) throws CsvBangException { } private CsvParser < T > . ActionKey generateID ( final int fileID , final long startOffset , final long endOffset ) { } private int isKeyword ( final int index , final byte [ ] content , boolean isEnd ) { } private CsvGrammarAction < ? > generateAction ( final CsvGrammarActionType action , final int contentLength ) throws CsvBangException { switch ( action ) { case FIELD : return new FieldGrammarAction ( contentLength ) ; case RECORD : return new RecordGrammarAction < T > ( classOfCSVBean , conf ) ; case COMMENT : return new CommentGrammarAction ( conf , contentLength ) ; case QUOTE : return new QuoteGrammarAction ( contentLength ) ; case ESCAPE_CHARACTER : return new EscapeQuoteGrammarAction ( contentLength , conf ) ; case END : return new EndGrammarAction ( ) ; case START : return new StartGrammarAction < T > ( classOfCSVBean , conf , contentLength ) ; case HEADER : return new HeaderGrammarAction ( conf , contentLength ) ; case FOOTER : <START_BUG> return new FooterGrammarAction ( contentLength ) ; <END_BUG> default : return new UndefinedGrammarAction ( contentLength ) ; } } private void tryClearStack ( final CsvParsingResult < T > result , final Deque < CsvGrammarAction < ? > > stack , final CsvGrammarAction < ? > action , final CsvGrammarActionType actionType ) throws CsvBangException { } @ SuppressWarnings ( { "unchecked" } ) private boolean executeAction ( final CsvParsingResult < T > result , final Deque < CsvGrammarAction < ? > > stack , final CsvGrammarAction < ? > action ) throws CsvBangException { } private void addEndAction ( final Deque < CsvGrammarAction < ? > > stack , final CsvGrammarAction < ? > action ) throws CsvBangException { } private class ActionKey implements Comparable < CsvParser < T > . ActionKey > { public long startOffset = - 1 ; public int fileId = - 1 ; public long endOffset = - 1 ; @ Override @ SuppressWarnings ( "unchecked" ) public boolean equals ( Object obj ) { } @ Override public int compareTo ( CsvParser < T > . ActionKey o ) { } } }

Fix:
return new FooterGrammarAction ( conf , contentLength ) ;