Buggy code:
public int addString ( int offset , int length ) { } public int addSymbol ( int offset , int length ) { } public boolean lookingAtChar ( char chr , boolean skipPastChar ) throws Exception { } public boolean lookingAtValidChar ( boolean skipPastChar ) throws Exception { } public boolean lookingAtSpace ( boolean skipPastChar ) throws Exception { } public void skipToChar ( char chr ) throws Exception { } public void skipPastSpaces ( ) throws Exception { } public void skipPastName ( char fastcheck ) throws Exception { } public void skipPastNmtoken ( char fastcheck ) throws Exception { } public boolean skippedString ( char [ ] s ) throws Exception { } public int scanInvalidChar ( ) throws Exception { } public int scanCharRef ( boolean hex ) throws Exception { } public int scanStringLiteral ( ) throws Exception { } public int scanAttValue ( char qchar , boolean asSymbol ) throws Exception { } public int scanEntityValue ( int qchar , boolean createString ) throws Exception { } public int scanName ( char fastcheck ) throws Exception { } public boolean scanExpectedName ( char fastcheck , StringPool . CharArrayRange expectedName ) throws Exception { } public void scanQName ( char fastcheck , QName qname ) throws Exception { int ch = fMostRecentChar ; if ( ch < 128 ) { if ( ( XMLCharacterProperties . fgAsciiInitialNameChar [ ch ] ) == 0 ) { qname . clear ( ) ; return ; } if ( ch == ':' ) { qname . clear ( ) ; return ; } } else { if ( ! ( fCalledCharPropInit ) ) { XMLCharacterProperties . initCharFlags ( ) ; fCalledCharPropInit = true ; } if ( ( ( XMLCharacterProperties . fgCharFlags [ ch ] ) & ( XMLCharacterProperties . E_InitialNameCharFlag ) ) == 0 ) { qname . clear ( ) ; return ; } } int offset = fCurrentOffset ; ( fCharacterCounter ) ++ ; int hashcode = 0 ; int prefixend = - 1 ; while ( true ) { hashcode = StringHasher . hashChar ( hashcode , ch ) ; ch = loadNextChar ( ) ; if ( fastcheck == ch ) break ; if ( ch < 128 ) { if ( ( XMLCharacterProperties . fgAsciiNameChar [ ch ] ) == 0 ) break ; if ( ch == ':' ) { if ( prefixend != ( - 1 ) ) break ; prefixend = fCurrentOffset ; CharDataChunk savedChunk = fCurrentChunk ; int savedOffset = fCurrentOffset ; int savedIndex = fCurrentIndex ; ch = loadNextChar ( ) ; fCurrentChunk = savedChunk ; fCurrentOffset = savedOffset ; fCurrentIndex = savedIndex ; fMostRecentData = savedChunk . toCharArray ( ) ; boolean lpok = true ; if ( ch < 128 ) { if ( ( ( XMLCharacterProperties . fgAsciiInitialNameChar [ ch ] ) == 0 ) || ( ch == ':' ) ) lpok = false ; } else { if ( ! ( fCalledCharPropInit ) ) { XMLCharacterProperties . initCharFlags ( ) ; fCalledCharPropInit = true ; } if ( ( ( XMLCharacterProperties . fgCharFlags [ ch ] ) & ( XMLCharacterProperties . E_InitialNameCharFlag ) ) == 0 ) lpok = false ; } ch = ':' ; if ( ! lpok ) { prefixend = - 1 ; fMostRecentChar = ch ; break ; } } } else { if ( ! ( fCalledCharPropInit ) ) { XMLCharacterProperties . initCharFlags ( ) ; fCalledCharPropInit = true ; } if ( ( ( XMLCharacterProperties . fgCharFlags [ ch ] ) & ( XMLCharacterProperties . E_NameCharFlag ) ) == 0 ) break ; } ( fCharacterCounter ) ++ ; } hashcode = StringHasher . finishHash ( hashcode ) ; int length = ( fCurrentOffset ) - offset ; qname . rawname = fCurrentChunk . addSymbol ( offset , length , hashcode ) ; qname . prefix = ( prefixend == ( - 1 ) ) ? - 1 : addSymbol ( offset , ( prefixend - offset ) ) ; qname . localpart = ( prefixend == ( - 1 ) ) ? qname . rawname : addSymbol ( ( prefixend + 1 ) , ( ( fCurrentOffset ) - ( prefixend + 1 ) ) ) ; <START_BUG> qname . uri = - 1 ; <END_BUG> } public int scanContent ( QName element ) throws Exception { } private static final char [ ] cdata_string = new char [ ] { 'C' , 'D' , 'A' , 'T' , 'A' , '[' } ; private StringPool fStringPool = null ; private boolean fCallClearPreviousChunk = true ; private Vector fDeferredErrors = null ; private class DeferredError { int errorCode ; Object [ ] args ; int offset ; DeferredError ( int ec , Object [ ] a , int o ) { } } private int recognizeMarkup ( int ch ) throws Exception { } private int recognizeReference ( int ch ) throws Exception { } private boolean skipMultiByteCharData ( int ch ) throws Exception { } private int skipAsciiCharData ( ) throws Exception { } private void callCharDataHandler ( int offset , int endOffset , boolean isWhitespace ) throws Exception { } private int slowLoadNextChar ( ) throws Exception { } private int loadNextChar ( ) throws Exception { } private void loadFirstChar ( ) throws Exception { } private boolean seenCR = false ; private int oweChar = - 1 ; private char [ ] inBuffer = new char [ 2 ] ; private int loadMoreChars ( ) throws Exception { } private boolean atEOF ( int offset ) { } protected Reader fCharacterStream = null ; protected CharDataChunk fCurrentChunk = null ; protected int fCurrentIndex = 0 ; protected int fFillIndex = 0 ; protected char [ ] fMostRecentData = null ; protected int fMostRecentChar = 0 ; protected int fLength = 0 ; protected boolean fCalledCharPropInit = false ; }

Fix:
qname . uri = StringPool . EMPTY_STRING ;