Buggy code:
public class DocumentImpl extends CoreDocumentImpl implements DocumentLS , DocumentEvent , DocumentRange , DocumentTraversal { static final long serialVersionUID = 515687835542616694L ; protected Vector iterators ; protected Vector ranges ; protected Hashtable eventListeners ; protected boolean mutationEvents = false ; public DocumentImpl ( ) { } public DocumentImpl ( boolean grammarAccess ) { } public DocumentImpl ( DocumentType doctype ) { } public DocumentImpl ( DocumentType doctype , boolean grammarAccess ) { } public Node cloneNode ( boolean deep ) { } public DOMImplementation getImplementation ( ) { } public NodeIterator createNodeIterator ( Node root , short whatToShow , NodeFilter filter ) { } public NodeIterator createNodeIterator ( Node root , int whatToShow , NodeFilter filter , boolean entityReferenceExpansion ) { } public TreeWalker createTreeWalker ( Node root , short whatToShow , NodeFilter filter ) { } public TreeWalker createTreeWalker ( Node root , int whatToShow , NodeFilter filter , boolean entityReferenceExpansion ) { } void removeNodeIterator ( NodeIterator nodeIterator ) { } public Range createRange ( ) { } void removeRange ( Range range ) { } void replacedText ( NodeImpl node ) { } void deletedText ( NodeImpl node , int offset , int count ) { } void insertedText ( NodeImpl node , int offset , int count ) { } void splitData ( Node node , Node newNode , int offset ) { } public Event createEvent ( String type ) throws DOMException { } void setMutationEvents ( boolean set ) { } boolean getMutationEvents ( ) { } protected void setEventListeners ( NodeImpl n , Vector listeners ) { } protected Vector getEventListeners ( NodeImpl n ) { } class LEntry { String type ; EventListener listener ; boolean useCapture ; LEntry ( String type , EventListener listener , boolean useCapture ) { } } protected void addEventListener ( NodeImpl node , String type , EventListener listener , boolean useCapture ) { } protected void removeEventListener ( NodeImpl node , String type , EventListener listener , boolean useCapture ) { } protected boolean dispatchEvent ( NodeImpl node , Event event ) { } protected void dispatchEventToSubtree ( NodeImpl node , Node n , Event e ) { } class EnclosingAttr { AttrImpl node ; String oldvalue ; } DocumentImpl . EnclosingAttr savedEnclosingAttr ; protected void dispatchAggregateEvents ( NodeImpl node , DocumentImpl . EnclosingAttr ea ) { } protected void dispatchAggregateEvents ( NodeImpl node , AttrImpl enclosingAttr , String oldvalue , short change ) { } protected void saveEnclosingAttr ( NodeImpl node ) { } void modifyingCharacterData ( NodeImpl node ) { } void modifiedCharacterData ( NodeImpl node , String oldvalue , String value ) { } void insertingNode ( NodeImpl node , boolean replace ) { } void insertedNode ( NodeImpl node , NodeImpl newInternal , boolean replace ) { } void removingNode ( NodeImpl node , NodeImpl oldChild , boolean replace ) { } void removedNode ( NodeImpl node , boolean replace ) { } void replacingNode ( NodeImpl node ) { } void replacedNode ( NodeImpl node ) { } void modifiedAttrValue ( AttrImpl attr , String oldvalue ) { } void setAttrNode ( AttrImpl attr , AttrImpl previous ) { } void removedAttrNode ( AttrImpl attr , NodeImpl oldOwner , String name ) { if ( mutationEvents ) { LCount lc = LCount . lookup ( DOM_ATTR_MODIFIED ) ; if ( ( ( ( lc . captures ) + ( lc . bubbles ) ) + ( lc . defaults ) ) > 0 ) { MutationEventImpl me = new MutationEventImpl ( ) ; <START_BUG> me . initMutationEvent ( DOM_ATTR_MODIFIED , true , false , null , attr . getNodeValue ( ) , null , name , MutationEvent . REMOVAL ) ; <END_BUG> dispatchEvent ( oldOwner , me ) ; } dispatchAggregateEvents ( oldOwner , null , null , ( ( short ) ( 0 ) ) ) ; } } public boolean getAsync ( ) { } public void setAsync ( boolean async ) { } public void abort ( ) { } public boolean load ( String uri ) { } public boolean loadXML ( String source ) { } public String saveXML ( Node snode ) throws DOMException { } }

Fix:
me . initMutationEvent ( DOM_ATTR_MODIFIED , true , false , attr , attr . getNodeValue ( ) , null , name , MutationEvent . REMOVAL ) ;