Buggy code:
public class QueryXS implements DOMErrorHandler { protected static final boolean DEFAULT_NAMESPACES = true ; protected static final boolean DEFAULT_VALIDATION = false ; protected static final boolean DEFAULT_SCHEMA_VALIDATION = false ; static LSParser builder ; public static void main ( String [ ] argv ) { if ( ( argv . length ) == 0 ) { QueryXS . printUsage ( ) ; System . exit ( 1 ) ; } try { <START_BUG> System . setProperty ( PROPERTY , "org.apache.xerces.dom.DOMImplementationSourceImpl" ) ; <END_BUG> DOMImplementationRegistry registry = DOMImplementationRegistry . newInstance ( ) ; XSImplementation impl = ( ( XSImplementation ) ( registry . getDOMImplementation ( "XS-Loader" ) ) ) ; XSLoader schemaLoader = impl . createXSLoader ( null ) ; DOMConfiguration config = schemaLoader . getConfig ( ) ; DOMErrorHandler errorHandler = new QueryXS ( ) ; config . setParameter ( "error-handler" , errorHandler ) ; config . setParameter ( "validate" , Boolean . TRUE ) ; System . out . println ( ( ( "Parsing<seq2seq4repair_space>" + ( argv [ 0 ] ) ) + "..." ) ) ; XSModel model = schemaLoader . loadURI ( argv [ 0 ] ) ; if ( model != null ) { XSNamedMap map = model . getComponents ( ELEMENT_DECLARATION ) ; if ( ( map . getLength ( ) ) != 0 ) { System . out . println ( "*************************************************" ) ; System . out . println ( "*<seq2seq4repair_space>Global<seq2seq4repair_space>element<seq2seq4repair_space>declarations:<seq2seq4repair_space>{namespace}<seq2seq4repair_space>name<seq2seq4repair_space>" ) ; System . out . println ( "*************************************************" ) ; for ( int i = 0 ; i < ( map . getLength ( ) ) ; i ++ ) { XSObject item = map . item ( i ) ; System . out . println ( ( ( ( "{" + ( item . getNamespace ( ) ) ) + "}" ) + ( item . getName ( ) ) ) ) ; } } map = model . getComponents ( ATTRIBUTE_DECLARATION ) ; if ( ( map . getLength ( ) ) != 0 ) { System . out . println ( "*************************************************" ) ; System . out . println ( "*<seq2seq4repair_space>Global<seq2seq4repair_space>attribute<seq2seq4repair_space>declarations:<seq2seq4repair_space>{namespace}<seq2seq4repair_space>name" ) ; System . out . println ( "*************************************************" ) ; for ( int i = 0 ; i < ( map . getLength ( ) ) ; i ++ ) { XSObject item = map . item ( i ) ; System . out . println ( ( ( ( "{" + ( item . getNamespace ( ) ) ) + "}" ) + ( item . getName ( ) ) ) ) ; } } map = model . getComponents ( TYPE_DEFINITION ) ; if ( ( map . getLength ( ) ) != 0 ) { System . out . println ( "*************************************************" ) ; System . out . println ( "*<seq2seq4repair_space>Global<seq2seq4repair_space>type<seq2seq4repair_space>declarations:<seq2seq4repair_space>{namespace}<seq2seq4repair_space>name" ) ; System . out . println ( "*************************************************" ) ; for ( int i = 0 ; i < ( map . getLength ( ) ) ; i ++ ) { XSObject item = map . item ( i ) ; System . out . println ( ( ( ( "{" + ( item . getNamespace ( ) ) ) + "}" ) + ( item . getName ( ) ) ) ) ; } } map = model . getComponents ( NOTATION_DECLARATION ) ; if ( ( map . getLength ( ) ) != 0 ) { System . out . println ( "*************************************************" ) ; System . out . println ( "*<seq2seq4repair_space>Global<seq2seq4repair_space>notation<seq2seq4repair_space>declarations:<seq2seq4repair_space>{namespace}<seq2seq4repair_space>name" ) ; System . out . println ( "*************************************************" ) ; for ( int i = 0 ; i < ( map . getLength ( ) ) ; i ++ ) { XSObject item = map . item ( i ) ; System . out . println ( ( ( ( "{" + ( item . getNamespace ( ) ) ) + "}" ) + ( item . getName ( ) ) ) ) ; } } } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } private static void printUsage ( ) { } public boolean handleError ( DOMError error ) { } }

Fix:
System . setProperty ( PROPERTY , "org.apache.xerces.dom.DOMXSImplementationSourceImpl" ) ;