Buggy code:
public void startParameterEntity ( String name , XMLResourceIdentifier identifier , String encoding , Augmentations augs ) throws XNIException { } public void endParameterEntity ( String name , Augmentations augs ) throws XNIException { } public void elementDecl ( String name , String contentModel , Augmentations augs ) throws XNIException { } public void startAttlist ( String elementName , Augmentations augs ) throws XNIException { } public void attributeDecl ( String elementName , String attributeName , String type , String [ ] enumeration , String defaultType , XMLString defaultValue , XMLString nonNormalizedDefaultValue , Augmentations augs ) throws XNIException { if ( ( type != ( XMLSymbols . fCDATASymbol ) ) && ( defaultValue != null ) ) { normalizeDefaultAttrValue ( defaultValue ) ; } if ( fValidation ) { boolean duplicateAttributeDef = false ; DTDGrammar grammar = ( ( fDTDGrammar ) != null ) ? fDTDGrammar : fGrammarBucket . getActiveGrammar ( ) ; int elementIndex = grammar . getElementDeclIndex ( elementName ) ; if ( ( grammar . getAttributeDeclIndex ( elementIndex , attributeName ) ) != ( - 1 ) ) { duplicateAttributeDef = true ; if ( fWarnDuplicateAttdef ) { fErrorReporter . reportError ( XML_DOMAIN , "MSG_DUPLICATE_ATTRIBUTE_DEFINITION" , new Object [ ] { elementName , attributeName } , SEVERITY_WARNING ) ; } } if ( type == ( XMLSymbols . fIDSymbol ) ) { if ( ( defaultValue != null ) && ( ( defaultValue . length ) != 0 ) ) { if ( ( defaultType == null ) || ( ! ( ( defaultType == ( XMLSymbols . fIMPLIEDSymbol ) ) || ( defaultType == ( XMLSymbols . fREQUIREDSymbol ) ) ) ) ) { fErrorReporter . reportError ( XML_DOMAIN , "IDDefaultTypeInvalid" , new Object [ ] { attributeName } , SEVERITY_ERROR ) ; } } if ( ! ( fTableOfIDAttributeNames . containsKey ( elementName ) ) ) { fTableOfIDAttributeNames . put ( elementName , attributeName ) ; } else { if ( ! duplicateAttributeDef ) { String previousIDAttributeName = ( ( String ) ( fTableOfIDAttributeNames . get ( elementName ) ) ) ; fErrorReporter . reportError ( XML_DOMAIN , "MSG_MORE_THAN_ONE_ID_ATTRIBUTE" , new Object [ ] { elementName , previousIDAttributeName , attributeName } , SEVERITY_ERROR ) ; } } } if ( type == ( XMLSymbols . fNOTATIONSymbol ) ) { for ( int i = 0 ; i < ( enumeration . length ) ; i ++ ) { fNotationEnumVals . put ( enumeration [ i ] , attributeName ) ; } if ( ( fTableOfNOTATIONAttributeNames . containsKey ( elementName ) ) == false ) { fTableOfNOTATIONAttributeNames . put ( elementName , attributeName ) ; } else { if ( ! duplicateAttributeDef ) { String previousNOTATIONAttributeName = ( ( String ) ( fTableOfNOTATIONAttributeNames . get ( elementName ) ) ) ; fErrorReporter . reportError ( XML_DOMAIN , "MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE" , new Object [ ] { elementName , previousNOTATIONAttributeName , attributeName } , SEVERITY_ERROR ) ; } } } if ( ( type == ( XMLSymbols . fENUMERATIONSymbol ) ) || ( type == ( XMLSymbols . fNOTATIONSymbol ) ) ) { outer : for ( int i = 0 ; i < ( enumeration . length ) ; ++ i ) { for ( int j = i + 1 ; j < ( enumeration . length ) ; ++ j ) { if ( enumeration [ i ] . equals ( enumeration [ j ] ) ) { fErrorReporter . reportError ( XML_DOMAIN , ( type == ( XMLSymbols . fENUMERATIONSymbol ) ? "MSG_DISTINCT_TOKENS_IN_ENUMERATION" : "MSG_DISTINCT_NOTATION_IN_ENUMERATION" ) , new Object [ ] { elementName , enumeration [ i ] , attributeName } , SEVERITY_ERROR ) ; break outer ; } } } } boolean ok = true ; if ( ( defaultValue != null ) && ( ( defaultType == null ) || ( ( defaultType != null ) && ( defaultType == ( XMLSymbols . fFIXEDSymbol ) ) ) ) ) { String value = defaultValue . toString ( ) ; if ( ( ( type == ( XMLSymbols . fNMTOKENSSymbol ) ) || ( type == ( XMLSymbols . fENTITIESSymbol ) ) ) || ( type == ( XMLSymbols . fIDREFSSymbol ) ) ) { <START_BUG> StringTokenizer tokenizer = new StringTokenizer ( value ) ; <END_BUG> if ( tokenizer . hasMoreTokens ( ) ) { while ( true ) { String nmtoken = tokenizer . nextToken ( ) ; if ( type == ( XMLSymbols . fNMTOKENSSymbol ) ) { if ( ! ( isValidNmtoken ( nmtoken ) ) ) { ok = false ; break ; } } else if ( ( type == ( XMLSymbols . fENTITIESSymbol ) ) || ( type == ( XMLSymbols . fIDREFSSymbol ) ) ) { if ( ! ( isValidName ( nmtoken ) ) ) { ok = false ; break ; } } if ( ! ( tokenizer . hasMoreTokens ( ) ) ) { break ; } } } } else { if ( ( ( ( type == ( XMLSymbols . fENTITYSymbol ) ) || ( type == ( XMLSymbols . fIDSymbol ) ) ) || ( type == ( XMLSymbols . fIDREFSymbol ) ) ) || ( type == ( XMLSymbols . fNOTATIONSymbol ) ) ) { if ( ! ( isValidName ( value ) ) ) { ok = false ; } } else if ( ( type == ( XMLSymbols . fNMTOKENSymbol ) ) || ( type == ( XMLSymbols . fENUMERATIONSymbol ) ) ) { if ( ! ( isValidNmtoken ( value ) ) ) { ok = false ; } } if ( ( type == ( XMLSymbols . fNOTATIONSymbol ) ) || ( type == ( XMLSymbols . fENUMERATIONSymbol ) ) ) { ok = false ; for ( int i = 0 ; i < ( enumeration . length ) ; i ++ ) { if ( defaultValue . equals ( enumeration [ i ] ) ) { ok = true ; } }

Fix:
StringTokenizer tokenizer = new StringTokenizer ( value , "<seq2seq4repair_space>" ) ;