Buggy code:
public ValidatorHandlerImpl ( XMLSchemaValidatorComponentManager componentManager ) { } public void setContentHandler ( ContentHandler receiver ) { } public ContentHandler getContentHandler ( ) { } public void setErrorHandler ( ErrorHandler errorHandler ) { } public ErrorHandler getErrorHandler ( ) { } public void setResourceResolver ( LSResourceResolver resourceResolver ) { } public LSResourceResolver getResourceResolver ( ) { } public TypeInfoProvider getTypeInfoProvider ( ) { } public boolean getFeature ( String name ) throws SAXNotRecognizedException , SAXNotSupportedException { } public void setFeature ( String name , boolean value ) throws SAXNotRecognizedException , SAXNotSupportedException { } public Object getProperty ( String name ) throws SAXNotRecognizedException , SAXNotSupportedException { } public void setProperty ( String name , Object object ) throws SAXNotRecognizedException , SAXNotSupportedException { } public boolean isEntityDeclared ( String name ) { } public boolean isEntityUnparsed ( String name ) { } public void startDocument ( XMLLocator locator , String encoding , NamespaceContext namespaceContext , Augmentations augs ) throws XNIException { } public void xmlDecl ( String version , String encoding , String standalone , Augmentations augs ) throws XNIException { } public void doctypeDecl ( String rootElement , String publicId , String systemId , Augmentations augs ) throws XNIException { } public void comment ( XMLString text , Augmentations augs ) throws XNIException { } public void processingInstruction ( String target , XMLString data , Augmentations augs ) throws XNIException { } public void startElement ( QName element , XMLAttributes attributes , Augmentations augs ) throws XNIException { } public void emptyElement ( QName element , XMLAttributes attributes , Augmentations augs ) throws XNIException { } public void startGeneralEntity ( String name , XMLResourceIdentifier identifier , String encoding , Augmentations augs ) throws XNIException { } public void textDecl ( String version , String encoding , Augmentations augs ) throws XNIException { } public void endGeneralEntity ( String name , Augmentations augs ) throws XNIException { } public void characters ( XMLString text , Augmentations augs ) throws XNIException { } public void ignorableWhitespace ( XMLString text , Augmentations augs ) throws XNIException { } public void endElement ( QName element , Augmentations augs ) throws XNIException { } public void startCDATA ( Augmentations augs ) throws XNIException { } public void endCDATA ( Augmentations augs ) throws XNIException { } public void endDocument ( Augmentations augs ) throws XNIException { } public void setDocumentSource ( XMLDocumentSource source ) { } public XMLDocumentSource getDocumentSource ( ) { } public void setDocumentLocator ( Locator locator ) { } public void startDocument ( ) throws SAXException { } public void endDocument ( ) throws SAXException { } public void startPrefixMapping ( String prefix , String uri ) throws SAXException { } public void endPrefixMapping ( String prefix ) throws SAXException { } public void startElement ( String uri , String localName , String qName , Attributes atts ) throws SAXException { } public void endElement ( String uri , String localName , String qName ) throws SAXException { } public void characters ( char [ ] ch , int start , int length ) throws SAXException { } public void ignorableWhitespace ( char [ ] ch , int start , int length ) throws SAXException { } public void processingInstruction ( String target , String data ) throws SAXException { } public void skippedEntity ( String name ) throws SAXException { } public void notationDecl ( String name , String publicId , String systemId ) throws SAXException { } public void unparsedEntityDecl ( String name , String publicId , String systemId , String notationName ) throws SAXException { } public void validate ( Source source , Result result ) throws IOException , SAXException { if ( ( result instanceof SAXResult ) || ( result == null ) ) { final SAXSource saxSource = ( ( SAXSource ) ( source ) ) ; final SAXResult saxResult = ( ( SAXResult ) ( result ) ) ; LexicalHandler lh = null ; if ( result != null ) { ContentHandler ch = saxResult . getHandler ( ) ; lh = saxResult . getLexicalHandler ( ) ; if ( ( lh == null ) && ( ch instanceof LexicalHandler ) ) { lh = ( ( LexicalHandler ) ( ch ) ) ; } setContentHandler ( ch ) ; } XMLReader reader = null ; try { reader = saxSource . getXMLReader ( ) ; if ( reader == null ) { SAXParserFactory spf = SAXParserFactory . newInstance ( ) ; spf . setNamespaceAware ( true ) ; try { reader = spf . newSAXParser ( ) . getXMLReader ( ) ; if ( reader instanceof SAXParser ) { <START_BUG> SecurityManager securityManager = ( ( SecurityManager ) ( fComponentManager . getProperty ( ValidatorHandlerImpl . SECURITY_MANAGER ) ) ) ; <END_BUG> if ( securityManager != null ) { try { reader . setProperty ( ValidatorHandlerImpl . SECURITY_MANAGER , securityManager ) ; } catch ( SAXException exc ) { } } } } catch ( Exception e ) { throw new FactoryConfigurationError ( e ) ; } } try { fStringsInternalized = reader . getFeature ( ValidatorHandlerImpl . STRING_INTERNING ) ; } catch ( SAXException exc ) { fStringsInternalized = false ; } ErrorHandler errorHandler = fComponentManager . getErrorHandler ( ) ; reader . setErrorHandler ( ( errorHandler != null ? errorHandler : DraconianErrorHandler . getInstance ( ) ) ) ; reader . setEntityResolver ( fResolutionForwarder ) ; fResolutionForwarder . setEntityResolver ( fComponentManager . getResourceResolver ( ) ) ; reader . setContentHandler ( this ) ; reader . setDTDHandler ( this ) ; try { reader . setProperty ( ValidatorHandlerImpl . LEXICAL_HANDLER , lh ) ; } catch ( SAXException exc ) { } InputSource is = saxSource . getInputSource ( ) ; reader . parse ( is ) ; } finally { setContentHandler ( null ) ; if ( reader != null ) { try { reader . setContentHandler ( null ) ; reader . setDTDHandler ( null ) ; reader . setErrorHandler ( null ) ;

Fix:
Object securityManager = fComponentManager . getProperty ( ValidatorHandlerImpl . SECURITY_MANAGER ) ;