Buggy code:
public class DOMNormalizer implements XMLGrammarPool { protected static final boolean DEBUG_ND = false ; protected static final boolean DEBUG = false ; protected static final String PREFIX = "NS" ; protected static final String ERROR_HANDLER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . ERROR_HANDLER_PROPERTY ) ; protected static final String SYMBOL_TABLE = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SYMBOL_TABLE_PROPERTY ) ; protected CoreDocumentImpl fDocument = null ; protected final DOMNormalizer . XMLAttributesProxy fAttrProxy = new DOMNormalizer . XMLAttributesProxy ( ) ; protected final QName fQName = new QName ( ) ; protected RevalidationHandler fValidationHandler ; protected SymbolTable fSymbolTable ; protected DOMErrorHandler fErrorHandler ; protected int fNamespaceCounter = 1 ; protected boolean fNamespaceValidation = false ; protected final NamespaceSupport fNamespaceBinder = new NamespaceSupport ( ) ; protected final NamespaceSupport fLocalNSBinder = new NamespaceSupport ( ) ; protected final Vector fAttributeList = new Vector ( 5 , 10 ) ; protected final DOMErrorImpl fDOMError = new DOMErrorImpl ( ) ; protected final DOMLocatorImpl fLocator = new DOMLocatorImpl ( ) ; public DOMNormalizer ( ) { } protected void reset ( XMLComponentManager componentManager ) { } protected final void setValidationHandler ( RevalidationHandler validator ) { } protected final void normalizeDocument ( CoreDocumentImpl document ) { } protected final Node normalizeNode ( Node node ) { } protected final void expandEntityRef ( Node node , Node parent , Node reference ) { } protected final void namespaceFixUp ( ElementImpl element , AttributeMap attributes ) { if ( DOMNormalizer . DEBUG ) { System . out . println ( ( ( ( "[ns-fixup]<seq2seq4repair_space>element:" + ( element . getNodeName ( ) ) ) + "<seq2seq4repair_space>uri:<seq2seq4repair_space>" ) + ( element . getNamespaceURI ( ) ) ) ) ; } String localUri ; String value ; String name ; String uri ; String prefix ; if ( attributes != null ) { for ( int k = 0 ; k < ( attributes . getLength ( ) ) ; k ++ ) { Attr attr = ( ( Attr ) ( attributes . getItem ( k ) ) ) ; uri = attr . getNamespaceURI ( ) ; if ( ( uri != null ) && ( uri . equals ( XMLNS_URI ) ) ) { value = attr . getNodeValue ( ) ; if ( value == null ) { value = XMLSymbols . EMPTY_STRING ; } if ( value . equals ( XMLNS_URI ) ) { if ( ( fErrorHandler ) != null ) { modifyDOMError ( "No<seq2seq4repair_space>prefix<seq2seq4repair_space>other<seq2seq4repair_space>than<seq2seq4repair_space>'xmlns'<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>bound<seq2seq4repair_space>to<seq2seq4repair_space>'http:////www.w3.org//2000//xmlns//'<seq2seq4repair_space>namespace<seq2seq4repair_space>name" , DOMError . SEVERITY_ERROR , attr ) ; boolean continueProcess = fErrorHandler . handleError ( fDOMError ) ; if ( ! continueProcess ) { throw new RuntimeException ( "Stopped<seq2seq4repair_space>at<seq2seq4repair_space>user<seq2seq4repair_space>request" ) ; } } } else { prefix = attr . getPrefix ( ) ; prefix = ( ( prefix == null ) || ( ( prefix . length ( ) ) == 0 ) ) ? XMLSymbols . EMPTY_STRING : fSymbolTable . addSymbol ( prefix ) ; String localpart = fSymbolTable . addSymbol ( attr . getLocalName ( ) ) ; <START_BUG> if ( prefix == ( XMLSymbols . EMPTY_STRING ) ) { <END_BUG> value = fSymbolTable . addSymbol ( value ) ; if ( ( value . length ( ) ) != 0 ) { fNamespaceBinder . declarePrefix ( localpart , value ) ; fLocalNSBinder . declarePrefix ( localpart , value ) ; if ( ( fValidationHandler ) != null ) { fValidationHandler . startPrefixMapping ( localpart , value , null ) ; } } else { } removeDefault ( attr , attributes ) ; continue ; } else { value = fSymbolTable . addSymbol ( value ) ; fLocalNSBinder . declarePrefix ( EMPTY_STRING , value ) ; fNamespaceBinder . declarePrefix ( EMPTY_STRING , value ) ; if ( ( fValidationHandler ) != null ) { fValidationHandler . startPrefixMapping ( EMPTY_STRING , value , null ) ; } removeDefault ( attr , attributes ) ; continue ; } } } } } uri = element . getNamespaceURI ( ) ; prefix = element . getPrefix ( ) ; if ( uri != null ) { uri = fSymbolTable . addSymbol ( uri ) ; prefix = ( ( prefix == null ) || ( ( prefix . length ( ) ) == 0 ) ) ? XMLSymbols . EMPTY_STRING : fSymbolTable . addSymbol ( prefix ) ; if ( ( fNamespaceBinder . getURI ( prefix ) ) == uri ) { } else { addNamespaceDecl ( prefix , uri , element ) ; fLocalNSBinder . declarePrefix ( prefix , uri ) ; fNamespaceBinder . declarePrefix ( prefix , uri ) ; if ( ( fValidationHandler ) != null ) { fValidationHandler . startPrefixMapping ( prefix , uri , null ) ; } } } else { String tagName = element . getNodeName ( ) ; int colon = tagName . indexOf ( ':' ) ; if ( colon > ( - 1 ) ) { boolean continueProcess = true ; if ( ( fErrorHandler ) != null ) { if ( fNamespaceValidation ) { modifyDOMError ( ( "DOM<seq2seq4repair_space>Level<seq2seq4repair_space>1<seq2seq4repair_space>node:<seq2seq4repair_space>" + tagName ) , DOMError . SEVERITY_FATAL_ERROR , element ) ; fErrorHandler . handleError ( fDOMError ) ; } else { modifyDOMError ( ( "DOM<seq2seq4repair_space>Level<seq2seq4repair_space>1<seq2seq4repair_space>node:<seq2seq4repair_space>" + tagName ) , DOMError . SEVERITY_ERROR , element ) ; continueProcess = fErrorHandler . handleError ( fDOMError ) ; } } if ( ( fNamespaceValidation ) || ( ! continueProcess ) ) { throw new RuntimeException ( ( "DOM<seq2seq4repair_space>Level<seq2seq4repair_space>1<seq2seq4repair_space>node:<seq2seq4repair_space>" + tagName ) ) ; } } else { uri = fNamespaceBinder . getURI ( EMPTY_STRING ) ; if ( ( uri != null ) && ( ( uri . length ( ) ) > 0 ) ) { addNamespaceDecl ( EMPTY_STRING , EMPTY_STRING , element ) ; fLocalNSBinder . declarePrefix ( EMPTY_STRING , EMPTY_STRING ) ; fNamespaceBinder . declarePrefix ( EMPTY_STRING , EMPTY_STRING ) ; if ( ( fValidationHandler ) != null ) { fValidationHandler . startPrefixMapping ( EMPTY_STRING , EMPTY_STRING , null ) ; } } }

Fix:
if ( prefix == ( XMLSymbols . PREFIX_XMLNS ) ) {