Buggy code:
public class XMLNamespaceBinder implements XMLComponent , XMLDocumentFilter { protected static final String NAMESPACES = ( Constants . SAX_FEATURE_PREFIX ) + ( Constants . NAMESPACES_FEATURE ) ; protected static final String SYMBOL_TABLE = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SYMBOL_TABLE_PROPERTY ) ; protected static final String ERROR_REPORTER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . ERROR_REPORTER_PROPERTY ) ; protected static final String [ ] RECOGNIZED_FEATURES = new String [ ] { XMLNamespaceBinder . NAMESPACES } ; protected static final String [ ] RECOGNIZED_PROPERTIES = new String [ ] { XMLNamespaceBinder . SYMBOL_TABLE , XMLNamespaceBinder . ERROR_REPORTER } ; protected boolean fNamespaces ; protected SymbolTable fSymbolTable ; protected XMLErrorReporter fErrorReporter ; protected XMLDocumentHandler fDocumentHandler ; protected NamespaceSupport fNamespaceSupport = new NamespaceSupport ( ) ; protected boolean fOnlyPassPrefixMappingEvents ; private NamespaceContext fNamespaceContext ; private QName fAttributeQName = new QName ( ) ; private String fEmptySymbol ; private String fXmlSymbol ; private String fXmlnsSymbol ; public XMLNamespaceBinder ( ) { } public XMLNamespaceBinder ( NamespaceContext namespaceContext ) { } public NamespaceContext getNamespaceContext ( ) { } public void setOnlyPassPrefixMappingEvents ( boolean onlyPassPrefixMappingEvents ) { } public boolean getOnlyPassPrefixMappingEvents ( ) { } public void reset ( XMLComponentManager componentManager ) throws XNIException { } public String [ ] getRecognizedFeatures ( ) { } public void setFeature ( String featureId , boolean state ) throws XMLConfigurationException { } public String [ ] getRecognizedProperties ( ) { } public void setProperty ( String propertyId , Object value ) throws XMLConfigurationException { } public void setDocumentHandler ( XMLDocumentHandler documentHandler ) { } public void startEntity ( String name , String publicId , String systemId , String baseSystemId , String encoding ) throws XNIException { } public void textDecl ( String version , String encoding ) throws XNIException { } public void startDocument ( XMLLocator locator , String encoding ) throws XNIException { } public void xmlDecl ( String version , String encoding , String standalone ) throws XNIException { } public void doctypeDecl ( String rootElement , String publicId , String systemId ) throws XNIException { } public void comment ( XMLString text ) throws XNIException { } public void processingInstruction ( String target , XMLString data ) throws XNIException { } public void startPrefixMapping ( String prefix , String uri ) throws XNIException { } public void startElement ( QName element , XMLAttributes attributes ) throws XNIException { } public void emptyElement ( QName element , XMLAttributes attributes ) throws XNIException { } public void characters ( XMLString text ) throws XNIException { } public void ignorableWhitespace ( XMLString text ) throws XNIException { } public void endElement ( QName element ) throws XNIException { } public void endPrefixMapping ( String prefix ) throws XNIException { } public void startCDATA ( ) throws XNIException { } public void endCDATA ( ) throws XNIException { } public void endDocument ( ) throws XNIException { } public void endEntity ( String name ) throws XNIException { } protected void handleStartElement ( QName element , XMLAttributes attributes , boolean isEmpty ) throws XNIException { fNamespaceSupport . pushContext ( ) ; int length = attributes . getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { String localpart = attributes . getLocalName ( i ) ; String prefix = attributes . getPrefix ( i ) ; if ( ( prefix == ( fXmlnsSymbol ) ) || ( localpart == ( fXmlnsSymbol ) ) ) { prefix = ( localpart != ( fXmlnsSymbol ) ) ? localpart : fEmptySymbol ; String uri = attributes . getValue ( i ) ; uri = fSymbolTable . addSymbol ( uri ) ; if ( ( uri == ( fEmptySymbol ) ) && ( localpart != ( fXmlnsSymbol ) ) ) { <START_BUG> fErrorReporter . reportError ( XMLNS_DOMAIN , "EmptyPrefixedAttName" , new Object [ ] { element . rawname } , SEVERITY_FATAL_ERROR ) ; <END_BUG> continue ; } fNamespaceSupport . declarePrefix ( prefix , ( ( uri . length ( ) ) != 0 ? uri : null ) ) ; if ( ( fDocumentHandler ) != null ) { fDocumentHandler . startPrefixMapping ( prefix , uri ) ; } } } String prefix = ( ( element . prefix ) != null ) ? element . prefix : fEmptySymbol ; element . uri = fNamespaceSupport . getURI ( prefix ) ; if ( ( ( element . prefix ) == null ) && ( ( element . uri ) != null ) ) { element . prefix = fEmptySymbol ; } 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 : fEmptySymbol ; String arawname = fAttributeQName . rawname ; if ( aprefix == ( fXmlSymbol ) ) { fAttributeQName . uri = fNamespaceSupport . getURI ( fXmlSymbol ) ; attributes . setName ( i , fAttributeQName ) ; } else if ( ( arawname != ( fXmlnsSymbol ) ) && ( ! ( arawname . startsWith ( "xmlns:" ) ) ) ) { if ( aprefix != ( fEmptySymbol ) ) { fAttributeQName . uri = fNamespaceSupport . getURI ( aprefix ) ; if ( ( fAttributeQName . uri ) == null ) { fErrorReporter . reportError ( XMLNS_DOMAIN , "AttributePrefixUnbound" , new Object [ ] { aprefix , arawname } , SEVERITY_FATAL_ERROR ) ; } attributes . setName ( i , fAttributeQName ) ; } } } int attrCount = attributes . getLength ( ) ; for ( int i = 0 ;

Fix:
fErrorReporter . reportError ( XMLNS_DOMAIN , "EmptyPrefixedAttName" , new Object [ ] { attributes . getQName ( i ) } , SEVERITY_FATAL_ERROR ) ;