Buggy code:
public class CSVParser { private static final int INITIAL_TOKEN_LENGTH = 50 ; protected static final int TT_INVALID = - 1 ; protected static final int TT_TOKEN = 0 ; protected static final int TT_EOF = 1 ; protected static final int TT_EORECORD = 2 ; private static final String [ ] EMPTY_STRING_ARRAY = new String [ 0 ] ; private final ExtendedBufferedReader in ; private final CSVStrategy strategy ; private final ArrayList record = new ArrayList ( ) ; private final CSVParser . Token reusableToken = new CSVParser . Token ( ) ; private final CharBuffer wsBuf = new CharBuffer ( ) ; private final CharBuffer code = new CharBuffer ( 4 ) ; static class Token { int type = CSVParser . TT_INVALID ; CharBuffer content = new CharBuffer ( CSVParser . INITIAL_TOKEN_LENGTH ) ; boolean isReady ; CSVParser . Token reset ( ) { } } public CSVParser ( InputStream input ) { } public CSVParser ( Reader input ) { } public CSVParser ( Reader input , char delimiter ) { } public CSVParser ( Reader input , char delimiter , char encapsulator , char commentStart ) { } public CSVParser ( Reader input , CSVStrategy strategy ) { } public String [ ] [ ] getAllValues ( ) throws IOException { } public String nextValue ( ) throws IOException { } public String [ ] getLine ( ) throws IOException { } public int getLineNumber ( ) { } protected CSVParser . Token nextToken ( ) throws IOException { } protected CSVParser . Token nextToken ( CSVParser . Token tkn ) throws IOException { wsBuf . clear ( ) ; int lastChar = in . readAgain ( ) ; int c = in . read ( ) ; boolean eol = isEndOfLine ( c ) ; c = in . readAgain ( ) ; while ( ( ( ( strategy . getIgnoreEmptyLines ( ) ) && eol ) && ( ( lastChar == '\n' ) || ( lastChar == ( ExtendedBufferedReader . UNDEFINED ) ) ) ) && ( ! ( isEndOfFile ( lastChar ) ) ) ) { lastChar = c ; c = in . read ( ) ; eol = isEndOfLine ( c ) ; c = in . readAgain ( ) ; if ( isEndOfFile ( c ) ) { tkn . type = CSVParser . TT_EOF ; return tkn ; } } if ( ( isEndOfFile ( lastChar ) ) || ( ( lastChar != ( strategy . getDelimiter ( ) ) ) && ( isEndOfFile ( c ) ) ) ) { tkn . type = CSVParser . TT_EOF ; return tkn ; } <START_BUG> while ( ! ( tkn . isReady ) ) { <END_BUG> while ( ( ( strategy . getIgnoreLeadingWhitespaces ( ) ) && ( isWhitespace ( c ) ) ) && ( ! eol ) ) { wsBuf . append ( ( ( char ) ( c ) ) ) ; c = in . read ( ) ; eol = isEndOfLine ( c ) ; } if ( c == ( strategy . getCommentStart ( ) ) ) { in . readLine ( ) ; tkn = nextToken ( tkn . reset ( ) ) ; } else if ( c == ( strategy . getDelimiter ( ) ) ) { tkn . type = CSVParser . TT_TOKEN ; tkn . isReady = true ; } else if ( eol ) { tkn . type = CSVParser . TT_EORECORD ; tkn . isReady = true ; } else if ( c == ( strategy . getEncapsulator ( ) ) ) { encapsulatedTokenLexer ( tkn , c ) ; } else if ( isEndOfFile ( c ) ) { tkn . type = CSVParser . TT_EOF ; tkn . isReady = true ; } else { if ( ! ( strategy . getIgnoreLeadingWhitespaces ( ) ) ) { tkn . content . append ( wsBuf ) ; } simpleTokenLexer ( tkn , c ) ; } } return tkn ; } private CSVParser . Token simpleTokenLexer ( CSVParser . Token tkn , int c ) throws IOException { } private CSVParser . Token encapsulatedTokenLexer ( CSVParser . Token tkn , int c ) throws IOException { } protected int unicodeEscapeLexer ( int c ) throws IOException { } private int readEscape ( int c ) throws IOException { } public CSVStrategy getStrategy ( ) { } private boolean isWhitespace ( int c ) { } private boolean isEndOfLine ( int c ) throws IOException { } private boolean isEndOfFile ( int c ) { } }

Fix:
while ( ( ! ( tkn . isReady ) ) && ( ( tkn . type ) != ( CSVParser . TT_EOF ) ) ) {