Buggy code:
protected void reportRecoverableXMLError ( int majorCode , int minorCode , String string1 , String string2 ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode , int stringIndex1 ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode , String string1 ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode , int stringIndex1 , int stringIndex2 ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode , String string1 , String string2 ) throws Exception { } private void reportFatalXMLError ( int majorCode , int minorCode , String string1 , String string2 , String string3 ) throws Exception { } private void abortMarkup ( int majorCode , int minorCode ) throws Exception { } private void abortMarkup ( int majorCode , int minorCode , int stringIndex1 ) throws Exception { } private void abortMarkup ( int majorCode , int minorCode , String string1 ) throws Exception { } private void abortMarkup ( int majorCode , int minorCode , int stringIndex1 , int stringIndex2 ) throws Exception { } private void skipPastEndOfCurrentMarkup ( ) throws Exception { } private static final int SCANNER_STATE_INVALID = - 1 ; private static final int SCANNER_STATE_END_OF_INPUT = 0 ; private static final int SCANNER_STATE_DOCTYPEDECL = 50 ; private static final int SCANNER_STATE_MARKUP_DECL = 51 ; private static final int SCANNER_STATE_TEXTDECL = 53 ; private static final int SCANNER_STATE_COMMENT = 54 ; private static final int SCANNER_STATE_PI = 55 ; private static final int SCANNER_STATE_DEFAULT_ATTRIBUTE_VALUE = 56 ; private static final int SCANNER_STATE_CONTENTSPEC = 57 ; private static final int SCANNER_STATE_ENTITY_VALUE = 58 ; private static final int SCANNER_STATE_SYSTEMLITERAL = 59 ; private static final int SCANNER_STATE_PUBIDLITERAL = 60 ; private int setScannerState ( int scannerState ) { } private int getScannerState ( ) { } private void restoreScannerState ( int scannerState ) { } public void readerChange ( XMLEntityHandler . EntityReader nextReader , int nextReaderId ) throws Exception { } public void endOfInput ( int entityNameIndex , boolean moreToFollow ) throws Exception { } private int scanCharRef ( ) throws Exception { } private void scanComment ( ) throws Exception { } private void scanPI ( int piTarget ) throws Exception { } public boolean scanDoctypeDecl ( ) throws Exception { } private boolean scanExternalID ( boolean scanPublicID ) throws Exception { } private boolean scanSystemLiteral ( ) throws Exception { } private boolean scanPubidLiteral ( ) throws Exception { } public void scanDecls ( boolean extSubset ) throws Exception { } private void scanIgnoreSectContents ( ) throws Exception { } private void scanTextDecl ( ) throws Exception { } private QName fElementDeclQName = new QName ( ) ; private void scanElementDecl ( ) throws Exception { if ( ! ( checkForPEReference ( true ) ) ) { abortMarkup ( MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL , P45_SPACE_REQUIRED ) ; return ; } checkForElementTypeWithPEReference ( fEntityReader , '<seq2seq4repair_space>' , fElementQName ) ; if ( ( fElementQName . rawname ) == ( - 1 ) ) { abortMarkup ( MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL , P45_ELEMENT_TYPE_REQUIRED ) ; return ; } if ( ( fDTDHandler ) != null ) { fElementDeclQName . setValues ( fElementQName ) ; } if ( ! ( checkForPEReference ( true ) ) ) { abortMarkup ( MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL , P45_SPACE_REQUIRED , fElementQName . rawname ) ; return ; } int contentSpecType = - 1 ; int contentSpec = - 1 ; if ( fEntityReader . skippedString ( XMLDTDScanner . empty_string ) ) { contentSpecType = XMLElementDecl . TYPE_EMPTY ; } else if ( fEntityReader . skippedString ( XMLDTDScanner . any_string ) ) { contentSpecType = XMLElementDecl . TYPE_ANY ; } else if ( ! ( fEntityReader . lookingAtChar ( '(' , true ) ) ) { abortMarkup ( MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL , P45_CONTENTSPEC_REQUIRED , fElementQName . rawname ) ; return ; } else { int contentSpecReader = fReaderId ; int contentSpecReaderDepth = fEntityHandler . getReaderDepth ( ) ; int prevState = setScannerState ( XMLDTDScanner . SCANNER_STATE_CONTENTSPEC ) ; int oldDepth = parenDepth ( ) ; fEntityHandler . setReaderDepth ( oldDepth ) ; increaseParenDepth ( ) ; checkForPEReference ( false ) ; boolean skippedPCDATA = fEntityReader . skippedString ( XMLDTDScanner . pcdata_string ) ; if ( skippedPCDATA ) { <START_BUG> contentSpecType = XMLElementDecl . TYPE_MIXED ; <END_BUG> contentSpec = scanMixed ( fElementQName ) ; } else { contentSpecType = XMLElementDecl . TYPE_CHILDREN ; contentSpec = scanChildren ( fElementQName ) ; } boolean success = contentSpec != ( - 1 ) ; restoreScannerState ( prevState ) ; fEntityHandler . setReaderDepth ( contentSpecReaderDepth ) ; if ( ! success ) { setParenDepth ( oldDepth ) ; skipPastEndOfCurrentMarkup ( ) ; return ; } else { if ( ( parenDepth ( ) ) != oldDepth ) ; } } checkForPEReference ( false ) ; if ( ! ( fEntityReader . lookingAtChar ( '>' , true ) ) ) { abortMarkup ( MSG_ELEMENTDECL_UNTERMINATED , P45_UNTERMINATED , fElementQName . rawname ) ; return ; } decreaseMarkupDepth ( ) ; int elementIndex = fDTDGrammar . getElementDeclIndex ( fElementQName , ( - 1 ) ) ; boolean elementDeclIsExternal = getReadingExternalEntity ( ) ; if ( elementIndex == ( - 1 ) ) { elementIndex = fDTDGrammar . addElementDecl ( fElementQName , contentSpecType , contentSpec , elementDeclIsExternal ) ; } else { fDTDGrammar . getElementDecl ( elementIndex , fTempElementDecl ) ; if ( ( fTempElementDecl . type ) == ( - 1 ) ) { fTempElementDecl . type = contentSpecType ; fTempElementDecl . contentSpecIndex = contentSpec ; fDTDGrammar . setElementDeclDTD ( elementIndex , fTempElementDecl ) ; fDTDGrammar . setElementDeclIsExternal ( elementIndex , elementDeclIsExternal ) ; } else { if ( fValidationEnabled ) { reportRecoverableXMLError ( MSG_ELEMENT_ALREADY_DECLARED , VC_UNIQUE_ELEMENT_TYPE_DECLARATION , fStringPool . toString ( fElementQName . rawname ) ) ; } } } if ( ( fDTDHandler ) != null ) { fDTDGrammar . getElementDecl ( elementIndex , fTempElementDecl ) ;

Fix:
contentSpecType = XMLElementDecl . TYPE_MIXED_SIMPLE ;