Program: 66089
Project: 66089
Buggy source:
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (namespaceResolver != null) {
      resolverPfx=namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    characters(node.getNodeValue());
  }
 else {
    try {
      OutputStreamRecordContentHandler handler=new OutputStreamRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(handler);
      xfragReader.setProperty("String_Node_Str",handler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (getNamespaceResolver() != null) {
      resolverPfx=this.getNamespaceResolver().resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
        this.getNamespaceResolver().put(attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    characters(node.getNodeValue());
  }
 else {
    try {
      OutputStreamRecordContentHandler handler=new OutputStreamRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(handler);
      xfragReader.setProperty("String_Node_Str",handler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}