Buggy code:
public class SchemaHandler { private static SchemaHandler instance = null ; private final HashSet < XSSchemaSet > schemaSets ; private final HashMap < String , String > schemaLocations ; private final HashMap < String , String > visited ; private final HashMap < String , Schema > schemas ; private EntityResolver schemaEntityResolver ; private ErrorHandler schemaErrorHandler ; public static synchronized SchemaHandler newInstance ( ) throws SAXException { } private SchemaHandler ( ) { } public void reset ( ) { } public Schema getSchema ( String namespaceURI ) { } private XSSchemaSet getXSSchemaSet ( String namespaceURI ) { } public EntityResolver getSchemaEntityResolver ( ) { } public void setSchemaEntityResolver ( EntityResolver schemaEntityResolver ) { } public ErrorHandler getErrorHandler ( ) { } public void setErrorHandler ( ErrorHandler schemaErrorHandler ) { } public boolean registerSchemaLocation ( String namespaceURI , File schemaLocation ) { } public void parseSchema ( Element element ) throws SAXException { } public void parseSchema ( File schemaLocation ) throws SAXException { } public void parseSchema ( String namespaceURI , String schemaLocation ) throws SAXException { } public void resolveAndParseSchema ( String namespaceURI ) throws MissingADESchemaException , SAXException { } private void parse ( String schemaLocation ) throws SAXException { } private void parse ( InputSource is ) throws SAXException { if ( is == null ) return ; XSOMParser parser = new XSOMParser ( ) ; parser . setEntityResolver ( new EntityResolver ( ) { public InputSource resolveEntity ( String publicId , String systemId ) throws IOException , SAXException { InputSource inputSource = null ; if ( publicId != null ) { for ( Map . Entry < String , String > entry : visited . entrySet ( ) ) { if ( entry . getKey ( ) . equals ( publicId ) ) { inputSource = new InputSource ( entry . getValue ( ) ) ; inputSource . setPublicId ( publicId ) ; inputSource . setSystemId ( entry . getValue ( ) ) ; break ; } } } <START_BUG> if ( ( inputSource == null ) && ( ( schemaEntityResolver ) != null ) ) <END_BUG> inputSource = schemaEntityResolver . resolveEntity ( publicId , systemId ) ; return inputSource ; } } ) ; if ( ( schemaErrorHandler ) != null ) parser . setErrorHandler ( schemaErrorHandler ) ; parser . parse ( is ) ; XSSchemaSet schemaSet = parser . getResult ( ) ; if ( schemaSet != null ) { for ( XSSchema schema : schemaSet . getSchemas ( ) ) { Locator locator = schema . getLocator ( ) ; if ( locator != null ) { String systemId = locator . getSystemId ( ) ; String visitedId = visited . get ( schema . getTargetNamespace ( ) ) ; if ( visitedId == null ) visited . put ( schema . getTargetNamespace ( ) , systemId ) ; else { try { URL cachedURL = new URL ( visitedId ) ; URL offeredURL = new URL ( systemId ) ; if ( ( ! ( ( cachedURL . getProtocol ( ) . equals ( "file" ) ) || ( cachedURL . getProtocol ( ) . equals ( "jar" ) ) ) ) && ( ( offeredURL . getProtocol ( ) . equals ( "file" ) ) || ( offeredURL . getProtocol ( ) . equals ( "jar" ) ) ) ) visited . put ( schema . getTargetNamespace ( ) , systemId ) ; } catch ( MalformedURLException e ) { } } } } schemaSets . add ( schemaSet ) ; } } public Set < String > getTargetNamespaces ( ) { } public int size ( ) { } public boolean isEmpty ( ) { } public Source [ ] getSchemaSources ( ) { } public Source getSchemaSource ( Schema schema ) { } public Source getSchemaSource ( CityGMLModule module ) { } }

Fix:
if ( ( ( inputSource == null ) && ( publicId != null ) ) && ( ( schemaEntityResolver ) != null ) )