Buggy code:
protected void cloneNode ( CoreDocumentImpl newdoc , 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 String getTextContent ( ) throws DOMException { } public void setTextContent ( String textContent ) 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 Element getDocumentElement ( ) { } public NodeList getElementsByTagName ( String tagname ) { } public DOMImplementation getImplementation ( ) { } public void setErrorChecking ( boolean check ) { } public void setStrictErrorChecking ( boolean check ) { } public boolean getErrorChecking ( ) { } public boolean getStrictErrorChecking ( ) { } public String getActualEncoding ( ) { } public void setActualEncoding ( String value ) { } public void setEncoding ( String value ) { } public String getEncoding ( ) { } public void setVersion ( String value ) { } public String getVersion ( ) { } public void setStandalone ( boolean value ) { } public boolean getStandalone ( ) { } public String getDocumentURI ( ) { } public DOMErrorHandler getErrorHandler ( ) { } public void setErrorHandler ( DOMErrorHandler errorHandler ) { } public Node renameNode ( Node n , String namespaceURI , String name ) throws DOMException { } public void normalizeDocument ( ) { } protected boolean isNormalizeDocRequired ( ) { } public void setNormalizationFeature ( String name , boolean state ) throws DOMException { } public boolean getNormalizationFeature ( String name ) throws DOMException { } public boolean canSetNormalizationFeature ( String name , boolean state ) { } public String getBaseURI ( ) { } public void setDocumentURI ( String documentURI ) { } 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 { } void setMutationEvents ( boolean set ) { } 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 , boolean cloningDoc , 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 Element createElementNS ( String namespaceURI , String qualifiedName , String localpart ) throws DOMException { } public Attr createAttributeNS ( String namespaceURI , String qualifiedName ) throws DOMException { } public Attr createAttributeNS ( String namespaceURI , String qualifiedName , String localpart ) throws DOMException { <START_BUG> return new AttrNSImpl ( this , namespaceURI , qualifiedName , localName ) ; <END_BUG> } public NodeList getElementsByTagNameNS ( String namespaceURI , String localName ) { } public Object clone ( ) throws CloneNotSupportedException { } public static boolean isXMLName ( String s ) { } protected boolean isKidOK ( Node parent , Node child ) { } protected void changed ( ) { } protected int changes ( ) { } NodeListCache getNodeListCache ( ParentNode owner ) { } void freeNodeListCache ( NodeListCache c ) { } class UserDataRecord implements Serializable { Object fData ; UserDataHandler fHandler ; UserDataRecord ( Object data , UserDataHandler handler ) { } } public Object setUserData ( Node n , String key , Object data , UserDataHandler handler ) { } public Object getUserData ( Node n , String key ) { } Hashtable removeUserDataTable ( Node n ) { } void setUserDataTable ( Node n , Hashtable data ) { } void callUserDataHandlers ( Node n , Node c , short operation ) { } public void finalize ( ) { } public void copyConfigurationProperties ( XMLParserConfiguration config ) { } protected void setUserData ( NodeImpl n , Object data ) { } protected Object getUserData ( NodeImpl n ) { } protected void addEventListener ( NodeImpl node , String type , EventListener listener , boolean useCapture ) { } protected void removeEventListener ( NodeImpl node , String type , EventListener listener , boolean useCapture ) { } protected void copyEventListeners ( NodeImpl src , NodeImpl tgt ) { } protected boolean dispatchEvent ( NodeImpl node , Event event ) { } void replacedText ( NodeImpl node ) { } void deletedText ( NodeImpl node , int offset , int count ) { } void insertedText ( NodeImpl node , int offset , int count ) { } void modifyingCharacterData ( NodeImpl node ) { } void modifiedCharacterData ( NodeImpl node , String oldvalue , String value ) { } void insertingNode ( NodeImpl node , boolean replace ) { }

Fix:
return new AttrNSImpl ( this , namespaceURI , qualifiedName , localpart ) ;