Program: 95642
Project: 95642
Buggy source:
/** 
 * Creates the instance of the persistent object which is defined by the XML element used as parameter. The method generates all dependent objects as well.
 * @param owner The ParamNode which holds this TDManager
 * @param xml Abstraction of the XML element (see Apache XML Beans)the test data, otherwise a new TDManager is created.
 * @return a persistent object generated from the information in the XMLelement
 * @param assignNewGuids <code>true</code> if the parameters were givennew unique IDs. Otherwise <code>false</code>.
 */
private ITDManager createTDManager(IParameterInterfacePO owner,TestData xml,boolean assignNewGuids){
  List<String> uniqueIds=new ArrayList<String>(xml.getUniqueIdsList());
  final ITDManager tdman;
  if (assignNewGuids) {
    List<String> newUniqueIds=new ArrayList<String>();
    for (    String id : uniqueIds) {
      if (Pattern.matches("String_Node_Str" + GUID_LENGTH + "String_Node_Str",id) && m_oldToNewGuids.containsKey(id)) {
        newUniqueIds.add(m_oldToNewGuids.get(id));
      }
 else {
        newUniqueIds.add(id);
      }
    }
    uniqueIds=newUniqueIds;
  }
  if (uniqueIds.isEmpty()) {
    tdman=PoMaker.createTDManagerPO(owner);
  }
 else {
    tdman=PoMaker.createTDManagerPO(owner,uniqueIds);
  }
  for (  TestDataRow rowXml : xml.getRowList()) {
    final List<String> td=new ArrayList<String>(rowXml.sizeOfDataArray());
    for (    TestDataCell cellXml : rowXml.getDataList()) {
      td.add(readData(cellXml,owner));
    }
    tdman.insertDataSet(PoMaker.createListWrapperPO(td),tdman.getDataSetCount());
  }
  return tdman;
}

Fixed version (ground truth):
/** 
 * Creates the instance of the persistent object which is defined by the XML element used as parameter. The method generates all dependent objects as well.
 * @param owner The ParamNode which holds this TDManager
 * @param xml Abstraction of the XML element (see Apache XML Beans)the test data, otherwise a new TDManager is created.
 * @return a persistent object generated from the information in the XMLelement
 * @param assignNewGuids <code>true</code> if the parameters were givennew unique IDs. Otherwise <code>false</code>.
 */
private ITDManager createTDManager(IParameterInterfacePO owner,TestData xml,boolean assignNewGuids){
  List<String> uniqueIds=new ArrayList<String>(xml.getUniqueIdsList());
  final ITDManager tdman;
  if (assignNewGuids) {
    List<String> newUniqueIds=new ArrayList<String>();
    for (    String id : uniqueIds) {
      if (Pattern.matches("String_Node_Str" + ImportExportUtil.UUID_LENGTH + "String_Node_Str",id) && m_oldToNewGuids.containsKey(id)) {
        newUniqueIds.add(m_oldToNewGuids.get(id));
      }
 else {
        newUniqueIds.add(id);
      }
    }
    uniqueIds=newUniqueIds;
  }
  if (uniqueIds.isEmpty()) {
    tdman=PoMaker.createTDManagerPO(owner);
  }
 else {
    tdman=PoMaker.createTDManagerPO(owner,uniqueIds);
  }
  for (  TestDataRow rowXml : xml.getRowList()) {
    final List<String> td=new ArrayList<String>(rowXml.sizeOfDataArray());
    for (    TestDataCell cellXml : rowXml.getDataList()) {
      td.add(readData(cellXml,owner));
    }
    tdman.insertDataSet(PoMaker.createListWrapperPO(td),tdman.getDataSetCount());
  }
  return tdman;
}