Buggy code:
final class CharReader extends AbstractCharReader { CharReader ( XMLEntityHandler entityHandler , XMLErrorReporter errorReporter , boolean sendCharDataAsCharArray , Reader reader , StringPool stringPool ) throws Exception { } private Reader fCharacterStream = null ; private boolean fCheckOverflow = false ; private char [ ] fOverflow = null ; private int fOverflowOffset = 0 ; private int fOverflowEnd = 0 ; private int fOutputOffset = 0 ; private boolean fSkipLinefeed = false ; protected int fillCurrentChunk ( ) throws Exception { char [ ] recycledData = fCurrentChunk . toCharArray ( ) ; fOutputOffset = 0 ; if ( fCheckOverflow ) { fMostRecentData = recycledData ; if ( ( fOverflowEnd ) < ( CharDataChunk . CHUNK_SIZE ) ) { recycledData = null ; if ( ( fOverflowEnd ) > 0 ) { if ( ( ( fMostRecentData ) == null ) || ( ( fMostRecentData . length ) < ( ( 1 + ( fOverflowEnd ) ) - ( fOverflowOffset ) ) ) ) fMostRecentData = new char [ ( 1 + ( fOverflowEnd ) ) - ( fOverflowOffset ) ] ; copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; } else { if ( ( fMostRecentData ) == null ) fMostRecentData = new char [ 1 ] ; } fMostRecentData [ fOutputOffset ] = 0 ; fOverflow = null ; fLength += fOutputOffset ; fCurrentIndex = 0 ; fCurrentChunk . setCharArray ( fMostRecentData ) ; return fMostRecentChar = fMostRecentData [ 0 ] ; } if ( ( ( fMostRecentData ) == null ) || ( ( fMostRecentData . length ) < ( CharDataChunk . CHUNK_SIZE ) ) ) fMostRecentData = new char [ CharDataChunk . CHUNK_SIZE ] ; else recycledData = null ; copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; fCheckOverflow = false ; } else { if ( ( fOverflow ) == null ) { fOverflow = recycledData ; if ( ( ( fOverflow ) == null ) || ( ( fOverflow . length ) < ( CharDataChunk . CHUNK_SIZE ) ) ) fOverflow = new char [ CharDataChunk . CHUNK_SIZE ] ; else recycledData = null ; } fMostRecentData = null ; } while ( true ) { fOverflowOffset = 0 ; fOverflowEnd = 0 ; int capacity = CharDataChunk . CHUNK_SIZE ; int result = 0 ; do { try { result = fCharacterStream . read ( fOverflow , fOverflowEnd , capacity ) ; } catch ( IOException ex ) { result = - 1 ; } if ( result == ( - 1 ) ) { fCharacterStream . close ( ) ; fCharacterStream = null ; if ( ( fMostRecentData ) == null ) { fMostRecentData = recycledData ; if ( ( ( fMostRecentData ) == null ) || ( ( fMostRecentData . length ) < ( 1 + ( fOverflowEnd ) ) ) ) fMostRecentData = new char [ 1 + ( fOverflowEnd ) ] ; else recycledData = null ; copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; fOverflow = null ; fMostRecentData [ fOutputOffset ] = 0 ; } else { boolean alldone = copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; if ( alldone ) { <START_BUG> if ( ( fOverflowEnd ) == ( CharDataChunk . CHUNK_SIZE ) ) { <END_BUG> fCheckOverflow = true ; fOverflowOffset = 0 ; fOverflowEnd = 0 ; } else { fOverflow = null ; fMostRecentData [ fOutputOffset ] = 0 ; } } else { fCheckOverflow = true ; } } break ; } if ( result > 0 ) { fOverflowEnd += result ; capacity -= result ; } } while ( capacity > 0 ) ; if ( result == ( - 1 ) ) break ; if ( ( fMostRecentData ) != null ) { boolean alldone = copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; if ( ( fOutputOffset ) == ( CharDataChunk . CHUNK_SIZE ) ) { if ( ! alldone ) { fCheckOverflow = true ; } break ; } } else { fMostRecentData = recycledData ; if ( ( ( fMostRecentData ) == null ) || ( ( fMostRecentData . length ) < ( CharDataChunk . CHUNK_SIZE ) ) ) fMostRecentData = new char [ CharDataChunk . CHUNK_SIZE ] ; else recycledData = null ; copyNormalize ( fOverflow , fOverflowOffset , fMostRecentData , fOutputOffset ) ; if ( ( fOutputOffset ) == ( CharDataChunk . CHUNK_SIZE ) ) { break ; } } } fLength += fOutputOffset ; fCurrentIndex = 0 ; fCurrentChunk . setCharArray ( fMostRecentData ) ; return fMostRecentChar = fMostRecentData [ 0 ] ; } private boolean copyNormalize ( char [ ] in , int inOffset , char [ ] out , int outOffset ) throws Exception { } private boolean exitNormalize ( int inOffset , int outOffset , boolean result ) { } }

Fix:
if ( ( fOutputOffset ) == ( CharDataChunk . CHUNK_SIZE ) ) {