Program: 67093
Project: 67093
Buggy source:
/** 
 * INTERNAL: This function reverses any operations that were performed on this object since change tracking was turned on.  The object is returned to the state when logging was first started.<br/>
 * @param isCSRoot
 * @param cs
 * @param origContainer
 * @param origContainmentPropName
 */
public void undoChanges(boolean isCSRoot,ChangeSummary cs,SDODataObject origContainer,String origContainmentPropName){
  if (null == cs) {
    return;
  }
  if (((SDOChangeSummary)cs).isDirty(this)) {
    if (!isCSRoot) {
      if (null == changeSummary) {
        changeSummary=(SDOChangeSummary)cs;
      }
      if (null == container) {
        _setContainer(origContainer);
      }
      if (null == containmentPropertyName) {
        _setContainmentPropertyName(origContainmentPropName);
      }
    }
    _setCurrentValueStore((ValueStore)((SDOChangeSummary)cs).getOriginalValueStores().get(this));
    ((SDOChangeSummary)cs).getOriginalValueStores().remove(this);
  }
  if (getType().isSequenced()) {
    if (((SDOChangeSummary)cs).isDirty((SDOSequence)sequence)) {
      Sequence currentSequence=sequence;
      SDOSequence originalSequence=(SDOSequence)((SDOChangeSummary)cs).getOriginalSequences().get(this);
      if ((null == originalSequence) && (null != currentSequence)) {
        throw SDOException.oldSequenceNotFound();
      }
 else {
        sequence=originalSequence;
      }
      ((SDOChangeSummary)cs).getOldSequences().remove(this);
      ((SDOChangeSummary)cs).getOriginalSequences().remove(this);
    }
  }
  List oldUnsetOCList=((SDOChangeSummary)cs).getUnsetOCProperties(this);
  for (int i=0, size=oldUnsetOCList.size(); i < size; i++) {
    addOpenContentProperty((Property)oldUnsetOCList.get(0));
  }
  for (Iterator iterProperties=getInstanceProperties().iterator(); iterProperties.hasNext(); ) {
    SDOProperty property=(SDOProperty)iterProperties.next();
    if (!property.getType().isChangeSummaryType()) {
      Object value=get(property);
      if ((null == value) && (null != getChangeSummary())) {
      }
 else {
        if (property.isMany()) {
          if (null != value) {
            ((ListWrapper)value).undoChanges((SDOChangeSummary)getChangeSummary());
            if (!property.getType().isDataType()) {
              for (Iterator iterMany=((List)value).iterator(); iterMany.hasNext(); ) {
                Object valueMany=iterMany.next();
                if (null != valueMany) {
                  ((SDODataObject)valueMany).undoChanges(false,changeSummary,this,property.getName());
                }
              }
            }
          }
        }
 else {
          if (!property.getType().isDataType() && (null != value)) {
            ((SDODataObject)value).undoChanges(false,changeSummary,this,property.getName());
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: This function reverses any operations that were performed on this object since change tracking was turned on.  The object is returned to the state when logging was first started.<br/>
 * @param isCSRoot
 * @param cs
 * @param origContainer
 * @param origContainmentPropName
 */
public void undoChanges(boolean isCSRoot,ChangeSummary cs,SDODataObject origContainer,String origContainmentPropName){
  if (null == cs) {
    return;
  }
  if (((SDOChangeSummary)cs).isDirty(this)) {
    if (!isCSRoot) {
      if (null == changeSummary) {
        changeSummary=(SDOChangeSummary)cs;
      }
      if (null == container) {
        _setContainer(origContainer);
      }
      if (null == containmentPropertyName) {
        _setContainmentPropertyName(origContainmentPropName);
      }
    }
    _setCurrentValueStore((ValueStore)((SDOChangeSummary)cs).getOriginalValueStores().get(this));
    ((SDOChangeSummary)cs).getOriginalValueStores().remove(this);
  }
  if (getType().isSequenced()) {
    if (((SDOChangeSummary)cs).isDirty(sequence)) {
      Sequence currentSequence=sequence;
      SDOSequence originalSequence=(SDOSequence)((SDOChangeSummary)cs).getOriginalSequences().get(this);
      if ((null == originalSequence) && (null != currentSequence)) {
        throw SDOException.oldSequenceNotFound();
      }
 else {
        sequence=originalSequence;
      }
      ((SDOChangeSummary)cs).getOldSequences().remove(this);
      ((SDOChangeSummary)cs).getOriginalSequences().remove(this);
    }
  }
  List oldUnsetOCList=((SDOChangeSummary)cs).getUnsetOCProperties(this);
  for (int i=0, size=oldUnsetOCList.size(); i < size; i++) {
    addOpenContentProperty((Property)oldUnsetOCList.get(0));
  }
  for (Iterator iterProperties=getInstanceProperties().iterator(); iterProperties.hasNext(); ) {
    SDOProperty property=(SDOProperty)iterProperties.next();
    if (!property.getType().isChangeSummaryType()) {
      Object value=get(property);
      if ((null == value) && (null != getChangeSummary())) {
      }
 else {
        if (property.isMany()) {
          if (null != value) {
            ((ListWrapper)value).undoChanges(getChangeSummary());
            if (!property.getType().isDataType()) {
              for (Iterator iterMany=((List)value).iterator(); iterMany.hasNext(); ) {
                Object valueMany=iterMany.next();
                if (null != valueMany) {
                  ((SDODataObject)valueMany).undoChanges(false,changeSummary,this,property.getName());
                }
              }
            }
          }
        }
 else {
          if (!property.getType().isDataType() && (null != value)) {
            ((SDODataObject)value).undoChanges(false,changeSummary,this,property.getName());
          }
        }
      }
    }
  }
}