Program: 68798
Project: 68798
Buggy source:
private void doMarshal(SDOProperty prop,DataObject value,SDOChangeSummary cs,Element csNode,SDODataObject modifiedObject,List deletedXPaths,String xpathToCS,String sdoPrefix){
  if (value == null) {
    return;
  }
  boolean isDeleted=false;
  Object original=cs.getReverseDeletedMap().get(value);
  if ((original != null) && cs.isDeleted((DataObject)original)) {
    isDeleted=true;
  }
  String qualifiedName=getXPathForProperty(prop);
  XMLField xmlField=new XMLField(qualifiedName);
  xmlField.setNamespaceResolver(((SDOTypeHelper)typeHelper).getNamespaceResolver());
  String uri=xmlField.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);
    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 + getPathFromAncestor(((SDODataObject)original),(SDODataObject)marshalledObject,cs));
    if ((((SDODataObject)original).getContainmentProperty() != null) && ((SDODataObject)original).getContainmentProperty().getType().equals(SDOConstants.SDO_DATAOBJECT)) {
      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){
  if (value == null) {
    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);
    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 + getPathFromAncestor(((SDODataObject)original),(SDODataObject)marshalledObject,cs));
    if ((((SDODataObject)original).getContainmentProperty() != null) && ((SDODataObject)original).getContainmentProperty().getType().equals(SDOConstants.SDO_DATAOBJECT)) {
      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);
      }
    }
  }
}