Buggy code:
public class StrTokenizer implements Cloneable , ListIterator { private static final StrTokenizer CSV_TOKENIZER_PROTOTYPE ; private static final StrTokenizer TSV_TOKENIZER_PROTOTYPE ; private char [ ] chars ; private String text ; private String [ ] tokens ; private int tokenPos ; private StrMatcher delim = StrMatcher . splitMatcher ( ) ; private StrMatcher quote = StrMatcher . noneMatcher ( ) ; private StrMatcher ignored = StrMatcher . noneMatcher ( ) ; private StrMatcher trimmer = StrMatcher . noneMatcher ( ) ; private boolean emptyAsNull = false ; private boolean ignoreEmptyTokens = true ; private static StrTokenizer getCSVClone ( ) { } public static StrTokenizer getCSVInstance ( ) { } public static StrTokenizer getCSVInstance ( String input ) { } public static StrTokenizer getCSVInstance ( char [ ] input ) { } private static StrTokenizer getTSVClone ( ) { } public static StrTokenizer getTSVInstance ( ) { } public static StrTokenizer getTSVInstance ( String input ) { } public static StrTokenizer getTSVInstance ( char [ ] input ) { } public StrTokenizer ( ) { } public StrTokenizer ( String input ) { } public StrTokenizer ( String input , char delim ) { } public StrTokenizer ( String input , String delim ) { } public StrTokenizer ( String input , StrMatcher delim ) { } public StrTokenizer ( String input , char delim , char quote ) { } public StrTokenizer ( String input , StrMatcher delim , StrMatcher quote ) { } public StrTokenizer ( char [ ] input ) { } public StrTokenizer ( char [ ] input , char delim ) { } public StrTokenizer ( char [ ] input , String delim ) { } public StrTokenizer ( char [ ] input , StrMatcher delim ) { } public StrTokenizer ( char [ ] input , char delim , char quote ) { } public StrTokenizer ( char [ ] input , StrMatcher delim , StrMatcher quote ) { } public int size ( ) { } public String nextToken ( ) { } public String previousToken ( ) { } public String [ ] getAllTokens ( ) { } public StrTokenizer reset ( ) { } public StrTokenizer reset ( String input ) { } public StrTokenizer reset ( char [ ] input ) { } public boolean hasNext ( ) { } public Object next ( ) { } public int nextIndex ( ) { } public boolean hasPrevious ( ) { } public Object previous ( ) { } public int previousIndex ( ) { } public void remove ( ) { } public void set ( Object obj ) { } public void add ( Object obj ) { } private void tokenize ( ) { } private String [ ] readTokens ( ) { } private void addToken ( List list , String tok ) { } private int readNextToken ( char [ ] chars , int start , int len , StrBuilder workArea , List tokens ) { } private int readWithQuotes ( char [ ] chars , int start , int len , StrBuilder workArea , List tokens , int quoteStart , int quoteLen ) { } private boolean isQuote ( char [ ] chars , int pos , int len , int quoteStart , int quoteLen ) { } public StrMatcher getDelimiterMatcher ( ) { } public StrTokenizer setDelimiterMatcher ( StrMatcher delim ) { } public StrTokenizer setDelimiterChar ( char delim ) { } public StrTokenizer setDelimiterString ( String delim ) { } public StrMatcher getQuoteMatcher ( ) { } public StrTokenizer setQuoteMatcher ( StrMatcher quote ) { } public StrTokenizer setQuoteChar ( char quote ) { } public StrMatcher getIgnoredMatcher ( ) { } public StrTokenizer setIgnoredMatcher ( StrMatcher ignored ) { } public StrTokenizer setIgnoredChar ( char ignored ) { } public StrMatcher getTrimmerMatcher ( ) { } public StrTokenizer setTrimmerMatcher ( StrMatcher trimmer ) { } public boolean isEmptyTokenAsNull ( ) { } public StrTokenizer setEmptyTokenAsNull ( boolean emptyAsNull ) { } public boolean isIgnoreEmptyTokens ( ) { } public StrTokenizer setIgnoreEmptyTokens ( boolean ignoreEmptyTokens ) { } public String getContent ( ) { } public Object clone ( ) { try { StrTokenizer cloned = ( ( StrTokenizer ) ( super . clone ( ) ) ) ; if ( ( cloned . chars ) != null ) { <START_BUG> cloned . chars = cloned . chars ; <END_BUG> } cloned . reset ( ) ; return cloned ; } catch ( CloneNotSupportedException ex ) { return null ; } } }

Fix:
cloned . chars = ( ( char [ ] ) ( cloned . chars . clone ( ) ) ) ;