Program: 68500
Project: 68500
Buggy source:
/** 
 * ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. in events to ensure that all required objects are updated.  EclipseLink will automatically update all objects and changesets involved.  EclipseLink will update the field, in the row, to have the new value for the field that this mapping maps to.
 */
public void updateAttributeWithObject(String attributeName,Object value){
  DatabaseMapping mapping=this.query.getDescriptor().getObjectBuilder().getMappingForAttributeName(attributeName);
  if (mapping == null) {
    throw DescriptorException.mappingForAttributeIsMissing(attributeName,getDescriptor());
  }
  Object clone=this.getObject();
  Object cloneValue=value;
  Object original=null;
  if ((this.eventCode == DescriptorEventManager.PostCloneEvent) || (this.eventCode == DescriptorEventManager.PostMergeEvent)) {
    original=this.getOriginalObject();
  }
  Object originalValue=value;
  ObjectChangeSet eventChangeSet=this.getChangeSet();
  Object valueForChangeSet=value;
  if ((this.query != null) && this.query.isObjectLevelModifyQuery()) {
    clone=((ObjectLevelModifyQuery)this.query).getObject();
    eventChangeSet=((ObjectLevelModifyQuery)this.query).getObjectChangeSet();
  }
  ClassDescriptor descriptor=getSession().getDescriptor(value.getClass());
  if (descriptor != null) {
    if (eventChangeSet != null) {
      valueForChangeSet=descriptor.getObjectBuilder().createObjectChangeSet(value,(UnitOfWorkChangeSet)eventChangeSet.getUOWChangeSet(),getSession());
    }
    if (original != null) {
      originalValue=((UnitOfWorkImpl)getSession()).getOriginalVersionOfObject(value);
    }
  }
  if (clone != null) {
    mapping.setRealAttributeValueInObject(clone,cloneValue);
  }
  if (original != null) {
    mapping.setRealAttributeValueInObject(original,originalValue);
  }
  if (getRecord() != null) {
    AbstractRecord tempRow=getDescriptor().getObjectBuilder().createRecord();
    mapping.writeFromObjectIntoRow(clone,tempRow,getSession());
    ((AbstractRecord)getRecord()).mergeFrom(tempRow);
  }
  if (eventChangeSet != null) {
    eventChangeSet.removeChange(attributeName);
    eventChangeSet.addChange(mapping.compareForChange(clone,((UnitOfWorkImpl)getSession()).getBackupClone(clone),eventChangeSet,getSession()));
  }
}

Fixed version (ground truth):
/** 
 * ADVANCED: Use this method when updating object attribute values, with unmapped objects Integer, String or others. in events to ensure that all required objects are updated.  EclipseLink will automatically update all objects and changesets involved.  EclipseLink will update the field, in the row, to have the new value for the field that this mapping maps to.
 */
public void updateAttributeWithObject(String attributeName,Object value){
  DatabaseMapping mapping=this.query.getDescriptor().getObjectBuilder().getMappingForAttributeName(attributeName);
  if (mapping == null) {
    throw DescriptorException.mappingForAttributeIsMissing(attributeName,getDescriptor());
  }
  Object clone=this.getObject();
  Object cloneValue=value;
  Object original=null;
  if ((this.eventCode == DescriptorEventManager.PostCloneEvent) || (this.eventCode == DescriptorEventManager.PostMergeEvent)) {
    original=this.getOriginalObject();
  }
  Object originalValue=value;
  ObjectChangeSet eventChangeSet=this.getChangeSet();
  Object valueForChangeSet=value;
  if ((this.query != null) && this.query.isObjectLevelModifyQuery()) {
    clone=((ObjectLevelModifyQuery)this.query).getObject();
    eventChangeSet=((ObjectLevelModifyQuery)this.query).getObjectChangeSet();
  }
  ClassDescriptor descriptor=getSession().getDescriptor(value.getClass());
  if (descriptor != null) {
    if (eventChangeSet != null) {
      valueForChangeSet=descriptor.getObjectBuilder().createObjectChangeSet(value,(UnitOfWorkChangeSet)eventChangeSet.getUOWChangeSet(),getSession());
    }
    if (original != null) {
      originalValue=((UnitOfWorkImpl)getSession()).getOriginalVersionOfObject(value);
    }
  }
  if (clone != null) {
    mapping.setRealAttributeValueInObject(clone,cloneValue);
  }
  if (original != null) {
    mapping.setRealAttributeValueInObject(original,originalValue);
  }
  if (getRecord() != null) {
    AbstractRecord tempRow=getDescriptor().getObjectBuilder().createRecord(getSession());
    mapping.writeFromObjectIntoRow(clone,tempRow,getSession());
    ((AbstractRecord)getRecord()).mergeFrom(tempRow);
  }
  if (eventChangeSet != null) {
    eventChangeSet.removeChange(attributeName);
    eventChangeSet.addChange(mapping.compareForChange(clone,((UnitOfWorkImpl)getSession()).getBackupClone(clone),eventChangeSet,getSession()));
  }
}