Buggy code:
public class XMLGrammarCachingConfiguration extends StandardParserConfiguration { public static final int BIG_PRIME = 2039 ; protected static final SynchronizedSymbolTable fStaticSymbolTable = new SynchronizedSymbolTable ( XMLGrammarCachingConfiguration . BIG_PRIME ) ; protected static final XMLGrammarPoolImpl fStaticGrammarPool = new XMLGrammarPoolImpl ( ) ; protected static final String SCHEMA_FULL_CHECKING = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . SCHEMA_FULL_CHECKING ) ; String XMLNS = null ; String URI_XSI = null ; String XSI_SCHEMALOCATION = null ; String XSI_NONAMESPACESCHEMALOCATION = null ; String XSI_TYPE = null ; String XSI_NIL = null ; String URI_SCHEMAFORSCHEMA = null ; protected XSDHandler fSchemaHandler ; protected XSGrammarBucket fXSGrammarBucket ; protected SubstitutionGroupHandler fSubGroupHandler ; protected CMBuilder fCMBuilder ; public XMLGrammarCachingConfiguration ( ) { } public XMLGrammarCachingConfiguration ( SymbolTable symbolTable ) { } public XMLGrammarCachingConfiguration ( SymbolTable symbolTable , XMLGrammarPool grammarPool ) { } public XMLGrammarCachingConfiguration ( SymbolTable symbolTable , XMLGrammarPool grammarPool , XMLComponentManager parentSettings ) { } public boolean lockGrammarPool ( ) { } public Grammar parseGrammar ( String type , String uri ) throws IOException , XNIException { } public Grammar parseGrammar ( String type , XMLInputSource is ) throws IOException , XNIException { if ( ! ( type . equals ( XML_SCHEMA ) ) ) return null ; if ( ( fSchemaHandler ) == null ) { fXSGrammarBucket = new XSGrammarBucket ( ) ; fSubGroupHandler = new SubstitutionGroupHandler ( fXSGrammarBucket ) ; fSchemaHandler = new XSDHandler ( fXSGrammarBucket ) ; fCMBuilder = new CMBuilder ( new XSDeclarationPool ( ) ) ; } String externalSchemas = ( ( String ) ( getProperty ( ( ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SCHEMA_LOCATION ) ) ) ) ) ; String noNamespaceExternalSchemas = ( ( String ) ( getProperty ( ( ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SCHEMA_NONS_LOCATION ) ) ) ) ) ; fXSGrammarBucket . reset ( ) ; SchemaGrammar [ ] grammars = ( ( SchemaGrammar [ ] ) ( fGrammarPool . retrieveInitialGrammarSet ( XML_SCHEMA ) ) ) ; for ( int i = 0 ; i < ( grammars . length ) ; i ++ ) fXSGrammarBucket . putGrammar ( grammars [ i ] ) ; fSubGroupHandler . reset ( ) ; <START_BUG> fSchemaHandler . reset ( fErrorReporter , fEntityManager , fSymbolTable , externalSchemas , noNamespaceExternalSchemas , null , fGrammarPool ) ; <END_BUG> SchemaGrammar grammar = fSchemaHandler . parseSchema ( null , is , CONTEXT_PREPARSE ) ; if ( getFeature ( XMLGrammarCachingConfiguration . SCHEMA_FULL_CHECKING ) ) { XSConstraints . fullSchemaChecking ( fXSGrammarBucket , fSubGroupHandler , fCMBuilder , fErrorReporter ) ; } fGrammarPool . cacheGrammars ( XML_SCHEMA , new Grammar [ ] { grammar } ) ; return grammar ; } protected void checkFeature ( String featureId ) throws XMLConfigurationException { } protected void checkProperty ( String propertyId ) throws XMLConfigurationException { } }

Fix:
fSchemaHandler . reset ( fErrorReporter , fEntityManager , fSymbolTable , externalSchemas , noNamespaceExternalSchemas , fGrammarPool ) ;