Buggy code:
protected static final boolean DEBUG_ATTR_NORMALIZATION = false ; protected boolean fValidation = false ; protected boolean fNotifyCharRefs = false ; protected SymbolTable fSymbolTable ; protected XMLErrorReporter fErrorReporter ; protected XMLEntityManager fEntityManager ; protected XMLEntityScanner fEntityScanner ; protected int fEntityDepth ; protected String fCharRefLiteral = null ; protected boolean fScanningAttribute ; protected String fVersionSymbol ; protected String fEncodingSymbol ; protected String fStandaloneSymbol ; protected String fAmpSymbol ; protected String fLtSymbol ; protected String fGtSymbol ; protected String fQuotSymbol ; protected String fAposSymbol ; private XMLString fString = new XMLString ( ) ; private XMLStringBuffer fStringBuffer = new XMLStringBuffer ( ) ; private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer ( ) ; private XMLStringBuffer fStringBuffer3 = new XMLStringBuffer ( ) ; public void reset ( XMLComponentManager componentManager ) throws XMLConfigurationException { } public void setProperty ( String propertyId , Object value ) throws XMLConfigurationException { } public void setFeature ( String featureId , boolean value ) throws XMLConfigurationException { } protected void scanXMLDeclOrTextDecl ( boolean scanningTextDecl , String [ ] pseudoAttributeValues ) throws IOException , XNIException { } public String scanPseudoAttribute ( boolean scanningTextDecl , XMLString value ) throws IOException , XNIException { } protected void scanPI ( ) throws IOException , XNIException { } protected void scanPIData ( String target , XMLString data ) throws IOException , XNIException { } protected void scanComment ( XMLStringBuffer text ) throws IOException , XNIException { } protected void scanAttributeValue ( XMLString value , XMLString nonNormalizedValue , String atName , XMLAttributes attributes , int attrIndex , boolean checkEntities ) throws IOException , XNIException { int quote = fEntityScanner . peekChar ( ) ; if ( ( quote != '\'' ) && ( quote != '"' ) ) { reportFatalError ( "OpenQuoteExpected" , new Object [ ] { atName } ) ; } fEntityScanner . scanChar ( ) ; int entityDepth = fEntityDepth ; int c = fEntityScanner . scanLiteral ( quote , value ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>scanLiteral<seq2seq4repair_space>-><seq2seq4repair_space>\"" + ( value . toString ( ) ) ) + "\"" ) ) ; } fStringBuffer2 . clear ( ) ; fStringBuffer2 . append ( value ) ; normalizeWhitespace ( value ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>normalizeWhitespace<seq2seq4repair_space>-><seq2seq4repair_space>\"" + ( value . toString ( ) ) ) + "\"" ) ) ; } if ( c != quote ) { fScanningAttribute = true ; fStringBuffer . clear ( ) ; do { fStringBuffer . append ( value ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>value2:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } if ( c == '&' ) { fEntityScanner . skipChar ( '&' ) ; if ( entityDepth == ( fEntityDepth ) ) { fStringBuffer2 . append ( '&' ) ; } if ( fEntityScanner . skipChar ( '#' ) ) { if ( entityDepth == ( fEntityDepth ) ) { fStringBuffer2 . append ( '#' ) ; } int ch = scanCharReferenceValue ( fStringBuffer , fStringBuffer2 ) ; if ( ch != ( - 1 ) ) { if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>value3:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } } else { String entityName = fEntityScanner . scanName ( ) ; if ( entityName == null ) { reportFatalError ( "NameRequiredInReference" , null ) ; } else if ( entityDepth == ( fEntityDepth ) ) { fStringBuffer2 . append ( entityName ) ; } if ( ! ( fEntityScanner . skipChar ( ';' ) ) ) { <START_BUG> reportFatalError ( "SemicolonRequiredInReference" , null ) ; <END_BUG> } else if ( entityDepth == ( fEntityDepth ) ) { fStringBuffer2 . append ( ';' ) ; } if ( entityName == ( fAmpSymbol ) ) { fStringBuffer . append ( '&' ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>value5:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } else if ( entityName == ( fAposSymbol ) ) { fStringBuffer . append ( '\'' ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>value7:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } else if ( entityName == ( fLtSymbol ) ) { fStringBuffer . append ( '<' ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>value9:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } else if ( entityName == ( fGtSymbol ) ) { fStringBuffer . append ( '>' ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>valueB:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } else if ( entityName == ( fQuotSymbol ) ) { fStringBuffer . append ( '"' ) ; if ( XMLScanner . DEBUG_ATTR_NORMALIZATION ) { System . out . println ( ( ( "**<seq2seq4repair_space>valueD:<seq2seq4repair_space>\"" + ( fStringBuffer . toString ( ) ) ) + "\"" ) ) ; } } else { if ( fEntityManager . isExternalEntity ( entityName ) ) { reportFatalError ( "ReferenceToExternalEntity" , new Object [ ] { entityName } ) ; } else { if ( ! ( fEntityManager . isDeclaredEntity ( entityName ) ) ) { if ( checkEntities ) { if ( fValidation ) { fErrorReporter . reportError ( XML_DOMAIN , "EntityNotDeclared" , new Object [ ] { entityName } , SEVERITY_ERROR ) ; } } else { reportFatalError ( "EntityNotDeclared" , new Object [ ] { entityName } ) ;

Fix:
reportFatalError ( "SemicolonRequiredInReference" , new Object [ ] { entityName } ) ;