Program: 95503
Project: 95503
Buggy source:
/** 
 * Creates the instance of the persistent object which is defined by the DTO element used as parameter. The method generates all dependent objects as well.
 * @param dto Abstraction of the DTO element
 * @param assignNewGuid <code>true</code> if the test suitehould be assigned a new GUID. Otherwise <code>false</code>.
 * @return a persistent object generated from the information in the DTOelement
 * @throws InvalidDataException if some data is invalid when constructingan object. This should not happen for exported project, but may happen when someone generates DTO project description outside of GUIdancer.
 */
private IExecPersistable createTestJob(TestJobDTO dto,boolean assignNewGuid) throws InvalidDataException {
  ITestJobPO tj;
  if (dto.getUuid() != null && !assignNewGuid) {
    tj=NodeMaker.createTestJobPO(dto.getName(),dto.getUuid());
  }
 else {
    tj=NodeMaker.createTestJobPO(dto.getName());
  }
  tj.setComment(dto.getComment());
  tj.setDescription(dto.getDescription());
  tj.setTaskId(dto.getTaskId());
  fillTrackedChangesInformation(tj,dto);
  for (  RefTestSuiteDTO dtoRts : dto.getRefTestSuites()) {
    IRefTestSuitePO rts;
    if (assignNewGuid) {
      String testSuiteGuid=m_oldToNewGuids.get(dtoRts.getTsUuid());
      if (testSuiteGuid == null) {
        throw new InvalidDataException("String_Node_Str" + dtoRts.getTsUuid(),MessageIDs.E_IMPORT_PROJECT_XML_FAILED);
      }
      rts=NodeMaker.createRefTestSuitePO(dtoRts.getName(),testSuiteGuid,dtoRts.getAutId());
    }
 else {
      rts=NodeMaker.createRefTestSuitePO(dtoRts.getName(),dtoRts.getUuid(),dtoRts.getTsUuid(),dtoRts.getAutId());
    }
    rts.setComment(dtoRts.getComment());
    rts.setDescription(dtoRts.getDescription());
    tj.addNode(rts);
  }
  return tj;
}

Fixed version (ground truth):
/** 
 * Creates the instance of the persistent object which is defined by the DTO element used as parameter. The method generates all dependent objects as well.
 * @param dto Abstraction of the DTO element
 * @param assignNewGuid <code>true</code> if the test suitehould be assigned a new GUID. Otherwise <code>false</code>.
 * @return a persistent object generated from the information in the DTOelement
 * @throws InvalidDataException if some data is invalid when constructingan object. This should not happen for exported project, but may happen when someone generates DTO project description outside of GUIdancer.
 */
private IExecPersistable createTestJob(TestJobDTO dto,boolean assignNewGuid) throws InvalidDataException {
  ITestJobPO tj;
  if (dto.getUuid() != null && !assignNewGuid) {
    tj=NodeMaker.createTestJobPO(dto.getName(),dto.getUuid());
  }
 else {
    tj=NodeMaker.createTestJobPO(dto.getName());
  }
  tj.setComment(dto.getComment());
  tj.setDescription(dto.getDescription());
  tj.setTaskId(dto.getTaskId());
  fillTrackedChangesInformation(tj,dto);
  for (  NodeDTO dtoRefs : dto.getRefTestSuites()) {
    if (dtoRefs instanceof RefTestSuiteDTO) {
      RefTestSuiteDTO dtoRts=(RefTestSuiteDTO)dtoRefs;
      IRefTestSuitePO rts;
      if (assignNewGuid) {
        String testSuiteGuid=m_oldToNewGuids.get(dtoRts.getTsUuid());
        if (testSuiteGuid == null) {
          throw new InvalidDataException("String_Node_Str" + dtoRts.getTsUuid(),MessageIDs.E_IMPORT_PROJECT_XML_FAILED);
        }
        rts=NodeMaker.createRefTestSuitePO(dtoRts.getName(),testSuiteGuid,dtoRts.getAutId());
      }
 else {
        rts=NodeMaker.createRefTestSuitePO(dtoRts.getName(),dtoRts.getUuid(),dtoRts.getTsUuid(),dtoRts.getAutId());
      }
      rts.setComment(dtoRts.getComment());
      rts.setDescription(dtoRts.getDescription());
      tj.addNode(rts);
    }
 else     if (dtoRefs instanceof CommentDTO) {
      tj.addNode(createComment((CommentDTO)dtoRefs,assignNewGuid));
    }
  }
  return tj;
}