Program: 68702
Project: 68702
Buggy source:
/** 
 * Create a shallow copy of the DataObject dataObject: Creates a new DataObject copiedDataObject with the same values as the source dataObject for each property where property.getType().isDataType() is true. The value of such a Property property in copiedDataObject is: dataObject.get(property) for single-valued Properties (copiedDataObject.get(property) equals() dataObject.get(property)), or a List where each member is equal to the member at the same index in dataObject for multi-valued Properties copiedDataObject.getList(property).get(i) equals() dataObject.getList(property).get(i) The copied Object is unset for each Property where property.getType().isDataType() is false since they are not copied. Read-only properties are copied. A copied object shares metadata with the source object sourceDO.getType() == copiedDO.getType() If a ChangeSummary is part of the source DataObject the copy has a new, empty ChangeSummary. Logging state is the same as the source ChangeSummary.
 * @param dataObject to be copied
 * @return copy of dataObject
 */
public DataObject copyShallow(DataObject dataObject){
  if (null == dataObject) {
    return null;
  }
  SDODataObject copy=(SDODataObject)getHelperContext().getDataFactory().create(dataObject.getType().getURI(),dataObject.getType().getName());
  List ocListOriginal=((SDODataObject)dataObject)._getOpenContentProperties();
  for (Iterator anOCIterator=ocListOriginal.iterator(); anOCIterator.hasNext(); ) {
    copy.addOpenContentProperty((Property)anOCIterator.next());
  }
  List ocAttrsListOriginal=((SDODataObject)dataObject)._getOpenContentPropertiesAttributes();
  for (Iterator anOCAttrIterator=ocAttrsListOriginal.iterator(); anOCAttrIterator.hasNext(); ) {
    copy.addOpenContentProperty((Property)anOCAttrIterator.next());
  }
  List allProperties=copy.getInstanceProperties();
  Iterator iterProperties=allProperties.iterator();
  while (iterProperties.hasNext()) {
    Property eachProperty=(Property)iterProperties.next();
    if (dataObject.isSet(eachProperty)) {
      Object o=getValue((SDODataObject)dataObject,eachProperty,null);
      if (eachProperty.getType().isDataType()) {
        if (eachProperty.getType() != SDOConstants.SDO_CHANGESUMMARY) {
          copy.set(eachProperty,o,false);
        }
      }
    }
  }
  if (dataObject.getType().isSequenced()) {
    List settings=((SDOSequence)dataObject.getSequence()).getSettings();
    for (int index=0, size=dataObject.getSequence().size(); index < size; index++) {
      Setting nextSetting=(Setting)settings.get(index);
      Property prop=dataObject.getSequence().getProperty(index);
      if (prop == null || prop.getType().isDataType()) {
        Setting copySetting=nextSetting.copy(copy);
        ((SDOSequence)copy.getSequence()).getSettings().add(copySetting);
        ((SDOSequence)copy.getSequence()).addValueToSettings(copySetting);
      }
    }
  }
  if ((copy != null) && (copy.getChangeSummary() != null) && (((SDOType)copy.getType()).getChangeSummaryProperty() != null)) {
    if (((SDODataObject)dataObject).getChangeSummary().isLogging()) {
      ((SDOChangeSummary)copy.getChangeSummary()).setLogging(true);
    }
  }
  return copy;
}

Fixed version (ground truth):
/** 
 * Create a shallow copy of the DataObject dataObject: Creates a new DataObject copiedDataObject with the same values as the source dataObject for each property where property.getType().isDataType() is true. The value of such a Property property in copiedDataObject is: dataObject.get(property) for single-valued Properties (copiedDataObject.get(property) equals() dataObject.get(property)), or a List where each member is equal to the member at the same index in dataObject for multi-valued Properties copiedDataObject.getList(property).get(i) equals() dataObject.getList(property).get(i) The copied Object is unset for each Property where property.getType().isDataType() is false since they are not copied. Read-only properties are copied. A copied object shares metadata with the source object sourceDO.getType() == copiedDO.getType() If a ChangeSummary is part of the source DataObject the copy has a new, empty ChangeSummary. Logging state is the same as the source ChangeSummary.
 * @param dataObject to be copied
 * @return copy of dataObject
 */
public DataObject copyShallow(DataObject dataObject){
  if (null == dataObject) {
    return null;
  }
  SDODataObject copy=(SDODataObject)getHelperContext().getDataFactory().create(dataObject.getType().getURI(),dataObject.getType().getName());
  List ocListOriginal=((SDODataObject)dataObject)._getOpenContentProperties();
  for (Iterator anOCIterator=ocListOriginal.iterator(); anOCIterator.hasNext(); ) {
    copy.addOpenContentProperty((Property)anOCIterator.next());
  }
  List ocAttrsListOriginal=((SDODataObject)dataObject)._getOpenContentPropertiesAttributes();
  for (Iterator anOCAttrIterator=ocAttrsListOriginal.iterator(); anOCAttrIterator.hasNext(); ) {
    copy.addOpenContentProperty((Property)anOCAttrIterator.next());
  }
  List allProperties=copy.getInstanceProperties();
  Iterator iterProperties=allProperties.iterator();
  while (iterProperties.hasNext()) {
    Property eachProperty=(Property)iterProperties.next();
    if (dataObject.isSet(eachProperty)) {
      Object o=getValue((SDODataObject)dataObject,eachProperty,null);
      if (eachProperty.getType().isDataType()) {
        if (eachProperty.getType() != SDOConstants.SDO_CHANGESUMMARY) {
          copy.setInternal(eachProperty,o,false);
        }
      }
    }
  }
  if (dataObject.getType().isSequenced()) {
    List settings=((SDOSequence)dataObject.getSequence()).getSettings();
    for (int index=0, size=dataObject.getSequence().size(); index < size; index++) {
      Setting nextSetting=(Setting)settings.get(index);
      Property prop=dataObject.getSequence().getProperty(index);
      if (prop == null || prop.getType().isDataType()) {
        Setting copySetting=nextSetting.copy(copy);
        ((SDOSequence)copy.getSequence()).getSettings().add(copySetting);
        ((SDOSequence)copy.getSequence()).addValueToSettings(copySetting);
      }
    }
  }
  if ((copy != null) && (copy.getChangeSummary() != null) && (((SDOType)copy.getType()).getChangeSummaryProperty() != null)) {
    if (((SDODataObject)dataObject).getChangeSummary().isLogging()) {
      ((SDOChangeSummary)copy.getChangeSummary()).setLogging(true);
    }
  }
  return copy;
}