Program: 67814
Project: 67814
Buggy source:
private void doMarshal(SDOProperty prop,DataObject value,SDOChangeSummary cs,Element csNode,SDODataObject modifiedObject,List deletedXPaths,String xpathToCS,String sdoPrefix,String rootElementName){
  if (value == null) {
    DOMRecord row=new DOMRecord(csNode);
    Session session=((SDOXMLHelper)((SDOTypeHelper)typeHelper).getHelperContext().getXMLHelper()).getXmlContext().getSession(0);
    row.setSession((AbstractSession)session);
    marshalNilAttribute(prop,row);
    return;
  }
  boolean isDeleted=false;
  Object original=cs.getReverseDeletedMap().get(value);
  if ((original != null) && cs.isDeleted((DataObject)original)) {
    isDeleted=true;
  }
  String qualifiedName=getXPathForProperty(prop);
  String uri=null;
  if (prop.isOpenContent()) {
    uri=prop.getUri();
  }
 else {
    uri=prop.getContainingType().getURI();
  }
  if (isDeleted) {
    String pathToNode=getPathFromAncestor(((SDODataObject)original),modifiedObject,cs);
    String containerPath=null;
    containerPath=getQualifiedName(modifiedObject);
    deletedXPaths.add(xpathToCS + containerPath + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT+ pathToNode);
    XMLRoot xmlroot=new XMLRoot();
    xmlroot.setObject(value);
    xmlroot.setNamespaceURI(uri);
    xmlroot.setLocalName(qualifiedName);
    xmlMarshaller.marshal(xmlroot,csNode);
  }
 else {
    Element modifiedElement=null;
    if (uri == null) {
      modifiedElement=csNode.getOwnerDocument().createElement(qualifiedName);
    }
 else {
      modifiedElement=csNode.getOwnerDocument().createElementNS(uri,qualifiedName);
    }
    csNode.appendChild(modifiedElement);
    String nextPath=getPathFromAncestor((SDODataObject)original,(SDODataObject)marshalledObject,cs);
    if (nextPath == SDOConstants.EMPTY_STRING) {
      modifiedElement.setAttributeNS(SDOConstants.SDO_URL,sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + SDOConstants.CHANGESUMMARY_REF,SDOConstants.SDO_CHANGESUMMARY_REF_PATH_PREFIX + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + rootElementName);
    }
 else {
      modifiedElement.setAttributeNS(SDOConstants.SDO_URL,sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + SDOConstants.CHANGESUMMARY_REF,SDOConstants.SDO_CHANGESUMMARY_REF_PATH_PREFIX + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + rootElementName+ "String_Node_Str"+ nextPath);
    }
    if ((((SDODataObject)original).getContainmentProperty() != null) && ((SDODataObject)original).getContainmentProperty().getType().isDataObjectType()) {
      String schemaContext=((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContext();
      QName schemaContextQName=((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContextAsQName(((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver());
      if (schemaContext != null) {
        String typeValue=schemaContext.substring(1,schemaContext.length());
        String schemaInstancePrefix=((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
        String schemaContextUri=schemaContextQName.getNamespaceURI();
        String schemaContextPrefix=((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver().resolveNamespaceURI(schemaContextUri);
        if (schemaContextPrefix != null) {
          modifiedElement.setAttributeNS(XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + schemaContextPrefix,schemaContextQName.getNamespaceURI());
        }
        modifiedElement.setAttributeNS(XMLConstants.SCHEMA_INSTANCE_URL,schemaInstancePrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
      }
    }
  }
}

Fixed version (ground truth):
private void doMarshal(SDOProperty prop,DataObject value,SDOChangeSummary cs,Element csNode,SDODataObject modifiedObject,List deletedXPaths,String xpathToCS,String sdoPrefix,String rootElementName){
  if (value == null) {
    DOMRecord row=new DOMRecord(csNode);
    Session session=((SDOXMLHelper)((SDOTypeHelper)typeHelper).getHelperContext().getXMLHelper()).getXmlContext().getSession(0);
    row.setSession((AbstractSession)session);
    marshalNilAttribute(prop,row);
    return;
  }
  boolean isDeleted=false;
  Object original=cs.getReverseDeletedMap().get(value);
  if ((original != null) && cs.isDeleted((DataObject)original)) {
    isDeleted=true;
  }
  String qualifiedName=getXPathForProperty(prop);
  String uri=null;
  if (prop.isOpenContent()) {
    uri=prop.getUri();
  }
 else {
    uri=((XMLField)((SDOProperty)prop).getXmlMapping().getField()).getXPathFragment().getNamespaceURI();
  }
  if (isDeleted) {
    String pathToNode=getPathFromAncestor(((SDODataObject)original),modifiedObject,cs);
    String containerPath=null;
    containerPath=getQualifiedName(modifiedObject);
    deletedXPaths.add(xpathToCS + containerPath + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT+ pathToNode);
    XMLRoot xmlroot=new XMLRoot();
    xmlroot.setObject(value);
    xmlroot.setNamespaceURI(uri);
    xmlroot.setLocalName(qualifiedName);
    xmlMarshaller.marshal(xmlroot,csNode);
  }
 else {
    Element modifiedElement=null;
    if (uri == null) {
      modifiedElement=csNode.getOwnerDocument().createElement(qualifiedName);
    }
 else {
      modifiedElement=csNode.getOwnerDocument().createElementNS(uri,qualifiedName);
    }
    csNode.appendChild(modifiedElement);
    String nextPath=getPathFromAncestor((SDODataObject)original,(SDODataObject)marshalledObject,cs);
    if (nextPath == SDOConstants.EMPTY_STRING) {
      modifiedElement.setAttributeNS(SDOConstants.SDO_URL,sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + SDOConstants.CHANGESUMMARY_REF,SDOConstants.SDO_CHANGESUMMARY_REF_PATH_PREFIX + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + rootElementName);
    }
 else {
      modifiedElement.setAttributeNS(SDOConstants.SDO_URL,sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + SDOConstants.CHANGESUMMARY_REF,SDOConstants.SDO_CHANGESUMMARY_REF_PATH_PREFIX + SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + rootElementName+ "String_Node_Str"+ nextPath);
    }
    if ((((SDODataObject)original).getContainmentProperty() != null) && ((SDODataObject)original).getContainmentProperty().getType().isDataObjectType()) {
      String schemaContext=((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContext();
      QName schemaContextQName=((SDOType)value.getType()).getXmlDescriptor().getSchemaReference().getSchemaContextAsQName(((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver());
      if (schemaContext != null) {
        String typeValue=schemaContext.substring(1,schemaContext.length());
        String schemaInstancePrefix=((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
        String schemaContextUri=schemaContextQName.getNamespaceURI();
        String schemaContextPrefix=((SDOType)value.getType()).getXmlDescriptor().getNonNullNamespaceResolver().resolveNamespaceURI(schemaContextUri);
        if (schemaContextPrefix != null) {
          modifiedElement.setAttributeNS(XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + schemaContextPrefix,schemaContextQName.getNamespaceURI());
        }
        modifiedElement.setAttributeNS(XMLConstants.SCHEMA_INSTANCE_URL,schemaInstancePrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
      }
    }
  }
}