Program: 68250
Project: 68250
Buggy source:
/** 
 * Returns the value of the   {@link DataObject#getSequence sequence} for the data objectat the point when logging  {@link #beginLogging() began}.
 * @param dataObject the object in question.
 * @return the old containment property.
 */
public Sequence getOldSequence(DataObject dataObject){
  if (!isLogging() || (dataObject == null) || (!isDeleted(dataObject) && ((dataObject.getChangeSummary() != null) && (dataObject.getChangeSummary() != this)))) {
    return null;
  }
  if (!isCreated(dataObject) && dataObject.getType().isSequenced()) {
    if (getOldSequences().containsKey(dataObject)) {
      return (Sequence)getOldSequences().get(dataObject);
    }
    SDOSequence originalSeq=(SDOSequence)getOriginalSequences().get(dataObject);
    if (originalSeq == null) {
      originalSeq=(SDOSequence)dataObject.getSequence();
    }
    SDOSequence seqWithDeepCopies=new SDOSequence((SDODataObject)dataObject);
    for (int i=0; i < originalSeq.size(); i++) {
      Object nextOriginalSettingValue=originalSeq.getValue(i);
      if (nextOriginalSettingValue == null) {
        continue;
      }
      Property nextOriginalSettingProp=originalSeq.getProperty(i);
      if (nextOriginalSettingProp == null) {
        seqWithDeepCopies.addText(nextOriginalSettingValue.toString());
      }
 else       if (nextOriginalSettingProp.getType().isDataType()) {
        seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp,nextOriginalSettingValue,false);
      }
 else {
        seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp,getOrCreateDeepCopy((DataObject)nextOriginalSettingValue),false);
      }
    }
    getOldSequences().put(dataObject,seqWithDeepCopies);
    return seqWithDeepCopies;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the value of the   {@link DataObject#getSequence sequence} for the data objectat the point when logging  {@link #beginLogging() began}.
 * @param dataObject the object in question.
 * @return the old containment property.
 */
public Sequence getOldSequence(DataObject dataObject){
  if ((dataObject == null) || (!isDeleted(dataObject) && ((dataObject.getChangeSummary() != null) && (dataObject.getChangeSummary() != this)))) {
    return null;
  }
  if (!isCreated(dataObject) && dataObject.getType().isSequenced()) {
    if (getOldSequences().containsKey(dataObject)) {
      return (Sequence)getOldSequences().get(dataObject);
    }
    SDOSequence originalSeq=(SDOSequence)getOriginalSequences().get(dataObject);
    if (originalSeq == null) {
      originalSeq=(SDOSequence)dataObject.getSequence();
    }
    SDOSequence seqWithDeepCopies=new SDOSequence((SDODataObject)dataObject);
    for (int i=0; i < originalSeq.size(); i++) {
      Object nextOriginalSettingValue=originalSeq.getValue(i);
      if (nextOriginalSettingValue == null) {
        continue;
      }
      Property nextOriginalSettingProp=originalSeq.getProperty(i);
      if (nextOriginalSettingProp == null) {
        seqWithDeepCopies.addText(nextOriginalSettingValue.toString());
      }
 else       if (nextOriginalSettingProp.getType().isDataType()) {
        seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp,nextOriginalSettingValue,false);
      }
 else {
        seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp,getOrCreateDeepCopy((DataObject)nextOriginalSettingValue),false);
      }
    }
    getOldSequences().put(dataObject,seqWithDeepCopies);
    return seqWithDeepCopies;
  }
  return null;
}