Buggy code:
private final XMLString fEmptyXMLStr = new XMLString ( null , 0 , ( - 1 ) ) ; private static final int BUFFER_SIZE = 20 ; private char [ ] fCharBuffer = new char [ XMLSchemaValidator . BUFFER_SIZE ] ; private final StringBuffer fNormalizedStr = new StringBuffer ( ) ; private final XMLString fXMLString = new XMLString ( fCharBuffer , 0 , ( - 1 ) ) ; private boolean fFirstChunk = true ; private boolean fTrailing = false ; private short fWhiteSpace = - 1 ; private boolean fUnionType = false ; final XSGrammarBucket fGrammarBucket ; final SubstitutionGroupHandler fSubGroupHandler ; final XMLSchemaLoader fSchemaLoader ; final NamespaceSupport fNamespaceSupport = new NamespaceSupport ( ) ; boolean fPushForNextBinding ; final XSSimpleType fQNameDV = ( ( XSSimpleType ) ( SG_SchemaNS . getGlobalTypeDecl ( ATTVAL_QNAME ) ) ) ; final CMBuilder fCMBuilder = new CMBuilder ( ) ; String fValidationRoot ; int fSkipValidationDepth ; int fPartialValidationDepth ; int fElementDepth ; int fChildCount ; int [ ] fChildCountStack = new int [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; XSElementDecl fCurrentElemDecl ; XSElementDecl [ ] fElemDeclStack = new XSElementDecl [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; boolean fNil ; boolean [ ] fNilStack = new boolean [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; XSNotationDecl fNotation ; XSNotationDecl [ ] fNotationStack = new XSNotationDecl [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; XSTypeDecl fCurrentType ; XSTypeDecl [ ] fTypeStack = new XSTypeDecl [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; XSCMValidator fCurrentCM ; XSCMValidator [ ] fCMStack = new XSCMValidator [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; int [ ] fCurrCMState ; int [ ] [ ] fCMStateStack = new int [ XMLSchemaValidator . INITIAL_STACK_SIZE ] [ ] ; final StringBuffer fBuffer = new StringBuffer ( ) ; boolean fSawCharacters = false ; boolean [ ] fStringContent = new boolean [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; boolean fSawChildren = false ; boolean [ ] fSawChildrenStack = new boolean [ XMLSchemaValidator . INITIAL_STACK_SIZE ] ; final QName fTempQName = new QName ( ) ; ValidatedInfo fValidatedInfo = new ValidatedInfo ( ) ; private ValidationState fState4XsiType = new ValidationState ( ) ; private ValidationState fState4ApplyDefault = new ValidationState ( ) ; protected XMLSchemaValidator . XPathMatcherStack fMatcherStack = new XMLSchemaValidator . XPathMatcherStack ( ) ; protected XMLSchemaValidator . ValueStoreCache fValueStoreCache = new XMLSchemaValidator . ValueStoreCache ( ) ; public XMLSchemaValidator ( ) { } public void reset ( XMLComponentManager componentManager ) throws XMLConfigurationException { fXSIErrorReporter . reset ( ( ( XMLErrorReporter ) ( componentManager . getProperty ( XMLSchemaValidator . ERROR_REPORTER ) ) ) ) ; fSchemaLoader . setProperty ( XMLSchemaValidator . ERROR_REPORTER , fXSIErrorReporter . fErrorReporter ) ; SymbolTable symbolTable = ( ( SymbolTable ) ( componentManager . getProperty ( XMLSchemaValidator . SYMBOL_TABLE ) ) ) ; if ( symbolTable != ( fSymbolTable ) ) { fSchemaLoader . setProperty ( XMLSchemaValidator . SYMBOL_TABLE , symbolTable ) ; } fSymbolTable = symbolTable ; try { fNamespaces = componentManager . getFeature ( XMLSchemaValidator . NAMESPACES ) ; } catch ( XMLConfigurationException e ) { fNamespaces = true ; } try { fValidation = componentManager . getFeature ( XMLSchemaValidator . VALIDATION ) ; } catch ( XMLConfigurationException e ) { fValidation = false ; } try { fValidation = ( fValidation ) && ( componentManager . getFeature ( XMLSchemaValidator . SCHEMA_VALIDATION ) ) ; } catch ( XMLConfigurationException e ) { fValidation = false ; } try { fFullChecking = componentManager . getFeature ( XMLSchemaValidator . SCHEMA_FULL_CHECKING ) ; } catch ( XMLConfigurationException e ) { fFullChecking = false ; } fSchemaLoader . setFeature ( XMLSchemaValidator . SCHEMA_FULL_CHECKING , false ) ; try { fDynamicValidation = componentManager . getFeature ( XMLSchemaValidator . DYNAMIC_VALIDATION ) ; } catch ( XMLConfigurationException e ) { fDynamicValidation = false ; } try { fNormalizeData = componentManager . getFeature ( XMLSchemaValidator . NORMALIZE_DATA ) ; } catch ( XMLConfigurationException e ) { fNormalizeData = false ; } try { fSchemaElementDefault = componentManager . getFeature ( XMLSchemaValidator . SCHEMA_ELEMENT_DEFAULT ) ; } catch ( XMLConfigurationException e ) { fSchemaElementDefault = false ; } fEntityResolver = ( ( XMLEntityResolver ) ( componentManager . getProperty ( XMLSchemaValidator . ENTITY_MANAGER ) ) ) ; fSchemaLoader . setEntityResolver ( fEntityResolver ) ; <START_BUG> fNamespaceSupport . reset ( fSymbolTable ) ; <END_BUG> fPushForNextBinding = true ; fValidationManager = ( ( ValidationManager ) ( componentManager . getProperty ( XMLSchemaValidator . VALIDATION_MANAGER ) ) ) ; fValidationManager . addValidationState ( fValidationState ) ; fValidationState . setNamespaceSupport ( fNamespaceSupport ) ; fValidationState . setSymbolTable ( fSymbolTable ) ; try { fExternalSchemas = ( ( String ) ( componentManager . getProperty ( XMLSchemaValidator . SCHEMA_LOCATION ) ) ) ; fExternalNoNamespaceSchema = ( ( String ) ( componentManager . getProperty ( XMLSchemaValidator . SCHEMA_NONS_LOCATION ) ) ) ; } catch ( XMLConfigurationException e ) { fExternalSchemas = null ; fExternalNoNamespaceSchema = null ; } fSchemaLoader . setProperty ( XMLSchemaValidator . SCHEMA_LOCATION , fExternalSchemas ) ; fSchemaLoader . setProperty ( XMLSchemaValidator . SCHEMA_NONS_LOCATION , fExternalNoNamespaceSchema ) ; try { fJaxpSchemaSource = componentManager . getProperty ( XMLSchemaValidator . JAXP_SCHEMA_SOURCE ) ; } catch ( XMLConfigurationException e ) { fJaxpSchemaSource = null ; } fSchemaLoader . setProperty ( XMLSchemaValidator . JAXP_SCHEMA_SOURCE , fJaxpSchemaSource ) ; fResourceIdentifier . clear ( ) ; try { fGrammarPool = ( ( XMLGrammarPool ) ( componentManager . getProperty ( XMLSchemaValidator . XMLGRAMMAR_POOL ) ) ) ; } catch ( XMLConfigurationException e ) { fGrammarPool = null ; } fSchemaLoader . setProperty ( XMLSchemaValidator . XMLGRAMMAR_POOL , fGrammarPool ) ; fSchemaLoader . reset ( ) ; fXSDDescription . reset ( ) ; fLocationPairs . clear ( ) ; fNoNamespaceLocationArray . resize ( 0 , 2 ) ; fCurrentElemDecl = null ; fNil = false ; fNotation = null ; fCurrentPSVI = null ; fCurrentType = null ; fCurrentCM = null ; fCurrCMState = null ; fBuffer . setLength ( 0 ) ; fSawCharacters = false ; fSawChildren = false ; fValidationRoot = null ; fSkipValidationDepth = - 1 ; fPartialValidationDepth = - 1 ; fElementDepth = - 1 ;

Fix:
fNamespaceSupport . reset ( ) ;