Buggy code:
public void emptyElement ( QName element , XMLAttributes attributes , 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 endGeneralEntity ( String name , Augmentations augs ) throws XNIException { } protected void handleStartElement ( QName element , XMLAttributes attributes , Augmentations augs , boolean isEmpty ) throws XNIException { fNamespaceContext . pushContext ( ) ; if ( ( element . prefix ) == ( XMLSymbols . PREFIX_XMLNS ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "ElementXMLNSPrefix" , new Object [ ] { element . rawname } , SEVERITY_FATAL_ERROR ) ; } int length = attributes . getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { String localpart = attributes . getLocalName ( i ) ; String prefix = attributes . getPrefix ( i ) ; if ( ( prefix == ( XMLSymbols . PREFIX_XMLNS ) ) || ( ( prefix == ( XMLSymbols . EMPTY_STRING ) ) && ( localpart == ( XMLSymbols . PREFIX_XMLNS ) ) ) ) { String uri = fSymbolTable . addSymbol ( attributes . getValue ( i ) ) ; if ( ( prefix == ( XMLSymbols . PREFIX_XMLNS ) ) && ( localpart == ( XMLSymbols . PREFIX_XMLNS ) ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "CantBindXMLNS" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ; } if ( uri == ( NamespaceContext . XMLNS_URI ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "CantBindXMLNS" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ; } if ( localpart == ( XMLSymbols . PREFIX_XML ) ) { if ( uri != ( NamespaceContext . XML_URI ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "CantBindXML" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ; } } else { if ( uri == ( NamespaceContext . XML_URI ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "CantBindXML" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ; } } prefix = ( localpart != ( XMLSymbols . PREFIX_XMLNS ) ) ? localpart : XMLSymbols . EMPTY_STRING ; if ( prefixBoundToNullURI ( uri , localpart ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "EmptyPrefixedAttName" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ; continue ; } fNamespaceContext . declarePrefix ( prefix , ( ( uri . length ( ) ) != 0 ? uri : null ) ) ; } } String prefix = ( ( element . prefix ) != null ) ? element . prefix : XMLSymbols . EMPTY_STRING ; element . uri = fNamespaceContext . getURI ( prefix ) ; if ( ( ( element . prefix ) == null ) && ( ( element . uri ) != null ) ) { element . prefix = XMLSymbols . EMPTY_STRING ; } if ( ( ( element . prefix ) != null ) && ( ( element . uri ) == null ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "ElementPrefixUnbound" , new Object [ ] { element . prefix , element . rawname } , SEVERITY_FATAL_ERROR ) ; } for ( int i = 0 ; i < length ; i ++ ) { attributes . getName ( i , fAttributeQName ) ; String aprefix = ( ( fAttributeQName . prefix ) != null ) ? fAttributeQName . prefix : XMLSymbols . EMPTY_STRING ; String arawname = fAttributeQName . rawname ; if ( arawname == ( XMLSymbols . PREFIX_XMLNS ) ) { fAttributeQName . uri = fNamespaceContext . getURI ( PREFIX_XMLNS ) ; attributes . setName ( i , fAttributeQName ) ; } else if ( aprefix != ( XMLSymbols . EMPTY_STRING ) ) { fAttributeQName . uri = fNamespaceContext . getURI ( aprefix ) ; if ( ( fAttributeQName . uri ) == null ) { <START_BUG> fErrorReporter . reportError ( XMLNS_DOMAIN , "AttributePrefixUnbound" , new Object [ ] { aprefix , arawname } , SEVERITY_FATAL_ERROR ) ; <END_BUG> } attributes . setName ( i , fAttributeQName ) ; } } int attrCount = attributes . getLength ( ) ; for ( int i = 0 ; i < ( attrCount - 1 ) ; i ++ ) { String alocalpart = attributes . getLocalName ( i ) ; String auri = attributes . getURI ( i ) ; for ( int j = i + 1 ; j < attrCount ; j ++ ) { String blocalpart = attributes . getLocalName ( j ) ; String buri = attributes . getURI ( j ) ; if ( ( alocalpart == blocalpart ) && ( auri == buri ) ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "AttributeNSNotUnique" , new Object [ ] { element . rawname , alocalpart , auri } , SEVERITY_FATAL_ERROR ) ; } } } if ( ( ( fDocumentHandler ) != null ) && ( ! ( fOnlyPassPrefixMappingEvents ) ) ) { if ( isEmpty ) { fDocumentHandler . emptyElement ( element , attributes , augs ) ; } else { fDocumentHandler . startElement ( element , attributes , augs ) ; } } } protected void handleEndElement ( QName element , Augmentations augs , boolean isEmpty ) throws XNIException { } protected boolean prefixBoundToNullURI ( String uri , String localpart ) { } }

Fix:
fErrorReporter . reportError ( XMLNS_DOMAIN , "AttributePrefixUnbound" , new Object [ ] { element . rawname , arawname , aprefix } , SEVERITY_FATAL_ERROR ) ;