Buggy code:
protected static final int SCANNER_STATE_COMMENT = 2 ; protected static final int SCANNER_STATE_PI = 3 ; protected static final int SCANNER_STATE_DOCTYPE = 4 ; protected static final int SCANNER_STATE_ROOT_ELEMENT = 6 ; protected static final int SCANNER_STATE_CONTENT = 7 ; protected static final int SCANNER_STATE_REFERENCE = 8 ; protected static final int SCANNER_STATE_END_OF_INPUT = 13 ; protected static final int SCANNER_STATE_TERMINATED = 14 ; protected static final int SCANNER_STATE_CDATA = 15 ; protected static final int SCANNER_STATE_TEXT_DECL = 16 ; protected static final String NAMESPACES = ( Constants . SAX_FEATURE_PREFIX ) + ( Constants . NAMESPACES_FEATURE ) ; protected static final String NOTIFY_BUILTIN_REFS = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . NOTIFY_BUILTIN_REFS_FEATURE ) ; private static final String [ ] RECOGNIZED_FEATURES = new String [ ] { XMLDocumentFragmentScannerImpl . NAMESPACES , VALIDATION , XMLDocumentFragmentScannerImpl . NOTIFY_BUILTIN_REFS , NOTIFY_CHAR_REFS } ; private static final String [ ] RECOGNIZED_PROPERTIES = new String [ ] { SYMBOL_TABLE , ERROR_REPORTER , ENTITY_MANAGER } ; private static final boolean DEBUG_SCANNER_STATE = false ; private static final boolean DEBUG_DISPATCHER = false ; private static final boolean DEBUG_CONTENT_SCANNING = false ; protected XMLDocumentHandler fDocumentHandler ; protected int [ ] fEntityStack = new int [ 4 ] ; protected int fMarkupDepth ; protected int fScannerState ; protected boolean fHasExternalDTD ; protected boolean fStandalone ; protected QName fCurrentElement ; protected XMLDocumentFragmentScannerImpl . ElementStack fElementStack = new XMLDocumentFragmentScannerImpl . ElementStack ( ) ; protected String fDocumentSystemId ; protected boolean fNamespaces ; protected boolean fNotifyBuiltInRefs = false ; protected XMLDocumentFragmentScannerImpl . Dispatcher fDispatcher ; protected XMLDocumentFragmentScannerImpl . Dispatcher fContentDispatcher = createContentDispatcher ( ) ; private String [ ] fStrings = new String [ 3 ] ; private XMLString fString = new XMLString ( ) ; private XMLString fString2 = new XMLString ( ) ; private XMLStringBuffer fStringBuffer = new XMLStringBuffer ( ) ; private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer ( ) ; private QName fElementQName = new QName ( ) ; private QName fAttributeQName = new QName ( ) ; private QName fQName = new QName ( ) ; private XMLAttributesImpl fAttributes = new XMLAttributesImpl ( ) ; private final char [ ] fSingleChar = new char [ 1 ] ; private ExternalEntity fExternalEntity = new XMLEntityManager . ExternalEntity ( ) ; private String fCDATASymbol ; public XMLDocumentFragmentScannerImpl ( ) { } public void setInputSource ( XMLInputSource inputSource ) throws IOException { } public boolean scanDocument ( boolean complete ) throws IOException , XNIException { } public void reset ( XMLComponentManager componentManager ) throws XMLConfigurationException { } public String [ ] getRecognizedFeatures ( ) { } public void setFeature ( String featureId , boolean state ) throws XMLConfigurationException { } public String [ ] getRecognizedProperties ( ) { } public void setProperty ( String propertyId , Object value ) throws XMLConfigurationException { } public void setDocumentHandler ( XMLDocumentHandler documentHandler ) { } public void startEntity ( String name , String publicId , String systemId , String baseSystemId , String encoding ) throws XNIException { } public void endEntity ( String name ) throws XNIException { } protected XMLDocumentFragmentScannerImpl . Dispatcher createContentDispatcher ( ) { } protected void scanXMLDeclOrTextDecl ( boolean scanningTextDecl ) throws IOException , XNIException { } protected void scanPIData ( String target , XMLString data ) throws IOException , XNIException { } protected void scanComment ( ) throws IOException , XNIException { } protected boolean scanStartElement ( ) throws IOException , XNIException { } protected void scanAttribute ( XMLAttributes attributes ) throws IOException , XNIException { } protected int scanContent ( ) throws IOException , XNIException { } protected boolean scanCDATASection ( boolean complete ) throws IOException , XNIException { } protected int scanEndElement ( ) throws IOException , XNIException { } protected void scanCharReference ( ) throws IOException , XNIException { } protected void scanEntityReference ( ) throws IOException , XNIException { String name = fEntityScanner . scanName ( ) ; if ( name == null ) { reportFatalError ( "NameRequiredInReference" , null ) ; } if ( ! ( fEntityScanner . skipChar ( ';' ) ) ) { <START_BUG> reportFatalError ( "SemicolonRequiredInReference" , null ) ; <END_BUG> } ( fMarkupDepth ) -- ; if ( name == ( fAmpSymbol ) ) { handleCharacter ( '&' , fAmpSymbol ) ; } else if ( name == ( fLtSymbol ) ) { handleCharacter ( '<' , fLtSymbol ) ; } else if ( name == ( fGtSymbol ) ) { handleCharacter ( '>' , fGtSymbol ) ; } else if ( name == ( fQuotSymbol ) ) { handleCharacter ( '"' , fQuotSymbol ) ; } else if ( name == ( fAposSymbol ) ) { handleCharacter ( '\'' , fAposSymbol ) ; } else if ( fEntityManager . isUnparsedEntity ( name ) ) { reportFatalError ( "ReferenceToUnparsedEntity" , new Object [ ] { name } ) ; } else { if ( ! ( fEntityManager . isDeclaredEntity ( name ) ) ) { if ( ( fHasExternalDTD ) && ( ! ( fStandalone ) ) ) { if ( fValidation ) fErrorReporter . reportError ( XML_DOMAIN , "EntityNotDeclared" , new Object [ ] { name } , SEVERITY_ERROR ) ; } else reportFatalError ( "EntityNotDeclared" , new Object [ ] { name } ) ; } fEntityManager . startEntity ( name , false ) ; } } private void handleCharacter ( char c , String entity ) throws XNIException { } protected int handleEndElement ( QName element , boolean isEmpty ) throws XNIException { } protected final void setScannerState ( int state ) { } protected final void setDispatcher ( XMLDocumentFragmentScannerImpl . Dispatcher dispatcher ) { } protected String getScannerStateName ( int state ) { } public String getDispatcherName ( XMLDocumentFragmentScannerImpl . Dispatcher dispatcher ) { } protected static class ElementStack { protected QName [ ] fElements ; protected int fSize ; public ElementStack ( ) { } public QName pushElement ( QName element ) { }

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