Buggy code:
public class DocumentImpl extends ParentNode implements Document , DocumentEvent , DocumentRange , DocumentTraversal { static final long serialVersionUID = 515687835542616694L ; protected DocumentTypeImpl docType ; protected ElementImpl docElement ; protected String encoding ; protected String version ; protected boolean standalone ; protected Hashtable identifiers ; protected Vector iterators ; protected Vector ranges ; protected static int [ ] kidOK ; protected Hashtable userData ; protected Hashtable eventListeners ; protected int changes = 0 ; protected boolean allowGrammarAccess ; protected boolean errorChecking = true ; protected boolean mutationEvents = false ; public DocumentImpl ( ) { } public DocumentImpl ( boolean grammarAccess ) { } public DocumentImpl ( DocumentType doctype ) { } public DocumentImpl ( DocumentType doctype , boolean grammarAccess ) { } public final Document getOwnerDocument ( ) { } public short getNodeType ( ) { } public String getNodeName ( ) { } public Node cloneNode ( boolean deep ) { } public Node insertBefore ( Node newChild , Node refChild ) throws DOMException { } public Node removeChild ( Node oldChild ) throws DOMException { } public Node replaceChild ( Node newChild , Node oldChild ) throws DOMException { } public Attr createAttribute ( String name ) throws DOMException { } public CDATASection createCDATASection ( String data ) throws DOMException { } public Comment createComment ( String data ) { } public DocumentFragment createDocumentFragment ( ) { } public Element createElement ( String tagName ) throws DOMException { } public EntityReference createEntityReference ( String name ) throws DOMException { } public ProcessingInstruction createProcessingInstruction ( String target , String data ) throws DOMException { } public Text createTextNode ( String data ) { } public DocumentType getDoctype ( ) { } public String getEncoding ( ) { } public String getVersion ( ) { } public boolean getStandalone ( ) { } public Element getDocumentElement ( ) { } public NodeList getElementsByTagName ( String tagname ) { } public DOMImplementation getImplementation ( ) { } public void setErrorChecking ( boolean check ) { } public void setStrictErrorChecking ( boolean check ) { } public void setEncoding ( String value ) { } public void setVersion ( String value ) { } public void setStandalone ( boolean value ) { } public boolean getErrorChecking ( ) { } public boolean getStrictErrorChecking ( ) { } public void setMutationEvents ( boolean set ) { } public boolean getMutationEvents ( ) { } public DocumentType createDocumentType ( String qualifiedName , String publicID , String systemID ) throws DOMException { } public Entity createEntity ( String name ) throws DOMException { } public Notation createNotation ( String name ) throws DOMException { } public ElementDefinitionImpl createElementDefinition ( String name ) throws DOMException { } public Node importNode ( Node source , boolean deep ) throws DOMException { } private Node importNode ( Node source , boolean deep , Hashtable reversedIdentifiers ) throws DOMException { } public Node adoptNode ( Node source ) { } public Element getElementById ( String elementId ) { } public void putIdentifier ( String idName , Element element ) { } public Element getIdentifier ( String idName ) { } public void removeIdentifier ( String idName ) { } public Enumeration getIdentifiers ( ) { } public Element createElementNS ( String namespaceURI , String qualifiedName ) throws DOMException { } public Attr createAttributeNS ( String namespaceURI , String qualifiedName ) throws DOMException { } public NodeList getElementsByTagNameNS ( String namespaceURI , String localName ) { } 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 ( Node node ) { } void deletedText ( Node node , int offset , int count ) { } void insertedText ( Node node , int offset , int count ) { } void splitData ( Node node , Node newNode , int offset ) { } void removedChildNode ( Node oldChild ) { } public Event createEvent ( String type ) throws DOMException { <START_BUG> if ( ( type . equalsIgnoreCase ( "Events" ) ) || ( "Event" . equals ( type ) ) ) ; <END_BUG> return new EventImpl ( ) ; if ( ( type . equalsIgnoreCase ( "MutationEvents" ) ) || ( "MutationEvent" . equals ( type ) ) ) return new MutationEventImpl ( ) ; else throw new DOMException ( DOMException . NOT_SUPPORTED_ERR , "DOM007<seq2seq4repair_space>Not<seq2seq4repair_space>supported" ) ; } public Object clone ( ) throws CloneNotSupportedException { } public static boolean isXMLName ( String s ) { } protected void setUserData ( NodeImpl n , Object data ) { } protected Object getUserData ( NodeImpl n ) { } protected void setEventListeners ( NodeImpl n , Vector listeners ) { } protected Vector getEventListeners ( NodeImpl n ) { } protected boolean isKidOK ( Node parent , Node child ) { } protected void changed ( ) { } protected int changes ( ) { } }

Fix:
if ( ( type . equalsIgnoreCase ( "Events" ) ) || ( "Event" . equals ( type ) ) )