Program: 24715
Project: 24715
Buggy source:
@AllowedRoles(roles={Roles.Administrator}) public GwtProject createProject(GwtProject newProject) throws SquareException {
  User acquisitionOrganizationEngineer=userDao.fetch(newProject.getAcquisitionOrganizationEngineer().getUserId());
  Project project=new Project(newProject);
  project.setAcquisitionOrganizationEngineer(acquisitionOrganizationEngineer);
  AsquareCase acase=asquareCaseDao.fetch(newProject.getCases().getId());
  project.setCases(acase);
  projectDao.create(project);
  newProject.setId(project.getId());
  if (newProject.getCases().getId() == 3) {
    QualityAttribute qa=new QualityAttribute();
    qa.setName("String_Node_Str");
    qa.setDescription("String_Node_Str");
    qualityAttributeDao.create(qa);
    ProjectPackageAttributeRating ppar=new ProjectPackageAttributeRating();
    ProjectPackageAttributeRatingId pparid=new ProjectPackageAttributeRatingId();
    pparid.setAttributeId(qa.getId());
    pparid.setPackageId(1);
    pparid.setProjectId(project.getId());
    ppar.setId(pparid);
    ppar.setProject(project);
    ppar.setSoftwarePackage(softwarePackageDao.fetch(1));
    ppar.setQualityAttribute(qa);
    ppar.setRating(0);
    projectPackageAttributeRatingDao.create(ppar);
  }
  stepBusiness.createStepsForProject(newProject);
  GwtRole role=new GwtRole();
  role.setName(ProjectRole.Acquisition_Organization_Engineer.getLabel());
  this.addUserToProject(newProject,acquisitionOrganizationEngineer.createGwtUser(),role);
  return newProject;
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator}) public GwtProject createProject(GwtProject newProject) throws SquareException {
  User acquisitionOrganizationEngineer=userDao.fetch(newProject.getAcquisitionOrganizationEngineer().getUserId());
  Project project=new Project(newProject);
  project.setAcquisitionOrganizationEngineer(acquisitionOrganizationEngineer);
  AsquareCase acase=asquareCaseDao.fetch(newProject.getCases().getId());
  project.setCases(acase);
  projectDao.create(project);
  newProject.setId(project.getId());
  if (newProject.getCases().getId() == 3) {
    QualityAttribute qa=new QualityAttribute();
    qa.setName("String_Node_Str");
    qa.setDescription("String_Node_Str");
    qualityAttributeDao.create(qa);
    ProjectPackageAttributeRating ppar=new ProjectPackageAttributeRating();
    ProjectPackageAttributeRatingId pparid=new ProjectPackageAttributeRatingId();
    pparid.setAttributeId(qa.getId());
    pparid.setPackageId(1);
    pparid.setProjectId(project.getId());
    ppar.setId(pparid);
    ppar.setProject(project);
    ppar.setSoftwarePackage(softwarePackageDao.fetch(1));
    ppar.setQualityAttribute(qa);
    ppar.setRating(0);
    projectPackageAttributeRatingDao.create(ppar);
    ProjectPackageTradeoffreasonId id=new ProjectPackageTradeoffreasonId(project.getId(),1);
    ProjectPackageTradeoffreason tradeoffReason=new ProjectPackageTradeoffreason(id,project,softwarePackageDao.fetch(1),"String_Node_Str",1);
    tradeoffReasonDao.create(tradeoffReason);
  }
  stepBusiness.createStepsForProject(newProject);
  GwtRole role=new GwtRole();
  role.setName(ProjectRole.Acquisition_Organization_Engineer.getLabel());
  this.addUserToProject(newProject,acquisitionOrganizationEngineer.createGwtUser(),role);
  return newProject;
}