Program: 67082
Project: 67082
Buggy source:
/** 
 * Returns a list of   {@link ChangeSummary.Setting settings}that represent the property values of the given <code>dataObject</code> at the point when logging   {@link #beginLogging() began}. <p>In the case of a   {@link #isDeleted(DataObject) deleted} object,the List will include settings for all the Properties. <p> An old value setting indicates the value at the point logging begins.  A setting is only produced for {@link #isModified modified} objects ifeither the old value differs from the current value or if the isSet differs from the current value. <p> No settings are produced for  {@link #isCreated created} objects.
 * @param dataObject the object in question.
 * @return a list of settings.
 * @see #getChangedDataObjects
 */
public List getOldValues(DataObject dataObject){
  if ((dataObject == null) || (!isDeleted(dataObject) && ((dataObject.getChangeSummary() != null) && (dataObject.getChangeSummary() != this)))) {
    return new ArrayList();
  }
  if (!isCreated(dataObject) && isDirty(dataObject)) {
    List oldSettingsList=new ArrayList();
    for (int i=0; i < dataObject.getInstanceProperties().size(); i++) {
      SDOProperty nextProp=(SDOProperty)dataObject.getInstanceProperties().get(i);
      Setting setting=getOldValueForChangedDataObject(dataObject,nextProp);
      if (setting != null) {
        oldSettingsList.add(setting);
      }
    }
    List openProps=(List)getUnsetOCPropertiesMap().get(dataObject);
    if (openProps != null) {
      for (int i=0; i < openProps.size(); i++) {
        SDOProperty nextProp=(SDOProperty)openProps.get(i);
        Setting setting=getOldValueForChangedDataObject(dataObject,nextProp);
        if (setting != null) {
          oldSettingsList.add(setting);
        }
      }
    }
    return oldSettingsList;
  }
  return new ArrayList();
}

Fixed version (ground truth):
/** 
 * Returns a list of   {@link ChangeSummary.Setting settings}that represent the property values of the given <code>dataObject</code> at the point when logging   {@link #beginLogging() began}. <p>In the case of a   {@link #isDeleted(DataObject) deleted} object,the List will include settings for all the Properties. <p> An old value setting indicates the value at the point logging begins.  A setting is only produced for {@link #isModified modified} objects ifeither the old value differs from the current value or if the isSet differs from the current value. <p> No settings are produced for  {@link #isCreated created} objects.
 * @param dataObject the object in question.
 * @return a list of settings.
 * @see #getChangedDataObjects
 */
public List getOldValues(DataObject dataObject){
  if ((dataObject == null) || (!isDeleted(dataObject) && ((((SDODataObject)dataObject).getChangeSummary() != null) && (((SDODataObject)dataObject).getChangeSummary() != this)))) {
    return new ArrayList();
  }
  if (!isCreated(dataObject) && isDirty(dataObject)) {
    List oldSettingsList=new ArrayList();
    for (int i=0; i < dataObject.getInstanceProperties().size(); i++) {
      SDOProperty nextProp=(SDOProperty)dataObject.getInstanceProperties().get(i);
      Setting setting=getOldValueForChangedDataObject(dataObject,nextProp);
      if (setting != null) {
        oldSettingsList.add(setting);
      }
    }
    List openProps=(List)getUnsetOCPropertiesMap().get(dataObject);
    if (openProps != null) {
      for (int i=0; i < openProps.size(); i++) {
        SDOProperty nextProp=(SDOProperty)openProps.get(i);
        Setting setting=getOldValueForChangedDataObject(dataObject,nextProp);
        if (setting != null) {
          oldSettingsList.add(setting);
        }
      }
    }
    return oldSettingsList;
  }
  return new ArrayList();
}