nus-yam/ex-repair huggingface dataset:
Program: 85973
Project: 85973
Buggy source:
private void addProductInstanceDataToZip(ZipOutputStream zs,ConfigurationItemKey configurationItemKey,String serialNumber) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, ProductInstanceMasterNotFoundException, IOException, StorageException {
  ProductInstanceMaster productInstanceMaster=productInstanceService.getProductInstanceMaster(new ProductInstanceMasterKey(serialNumber,configurationItemKey));
  ProductInstanceIteration lastIteration=productInstanceMaster.getLastIteration();
  for (  BinaryResource attachedFile : lastIteration.getAttachedFiles()) {
    addToZipFile(attachedFile,"String_Node_Str",zs);
  }
  for (  DocumentLink docLink : lastIteration.getLinkedDocuments()) {
    for (    BinaryResource linkedFile : docLink.getTargetDocument().getLastIteration().getAttachedFiles()) {
      addToZipFile(linkedFile,"String_Node_Str" + docLink.getTargetDocument().getLastIteration().toString(),zs);
    }
  }
}

Fixed version (ground truth):
private void addProductInstanceDataToZip(ZipOutputStream zs,ConfigurationItemKey configurationItemKey,String serialNumber,List<String> baselinedSourcesName) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, ProductInstanceMasterNotFoundException, IOException, StorageException {
  ProductInstanceMaster productInstanceMaster=productInstanceService.getProductInstanceMaster(new ProductInstanceMasterKey(serialNumber,configurationItemKey));
  ProductInstanceIteration lastIteration=productInstanceMaster.getLastIteration();
  for (  BinaryResource attachedFile : lastIteration.getAttachedFiles()) {
    addToZipFile(attachedFile,"String_Node_Str",zs);
  }
  for (  DocumentLink docLink : lastIteration.getLinkedDocuments()) {
    for (    BinaryResource linkedFile : docLink.getTargetDocument().getLastIteration().getAttachedFiles()) {
      String folderName=docLink.getTargetDocument().getLastIteration().toString();
      if (!baselinedSourcesName.contains(folderName)) {
        addToZipFile(linkedFile,"String_Node_Str" + folderName,zs);
      }
    }
  }
}
Program: 85974
Project: 85974
Buggy source:
private void addProductInstanceDataToZip(ZipOutputStream zs,ConfigurationItemKey configurationItemKey,String serialNumber) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, ProductInstanceMasterNotFoundException, IOException, StorageException {
  ProductInstanceMaster productInstanceMaster=productInstanceService.getProductInstanceMaster(new ProductInstanceMasterKey(serialNumber,configurationItemKey));
  ProductInstanceIteration lastIteration=productInstanceMaster.getLastIteration();
  Set<BinaryResource> attachedFiles=lastIteration.getAttachedFiles();
  for (  Map.Entry<BaselinedDocumentKey,BaselinedDocument> doc : lastIteration.getBaselinedDocuments().entrySet()) {
    for (    BinaryResource binaryResource : doc.getValue().getTargetDocument().getAttachedFiles()) {
      attachedFiles.add(binaryResource);
    }
  }
  for (  BinaryResource attachedFile : attachedFiles) {
    addToZipFile(attachedFile,productInstanceMaster.getSerialNumber(),zs);
  }
}

Fixed version (ground truth):
private void addProductInstanceDataToZip(ZipOutputStream zs,ConfigurationItemKey configurationItemKey,String serialNumber) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, ProductInstanceMasterNotFoundException, IOException, StorageException {
  ProductInstanceMaster productInstanceMaster=productInstanceService.getProductInstanceMaster(new ProductInstanceMasterKey(serialNumber,configurationItemKey));
  ProductInstanceIteration lastIteration=productInstanceMaster.getLastIteration();
  Set<BinaryResource> attachedFiles=lastIteration.getAttachedFiles();
  for (  BinaryResource attachedFile : attachedFiles) {
    addToZipFile(attachedFile,productInstanceMaster.getSerialNumber(),zs);
  }
}
Program: 85977
Project: 85977
Buggy source:
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public ComponentDTO filterProductStructure(@PathParam("String_Node_Str") String workspaceId,@PathParam("String_Node_Str") String ciId,@QueryParam("String_Node_Str") String configSpecType,@QueryParam("String_Node_Str") String path,@QueryParam("String_Node_Str") Integer depth,@QueryParam("String_Node_Str") String linkType) throws EntityNotFoundException, UserNotActiveException, AccessRightException, NotAllowedException, EntityConstraintException {
  ConfigurationItemKey ciKey=new ConfigurationItemKey(workspaceId,ciId);
  PSFilter filter=productService.getPSFilter(ciKey,configSpecType);
  Component component;
  String serialNumber=null;
  if (configSpecType.startsWith("String_Node_Str")) {
    serialNumber=configSpecType.substring(3);
  }
  if (linkType == null) {
    List<PartLink> decodedPath=productService.decodePath(ciKey,path);
    component=productService.filterProductStructure(ciKey,filter,decodedPath,depth);
  }
 else {
    component=productService.filterProductStructureOnLinkType(ciKey,filter,serialNumber,path,linkType);
  }
  if (component == null) {
    throw new IllegalArgumentException();
  }
  return createComponentDTO(component,workspaceId,ciId,serialNumber);
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public ComponentDTO filterProductStructure(@PathParam("String_Node_Str") String workspaceId,@PathParam("String_Node_Str") String ciId,@QueryParam("String_Node_Str") String configSpecType,@DefaultValue("String_Node_Str") @QueryParam("String_Node_Str") String path,@QueryParam("String_Node_Str") Integer depth,@QueryParam("String_Node_Str") String linkType) throws EntityNotFoundException, UserNotActiveException, AccessRightException, NotAllowedException, EntityConstraintException {
  ConfigurationItemKey ciKey=new ConfigurationItemKey(workspaceId,ciId);
  PSFilter filter=productService.getPSFilter(ciKey,configSpecType);
  Component component;
  String serialNumber=null;
  if (configSpecType.startsWith("String_Node_Str")) {
    serialNumber=configSpecType.substring(3);
  }
  if (linkType == null) {
    List<PartLink> decodedPath=productService.decodePath(ciKey,path);
    component=productService.filterProductStructure(ciKey,filter,decodedPath,depth);
  }
 else {
    component=productService.filterProductStructureOnLinkType(ciKey,filter,serialNumber,path,linkType);
  }
  if (component == null) {
    throw new IllegalArgumentException();
  }
  return createComponentDTO(component,workspaceId,ciId,serialNumber);
}
Program: 85980
Project: 85980
Buggy source:
private Predicate getInstanceBooleanAttributePredicate(String field,String operator,String value,String type){
  Root<InstanceBooleanAttribute> iba=cq.from(InstanceBooleanAttribute.class);
  Predicate memberPredicate=iba.in(pi.get("String_Node_Str"));
  return cb.and(cb.equal(iba.get("String_Node_Str"),field),cb.equal(iba.get("String_Node_Str"),Boolean.getBoolean(value)),memberPredicate);
}

Fixed version (ground truth):
private Predicate getInstanceBooleanAttributePredicate(String field,String operator,String value,String type){
  Root<InstanceBooleanAttribute> iba=cq.from(InstanceBooleanAttribute.class);
  Predicate memberPredicate=iba.in(pi.get("String_Node_Str"));
  return cb.and(cb.equal(iba.get("String_Node_Str"),field),cb.equal(iba.get("String_Node_Str"),Boolean.parseBoolean(value)),memberPredicate);
}
Program: 85981
Project: 85981
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response getInstancesByMultiplePath(@Context Request request,@PathParam("String_Node_Str") String workspaceId,@PathParam("String_Node_Str") String ciId,@QueryParam("String_Node_Str") String configSpecType,PathListDTO pathsDTO) throws EntityNotFoundException, UserNotActiveException, AccessRightException, NotAllowedException {
  Response.ResponseBuilder rb=fakeSimilarBehavior(request);
  if (rb != null) {
    return rb.build();
  }
 else {
    CacheControl cc=new CacheControl();
    cc.setMaxAge(60 * 15);
    ConfigurationItemKey ciKey=new ConfigurationItemKey(workspaceId,ciId);
    PSFilter filter=productService.getPSFilter(ciKey,configSpecType);
    List<List<PartLink>> paths=new ArrayList<>();
    for (    String path : pathsDTO.getPaths()) {
      List<PartLink> decodedPath=productService.decodePath(ciKey,path);
      if (decodedPath != null) {
        paths.add(decodedPath);
      }
    }
    InstanceCollection instanceCollection=new InstanceCollection(ciKey,filter,paths);
    return Response.ok().lastModified(new Date()).cacheControl(cc).entity(instanceCollection).build();
  }
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response getInstancesByMultiplePath(@Context Request request,@PathParam("String_Node_Str") String workspaceId,@PathParam("String_Node_Str") String ciId,PathListDTO pathsDTO) throws EntityNotFoundException, UserNotActiveException, AccessRightException, NotAllowedException {
  Response.ResponseBuilder rb=fakeSimilarBehavior(request);
  if (rb != null) {
    return rb.build();
  }
 else {
    CacheControl cc=new CacheControl();
    cc.setMaxAge(60 * 15);
    ConfigurationItemKey ciKey=new ConfigurationItemKey(workspaceId,ciId);
    PSFilter filter=productService.getPSFilter(ciKey,pathsDTO.getConfigSpec());
    List<List<PartLink>> paths=new ArrayList<>();
    for (    String path : pathsDTO.getPaths()) {
      List<PartLink> decodedPath=productService.decodePath(ciKey,path);
      if (decodedPath != null) {
        paths.add(decodedPath);
      }
    }
    InstanceCollection instanceCollection=new InstanceCollection(ciKey,filter,paths);
    return Response.ok().lastModified(new Date()).cacheControl(cc).entity(instanceCollection).build();
  }
}
Program: 85982
Project: 85982
Buggy source:
public int getIndexValue(){
  return indexValue;
}

Fixed version (ground truth):
@XmlTransient public int getIndexValue(){
  return indexValue;
}
Program: 85983
Project: 85983
Buggy source:
public List<ModificationNotification> getModificationNotifications(PartIteration pPart){
  List<ModificationNotification> notifications=em.createNamedQuery("String_Node_Str",ModificationNotification.class).setParameter("String_Node_Str",pPart).getResultList();
  return notifications;
}

Fixed version (ground truth):
public List<ModificationNotification> getModificationNotifications(PartIterationKey pPartIPK){
  List<ModificationNotification> notifications=em.createNamedQuery("String_Node_Str",ModificationNotification.class).setParameter("String_Node_Str",pPartIPK.getWorkspaceId()).setParameter("String_Node_Str",pPartIPK.getPartMasterNumber()).setParameter("String_Node_Str",pPartIPK.getPartRevisionVersion()).setParameter("String_Node_Str",pPartIPK.getIteration()).getResultList();
  return notifications;
}
Program: 85984
Project: 85984
Buggy source:
private void updateACLForChangeItem(String pWorkspaceId,ChangeItem changeItem,Map<String,String> pUserEntries,Map<String,String> pGroupEntries){
  ACLFactory aclFactory=new ACLFactory(em);
  if (changeItem.getACL() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,pUserEntries,pGroupEntries);
    changeItem.setACL(acl);
  }
 else {
    aclFactory.updateACL(changeItem.getACL(),pUserEntries,pGroupEntries);
  }
}

Fixed version (ground truth):
private void updateACLForChangeItem(String pWorkspaceId,ChangeItem changeItem,Map<String,String> pUserEntries,Map<String,String> pGroupEntries){
  ACLFactory aclFactory=new ACLFactory(em);
  if (changeItem.getACL() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,pUserEntries,pGroupEntries);
    changeItem.setACL(acl);
  }
 else {
    aclFactory.updateACL(pWorkspaceId,changeItem.getACL(),pUserEntries,pGroupEntries);
  }
}
Program: 85985
Project: 85985
Buggy source:
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updateACLForMilestone(String pWorkspaceId,int pId,Map<String,String> pUserEntries,Map<String,String> pGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, MilestoneNotFoundException, AccessRightException {
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  Milestone milestone=new MilestoneDAO(new Locale(user.getLanguage()),em).loadMilestone(pId);
  checkMilestoneWriteAccess(milestone,user);
  ACLFactory aclFactory=new ACLFactory(em);
  if (milestone.getACL() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,pUserEntries,pGroupEntries);
    milestone.setACL(acl);
  }
 else {
    ACL acl=milestone.getACL();
    aclFactory.updateACL(acl,pUserEntries,pGroupEntries);
  }
}

Fixed version (ground truth):
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updateACLForMilestone(String pWorkspaceId,int pId,Map<String,String> pUserEntries,Map<String,String> pGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, MilestoneNotFoundException, AccessRightException {
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  Milestone milestone=new MilestoneDAO(new Locale(user.getLanguage()),em).loadMilestone(pId);
  checkMilestoneWriteAccess(milestone,user);
  ACLFactory aclFactory=new ACLFactory(em);
  if (milestone.getACL() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,pUserEntries,pGroupEntries);
    milestone.setACL(acl);
  }
 else {
    ACL acl=milestone.getACL();
    aclFactory.updateACL(pWorkspaceId,acl,pUserEntries,pGroupEntries);
  }
}
Program: 85986
Project: 85986
Buggy source:
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updateDocumentACL(String pWorkspaceId,DocumentRevisionKey docKey,Map<String,String> pACLUserEntries,Map<String,String> pACLUserGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, DocumentRevisionNotFoundException, AccessRightException, NotAllowedException {
  User user=checkDocumentRevisionWriteAccess(docKey);
  Locale userLocale=new Locale(user.getLanguage());
  ACLFactory aclFactory=new ACLFactory(em);
  DocumentRevisionDAO documentRevisionDAO=new DocumentRevisionDAO(userLocale,em);
  DocumentRevision docR=documentRevisionDAO.loadDocR(docKey);
  if (user.isAdministrator() || isAuthor(user,docR)) {
    if (docR.getACL() == null) {
      ACL acl=aclFactory.createACL(pWorkspaceId,pACLUserEntries,pACLUserGroupEntries);
      docR.setACL(acl);
    }
 else {
      aclFactory.updateACL(docR.getACL(),pACLUserEntries,pACLUserGroupEntries);
    }
  }
 else {
    throw new AccessRightException(userLocale,user);
  }
}

Fixed version (ground truth):
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updateDocumentACL(String pWorkspaceId,DocumentRevisionKey docKey,Map<String,String> pACLUserEntries,Map<String,String> pACLUserGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, DocumentRevisionNotFoundException, AccessRightException, NotAllowedException {
  User user=checkDocumentRevisionWriteAccess(docKey);
  Locale userLocale=new Locale(user.getLanguage());
  ACLFactory aclFactory=new ACLFactory(em);
  DocumentRevisionDAO documentRevisionDAO=new DocumentRevisionDAO(userLocale,em);
  DocumentRevision docR=documentRevisionDAO.loadDocR(docKey);
  if (user.isAdministrator() || isAuthor(user,docR)) {
    if (docR.getACL() == null) {
      ACL acl=aclFactory.createACL(pWorkspaceId,pACLUserEntries,pACLUserGroupEntries);
      docR.setACL(acl);
    }
 else {
      aclFactory.updateACL(pWorkspaceId,docR.getACL(),pACLUserEntries,pACLUserGroupEntries);
    }
  }
 else {
    throw new AccessRightException(userLocale,user);
  }
}
Program: 85987
Project: 85987
Buggy source:
@Override public void updateACLForDocumentMasterTemplate(String pWorkspaceId,String pDocMTemplateId,Map<String,String> userEntries,Map<String,String> userGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, DocumentMasterTemplateNotFoundException {
  ACLFactory aclFactory=new ACLFactory(em);
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  Locale locale=new Locale(user.getLanguage());
  DocumentMasterTemplate docTemplate=new DocumentMasterTemplateDAO(locale,em).loadDocMTemplate(new DocumentMasterTemplateKey(user.getWorkspaceId(),pDocMTemplateId));
  checkDocumentTemplateWriteAccess(docTemplate,user);
  if (docTemplate.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,userGroupEntries);
    docTemplate.setAcl(acl);
  }
 else {
    aclFactory.updateACL(docTemplate.getAcl(),userEntries,userGroupEntries);
  }
}

Fixed version (ground truth):
@Override public void updateACLForDocumentMasterTemplate(String pWorkspaceId,String pDocMTemplateId,Map<String,String> userEntries,Map<String,String> userGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, DocumentMasterTemplateNotFoundException {
  ACLFactory aclFactory=new ACLFactory(em);
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  Locale locale=new Locale(user.getLanguage());
  DocumentMasterTemplate docTemplate=new DocumentMasterTemplateDAO(locale,em).loadDocMTemplate(new DocumentMasterTemplateKey(user.getWorkspaceId(),pDocMTemplateId));
  checkDocumentTemplateWriteAccess(docTemplate,user);
  if (docTemplate.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,userGroupEntries);
    docTemplate.setAcl(acl);
  }
 else {
    aclFactory.updateACL(pWorkspaceId,docTemplate.getAcl(),userEntries,userGroupEntries);
  }
}
Program: 85988
Project: 85988
Buggy source:
@Override public void updateACLForPartMasterTemplate(String pWorkspaceId,String templateId,Map<String,String> userEntries,Map<String,String> groupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException, PartMasterTemplateNotFoundException {
  ACLFactory aclFactory=new ACLFactory(em);
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  PartMasterTemplateKey pKey=new PartMasterTemplateKey(pWorkspaceId,templateId);
  PartMasterTemplate partMasterTemplate=new PartMasterTemplateDAO(new Locale(user.getLanguage()),em).loadPartMTemplate(pKey);
  checkPartTemplateWriteAccess(partMasterTemplate,user);
  if (partMasterTemplate.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,groupEntries);
    partMasterTemplate.setAcl(acl);
  }
 else {
    aclFactory.updateACL(partMasterTemplate.getAcl(),userEntries,groupEntries);
  }
}

Fixed version (ground truth):
@Override public void updateACLForPartMasterTemplate(String pWorkspaceId,String templateId,Map<String,String> userEntries,Map<String,String> groupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException, PartMasterTemplateNotFoundException {
  ACLFactory aclFactory=new ACLFactory(em);
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  PartMasterTemplateKey pKey=new PartMasterTemplateKey(pWorkspaceId,templateId);
  PartMasterTemplate partMasterTemplate=new PartMasterTemplateDAO(new Locale(user.getLanguage()),em).loadPartMTemplate(pKey);
  checkPartTemplateWriteAccess(partMasterTemplate,user);
  if (partMasterTemplate.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,groupEntries);
    partMasterTemplate.setAcl(acl);
  }
 else {
    aclFactory.updateACL(pWorkspaceId,partMasterTemplate.getAcl(),userEntries,groupEntries);
  }
}
Program: 85989
Project: 85989
Buggy source:
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updatePartRevisionACL(String workspaceId,PartRevisionKey revisionKey,Map<String,String> pACLUserEntries,Map<String,String> pACLUserGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartRevisionNotFoundException, AccessRightException, DocumentRevisionNotFoundException {
  User user=userManager.checkWorkspaceReadAccess(workspaceId);
  Locale locale=new Locale(user.getLanguage());
  ACLFactory aclFactory=new ACLFactory(em);
  PartRevisionDAO partRevisionDAO=new PartRevisionDAO(locale,em);
  PartRevision partRevision=partRevisionDAO.loadPartR(revisionKey);
  if (isAuthor(user,partRevision) || user.isAdministrator()) {
    if (partRevision.getACL() == null) {
      ACL acl=aclFactory.createACL(workspaceId,pACLUserEntries,pACLUserGroupEntries);
      partRevision.setACL(acl);
    }
 else {
      aclFactory.updateACL(partRevision.getACL(),pACLUserEntries,pACLUserGroupEntries);
    }
  }
 else {
    throw new AccessRightException(locale,user);
  }
}

Fixed version (ground truth):
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public void updatePartRevisionACL(String workspaceId,PartRevisionKey revisionKey,Map<String,String> pACLUserEntries,Map<String,String> pACLUserGroupEntries) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartRevisionNotFoundException, AccessRightException, DocumentRevisionNotFoundException {
  User user=userManager.checkWorkspaceReadAccess(workspaceId);
  Locale locale=new Locale(user.getLanguage());
  ACLFactory aclFactory=new ACLFactory(em);
  PartRevisionDAO partRevisionDAO=new PartRevisionDAO(locale,em);
  PartRevision partRevision=partRevisionDAO.loadPartR(revisionKey);
  if (isAuthor(user,partRevision) || user.isAdministrator()) {
    if (partRevision.getACL() == null) {
      ACL acl=aclFactory.createACL(workspaceId,pACLUserEntries,pACLUserGroupEntries);
      partRevision.setACL(acl);
    }
 else {
      aclFactory.updateACL(workspaceId,partRevision.getACL(),pACLUserEntries,pACLUserGroupEntries);
    }
  }
 else {
    throw new AccessRightException(locale,user);
  }
}
Program: 85990
Project: 85990
Buggy source:
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public WorkflowModel updateACLForWorkflow(String pWorkspaceId,String workflowModelId,Map<String,String> userEntries,Map<String,String> groupEntries) throws WorkflowNotFoundException, UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, WorkflowModelNotFoundException, AccessRightException {
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  WorkflowModelKey workflowModelKey=new WorkflowModelKey(pWorkspaceId,workflowModelId);
  WorkflowModel workflowModel=new WorkflowModelDAO(new Locale(user.getLanguage()),em).loadWorkflowModel(workflowModelKey);
  checkWorkflowWriteAccess(workflowModel,user);
  ACLFactory aclFactory=new ACLFactory(em);
  if (workflowModel.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,groupEntries);
    workflowModel.setAcl(acl);
  }
 else {
    aclFactory.updateACL(workflowModel.getAcl(),userEntries,groupEntries);
  }
  return workflowModel;
}

Fixed version (ground truth):
@RolesAllowed(UserGroupMapping.REGULAR_USER_ROLE_ID) @Override public WorkflowModel updateACLForWorkflow(String pWorkspaceId,String workflowModelId,Map<String,String> userEntries,Map<String,String> groupEntries) throws WorkflowNotFoundException, UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, WorkflowModelNotFoundException, AccessRightException {
  User user=userManager.checkWorkspaceReadAccess(pWorkspaceId);
  WorkflowModelKey workflowModelKey=new WorkflowModelKey(pWorkspaceId,workflowModelId);
  WorkflowModel workflowModel=new WorkflowModelDAO(new Locale(user.getLanguage()),em).loadWorkflowModel(workflowModelKey);
  checkWorkflowWriteAccess(workflowModel,user);
  ACLFactory aclFactory=new ACLFactory(em);
  if (workflowModel.getAcl() == null) {
    ACL acl=aclFactory.createACL(pWorkspaceId,userEntries,groupEntries);
    workflowModel.setAcl(acl);
  }
 else {
    aclFactory.updateACL(pWorkspaceId,workflowModel.getAcl(),userEntries,groupEntries);
  }
  return workflowModel;
}
Program: 85991
Project: 85991
Buggy source:
public ACL updateACL(ACL acl,Map<String,String> pUserEntries,Map<String,String> pGroupEntries){
  if (pUserEntries != null) {
    for (    ACLUserEntry entry : acl.getUserEntries().values()) {
      ACL.Permission newPermission=ACL.Permission.valueOf(pUserEntries.get(entry.getPrincipalLogin()));
      if (newPermission != null) {
        entry.setPermission(newPermission);
      }
    }
  }
  if (pGroupEntries != null) {
    for (    ACLUserGroupEntry entry : acl.getGroupEntries().values()) {
      ACL.Permission newPermission=ACL.Permission.valueOf(pGroupEntries.get(entry.getPrincipalId()));
      if (newPermission != null) {
        entry.setPermission(newPermission);
      }
    }
  }
  return acl;
}

Fixed version (ground truth):
public ACL updateACL(String workspaceId,ACL acl,Map<String,String> pUserEntries,Map<String,String> pGroupEntries){
  if (acl != null) {
    new ACLDAO(em).removeACLEntries(acl);
    acl.setUserEntries(new HashMap<User,ACLUserEntry>());
    acl.setGroupEntries(new HashMap<UserGroup,ACLUserGroupEntry>());
    for (    Map.Entry<String,String> entry : pUserEntries.entrySet()) {
      acl.addEntry(em.getReference(User.class,new UserKey(workspaceId,entry.getKey())),ACL.Permission.valueOf(entry.getValue()));
    }
    for (    Map.Entry<String,String> entry : pGroupEntries.entrySet()) {
      acl.addEntry(em.getReference(UserGroup.class,new UserGroupKey(workspaceId,entry.getKey())),ACL.Permission.valueOf(entry.getValue()));
    }
  }
  return acl;
}
Program: 85995
Project: 85995
Buggy source:
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public List<LightPartMasterDTO> searchPartNumbers(@PathParam("String_Node_Str") String workspaceId,@QueryParam("String_Node_Str") String q) throws EntityNotFoundException, AccessRightException {
  List<PartMaster> partMasters=productService.findPartMasters(Tools.stripTrailingSlash(workspaceId),"String_Node_Str" + q + "String_Node_Str",8);
  List<LightPartMasterDTO> partsMastersDTO=new ArrayList<>();
  for (  PartMaster p : partMasters) {
    partsMastersDTO.add(new LightPartMasterDTO(p.getNumber()));
  }
  return partsMastersDTO;
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public List<LightPartMasterDTO> searchPartNumbers(@PathParam("String_Node_Str") String workspaceId,@QueryParam("String_Node_Str") String q) throws EntityNotFoundException, AccessRightException {
  List<PartMaster> partMasters=productService.findPartMasters(Tools.stripTrailingSlash(workspaceId),"String_Node_Str" + q + "String_Node_Str",8);
  List<LightPartMasterDTO> partsMastersDTO=new ArrayList<>();
  for (  PartMaster p : partMasters) {
    LightPartMasterDTO lightPartMasterDTO=new LightPartMasterDTO(p.getNumber(),p.getName());
    partsMastersDTO.add(lightPartMasterDTO);
  }
  return partsMastersDTO;
}
Program: 85996
Project: 85996
Buggy source:
public LightPartMasterDTO(String partNumber){
  this.partNumber=partNumber;
}

Fixed version (ground truth):
public LightPartMasterDTO(String partNumber,String partName){
  this.partNumber=partNumber;
  this.partName=partName;
}
Program: 85997
Project: 85997
Buggy source:
/** 
 * Returns the BinaryResource object given his Id. WARNING: You have to check access right before use it.
 * @param fullName Id of the <a href="BinaryResource.html">BinaryResource</a> of which the data file will be returned
 * @return The binary resource, a BinaryResource instance, that now needs to be created
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws FileNotFoundException
 * @throws NotAllowedException
 */
BinaryResource getBinaryResource(String fullName) throws WorkspaceNotFoundException, NotAllowedException, FileNotFoundException, UserNotFoundException, UserNotActiveException, AccessRightException ;

Fixed version (ground truth):
/** 
 * Returns the BinaryResource object given his Id. WARNING: You have to check access right before use it.
 * @param fullName Id of the <a href="BinaryResource.html">BinaryResource</a> of which the data file will be returned
 * @return The binary resource, a BinaryResource instance, that now needs to be created
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws FileNotFoundException
 * @throws NotAllowedException
 * @throws AccessRightException
 */
BinaryResource getBinaryResource(String fullName) throws WorkspaceNotFoundException, NotAllowedException, FileNotFoundException, UserNotFoundException, UserNotActiveException, AccessRightException ;
Program: 85998
Project: 85998
Buggy source:
/** 
 * Returns the BinaryResource object given his Id. WARNING: You have to check access right before use it.
 * @param fullName Id of the <a href="BinaryResource.html">BinaryResource</a> of which the data file will be returned
 * @return The binary resource, a BinaryResource instance, that now needs to be created
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws FileNotFoundException
 * @throws NotAllowedException
 */
BinaryResource getTemplateBinaryResource(String fullName) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, FileNotFoundException ;

Fixed version (ground truth):
/** 
 * Returns the BinaryResource object given his Id. WARNING: You have to check access right before use it.
 * @param fullName Id of the <a href="BinaryResource.html">BinaryResource</a> of which the data file will be returned
 * @return The binary resource, a BinaryResource instance, that now needs to be created
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws FileNotFoundException
 */
BinaryResource getTemplateBinaryResource(String fullName) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, FileNotFoundException ;
Program: 85999
Project: 85999
Buggy source:
/** 
 * Undoes checkout the given part revision. As a consequence its current working copy, represented by its latest <a href="PartIteration.html">PartIteration</a> will be deleted. Thus, some modifications may be lost.
 * @param partRPK The id of the part revision to undo check out
 * @return The part revision which is now in the checkin state
 * @throws NotAllowedException
 * @throws PartRevisionNotFoundException
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 */
PartRevision undoCheckOutPart(PartRevisionKey partRPK) throws NotAllowedException, PartRevisionNotFoundException, UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException ;

Fixed version (ground truth):
/** 
 * Undoes checkout the given part revision. As a consequence its current working copy, represented by its latest <a href="PartIteration.html">PartIteration</a> will be deleted. Thus, some modifications may be lost.
 * @param partRPK The id of the part revision to undo check out
 * @return The part revision which is now in the checkin state
 * @throws NotAllowedException
 * @throws PartRevisionNotFoundException
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 */
PartRevision undoCheckOutPart(PartRevisionKey partRPK) throws NotAllowedException, PartRevisionNotFoundException, UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, AccessRightException ;
Program: 86001
Project: 86001
Buggy source:
/** 
 * Checks in the supplied part revision so its latest iteration, that carries the modifications realized since the checkout operation, will be published and made visible to all users.
 * @param partRPK The id of the part revision to check in
 * @return The part revision which has just been checked in
 * @throws PartRevisionNotFoundException
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 * @throws NotAllowedException
 */
PartRevision checkInPart(PartRevisionKey partRPK) throws PartRevisionNotFoundException, UserNotFoundException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, ESServerException ;

Fixed version (ground truth):
/** 
 * Checks in the supplied part revision so its latest iteration, that carries the modifications realized since the checkout operation, will be published and made visible to all users.
 * @param partRPK The id of the part revision to check in
 * @return The part revision which has just been checked in
 * @throws PartRevisionNotFoundException
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 * @throws NotAllowedException
 * @throws ESServerException
 */
PartRevision checkInPart(PartRevisionKey partRPK) throws PartRevisionNotFoundException, UserNotFoundException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, ESServerException ;
Program: 86002
Project: 86002
Buggy source:
/** 
 * Returns a specific <a href="PartRevision.html">PartRevision</a>.
 * @param partRPK The id of the part revision to get
 * @return The part revision
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartRevisionNotFoundException
 */
PartRevision getPartRevision(PartRevisionKey partRPK) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartRevisionNotFoundException, AccessRightException ;

Fixed version (ground truth):
/** 
 * Returns a specific <a href="PartRevision.html">PartRevision</a>.
 * @param partRPK The id of the part revision to get
 * @return The part revision
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartRevisionNotFoundException
 * @throws AccessRightException
 */
PartRevision getPartRevision(PartRevisionKey partRPK) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartRevisionNotFoundException, AccessRightException ;
Program: 86003
Project: 86003
Buggy source:
/** 
 * Remove the cad file from the part iteration.
 * @param partIKey The id of the part iteration from which the file will be deleted
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartIterationNotFoundException
 */
void removeCADFileFromPartIteration(PartIterationKey partIKey) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartIterationNotFoundException, PartRevisionNotFoundException ;

Fixed version (ground truth):
/** 
 * Remove the cad file from the part iteration.
 * @param partIKey The id of the part iteration from which the file will be deleted
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartIterationNotFoundException
 * @throws PartRevisionNotFoundException
 */
void removeCADFileFromPartIteration(PartIterationKey partIKey) throws UserNotFoundException, UserNotActiveException, WorkspaceNotFoundException, PartIterationNotFoundException, PartRevisionNotFoundException ;
Program: 86004
Project: 86004
Buggy source:
/** 
 * Returns a specific <a href="PartIteration.html">PartIteration</a>.
 * @param pPartIPK The id of the part iteration to get
 * @return The part iteration
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartIterationNotFoundException
 * @throws PartRevisionNotFoundException
 * @throws AccessRightException
 */
PartIteration getPartIteration(PartIterationKey pPartIPK) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, PartRevisionNotFoundException, AccessRightException, PartIterationNotFoundException ;

Fixed version (ground truth):
/** 
 * Returns a specific <a href="PartIteration.html">PartIteration</a>.
 * @param pPartIPK The id of the part iteration to get
 * @return The part iteration
 * @throws UserNotFoundException
 * @throws UserNotActiveException
 * @throws WorkspaceNotFoundException
 * @throws PartIterationNotFoundException
 * @throws PartRevisionNotFoundException
 * @throws AccessRightException
 */
PartIteration getPartIteration(PartIterationKey pPartIPK) throws UserNotFoundException, WorkspaceNotFoundException, UserNotActiveException, PartIterationNotFoundException, PartRevisionNotFoundException, AccessRightException ;
Program: 86005
Project: 86005
Buggy source:
/** 
 * Creates a new product structure.
 * @param workspaceId The workspace in which the product structure will be created
 * @param id The id of the product structure which must be unique inside the workspace context
 * @param description The description of the product structure
 * @param designItemNumber The id of the part master that will be the root of the product structure
 * @return The newly created configuration item
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws com.docdoku.core.exceptions.AccessRightException
 * @throws NotAllowedException
 * @throws com.docdoku.core.exceptions.ConfigurationItemAlreadyExistsException
 * @throws com.docdoku.core.exceptions.CreationException
 */
ConfigurationItem createConfigurationItem(String workspaceId,String id,String description,String designItemNumber) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, ConfigurationItemAlreadyExistsException, CreationException, PartMasterNotFoundException ;

Fixed version (ground truth):
/** 
 * Creates a new product structure.
 * @param workspaceId The workspace in which the product structure will be created
 * @param id The id of the product structure which must be unique inside the workspace context
 * @param description The description of the product structure
 * @param designItemNumber The id of the part master that will be the root of the product structure
 * @return The newly created configuration item
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 * @throws NotAllowedException
 * @throws ConfigurationItemAlreadyExistsException
 * @throws CreationException
 * @throws PartMasterNotFoundException
 */
ConfigurationItem createConfigurationItem(String workspaceId,String id,String description,String designItemNumber) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, NotAllowedException, ConfigurationItemAlreadyExistsException, CreationException, PartMasterNotFoundException ;
Program: 86007
Project: 86007
Buggy source:
@Override public ActivityModel convertFrom(ActivityModelDTO activityModelDTO,ActivityModel pActivityModel){
  List<TaskModel> taskModels=new ArrayList<>();
  for (int i=0; i < activityModelDTO.getTaskModels().size(); i++) {
    taskModels.add(mapper.map(activityModelDTO.getTaskModels().get(i),TaskModel.class));
  }
  ActivityModel activityModel;
switch (activityModelDTO.getType()) {
case SERIAL:
{
      activityModel=new SerialActivityModel();
      break;
    }
case PARALLEL:
{
    activityModel=new ParallelActivityModel();
    ((ParallelActivityModel)activityModel).setTasksToComplete(activityModelDTO.getTasksToComplete());
    break;
  }
default :
{
  throw new IllegalArgumentException("String_Node_Str");
}
}
activityModel.setStep(activityModelDTO.getStep());
activityModel.setTaskModels(taskModels);
activityModel.setLifeCycleState(activityModelDTO.getLifeCycleState());
return activityModel;
}

Fixed version (ground truth):
@Override public ActivityModel convertFrom(ActivityModelDTO activityModelDTO,ActivityModel pActivityModel){
  List<TaskModel> taskModels=new ArrayList<>();
  for (int i=0; i < activityModelDTO.getTaskModels().size(); i++) {
    taskModels.add(mapper.map(activityModelDTO.getTaskModels().get(i),TaskModel.class));
  }
  ActivityModel activityModel;
switch (activityModelDTO.getType()) {
case SERIAL:
{
      activityModel=new SerialActivityModel();
      activityModel.setTaskModels(taskModels);
      break;
    }
case PARALLEL:
{
    activityModel=new ParallelActivityModel();
    activityModel.setTaskModels(taskModels);
    ((ParallelActivityModel)activityModel).setTasksToComplete(activityModelDTO.getTasksToComplete());
    break;
  }
default :
{
  throw new IllegalArgumentException("String_Node_Str");
}
}
activityModel.setStep(activityModelDTO.getStep());
activityModel.setLifeCycleState(activityModelDTO.getLifeCycleState());
return activityModel;
}
Program: 86008
Project: 86008
Buggy source:
public Object execImpl() throws Exception {
  if (partNumber == null || revision == null) {
    loadMetadata();
  }
  productS=ScriptingTools.createProductService(getServerURL(),user,password);
  String strRevision=revision == null ? null : revision.toString();
  ConfigSpec cs=null;
  if (baselineId != 0) {
    cs=new BaselineConfigSpec(productS.getBaselineById(baselineId));
  }
  checkoutPart(partNumber,strRevision,0,cs);
  return null;
}

Fixed version (ground truth):
public Object execImpl() throws Exception {
  if (partNumber == null || revision == null) {
    loadMetadata();
  }
  productS=ScriptingTools.createProductService(getServerURL(),user,password);
  String strRevision=revision == null ? null : revision.toString();
  ConfigSpec cs=null;
  if (baselineId != 0) {
    cs=productS.getConfigSpecForBaseline(baselineId);
  }
  checkoutPart(partNumber,strRevision,0,cs);
  return null;
}
Program: 86009
Project: 86009
Buggy source:
public Object execImpl() throws Exception {
  if (partNumber == null) {
    loadMetadata();
  }
  productS=ScriptingTools.createProductService(getServerURL(),user,password);
  String strRevision=revision == null ? null : revision.toString();
  ConfigSpec cs=null;
  if (baselineId != 0) {
    cs=new BaselineConfigSpec(productS.getBaselineById(baselineId));
  }
  getPart(partNumber,strRevision,iteration,cs);
  return null;
}

Fixed version (ground truth):
public Object execImpl() throws Exception {
  if (partNumber == null) {
    loadMetadata();
  }
  productS=ScriptingTools.createProductService(getServerURL(),user,password);
  String strRevision=revision == null ? null : revision.toString();
  ConfigSpec cs=null;
  if (baselineId != 0) {
    cs=productS.getConfigSpecForBaseline(baselineId);
  }
  getPart(partNumber,strRevision,iteration,cs);
  return null;
}
Program: 86010
Project: 86010
Buggy source:
public BaselineConfigSpec(Baseline baseline){
  this.baseline=baseline;
}

Fixed version (ground truth):
public BaselineConfigSpec(Baseline baseline,User user){
  this.baseline=baseline;
  this.user=user;
}
Program: 86011
Project: 86011
Buggy source:
@Override public PartIteration filterConfigSpec(PartMaster part){
  BaselinedPartKey baselinedRootPartKey=new BaselinedPartKey(baseline.getId(),part.getWorkspaceId(),part.getNumber());
  BaselinedPart baselinedRootPart=baseline.getBaselinedPart(baselinedRootPartKey);
  if (baselinedRootPart != null) {
    return baselinedRootPart.getTargetPart();
  }
 else {
    return part.getLastRevision().getLastIteration();
  }
}

Fixed version (ground truth):
@Override public PartIteration filterConfigSpec(PartMaster part){
  BaselinedPartKey baselinedRootPartKey=new BaselinedPartKey(baseline.getPartCollection().getId(),part.getWorkspaceId(),part.getNumber());
  BaselinedPart baselinedRootPart=baseline.getBaselinedPart(baselinedRootPartKey);
  if (baselinedRootPart != null) {
    return baselinedRootPart.getTargetPart();
  }
 else {
    PartIteration partI=part.getLastRevision().getLastIteration();
    PartRevision partRevision=partI.getPartRevision();
    if (partRevision.isCheckedOut() && !partRevision.getCheckOutUser().equals(user)) {
      partI=partRevision.getLastUncheckoutedIteration();
    }
    return partI;
  }
}
Program: 86012
Project: 86012
Buggy source:
public LatestConfigSpec(){
}

Fixed version (ground truth):
public LatestConfigSpec(User user){
  this.user=user;
}
Program: 86013
Project: 86013
Buggy source:
@Override public PartIteration filterConfigSpec(PartMaster part){
  PartRevision partR=part.getLastRevision();
  return partR.getLastIteration();
}

Fixed version (ground truth):
@Override public PartIteration filterConfigSpec(PartMaster part){
  PartIteration partI=part.getLastRevision().getLastIteration();
  PartRevision partRevision=partI.getPartRevision();
  if (partRevision.isCheckedOut() && !partRevision.getCheckOutUser().equals(user)) {
    partI=partRevision.getLastUncheckoutedIteration();
  }
  return partI;
}
Program: 86014
Project: 86014
Buggy source:
void createBaseline(ConfigurationItemKey configurationItemKey,String name,Baseline.BaselineType type,String description) throws UserNotFoundException, AccessRightException, WorkspaceNotFoundException, ConfigurationItemNotFoundException, ConfigurationItemNotReleasedException ;

Fixed version (ground truth):
BaselineCreation createBaseline(ConfigurationItemKey configurationItemKey,String name,Baseline.BaselineType type,String description) throws UserNotFoundException, AccessRightException, WorkspaceNotFoundException, ConfigurationItemNotFoundException, ConfigurationItemNotReleasedException, PartIterationNotFoundException, UserNotActiveException, NotAllowedException ;
Program: 86015
Project: 86015
Buggy source:
void createBaseline(ConfigurationItemKey configurationItemKey,String name,Baseline.BaselineType type,String description) throws UserNotFoundException, AccessRightException, WorkspaceNotFoundException, ConfigurationItemNotFoundException, ConfigurationItemNotReleasedException ;

Fixed version (ground truth):
BaselineCreation createBaseline(ConfigurationItemKey configurationItemKey,String name,Baseline.BaselineType type,String description) throws UserNotFoundException, AccessRightException, WorkspaceNotFoundException, ConfigurationItemNotFoundException, ConfigurationItemNotReleasedException, PartIterationNotFoundException, UserNotActiveException, NotAllowedException ;
Program: 86016
Project: 86016
Buggy source:
public Layer(String pName,User pAuthor,ConfigurationItem pConfigurationItem){
  this.name=pName;
  this.author=pAuthor;
  this.configurationItem=pConfigurationItem;
}

Fixed version (ground truth):
public Layer(String pName,User pAuthor,ConfigurationItem pConfigurationItem,String color){
  this.name=pName;
  this.author=pAuthor;
  this.configurationItem=pConfigurationItem;
  this.color=color;
}
Program: 86017
Project: 86017
Buggy source:
Layer createLayer(ConfigurationItemKey pKey,String pName) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException ;

Fixed version (ground truth):
Layer createLayer(ConfigurationItemKey pKey,String pName,String color) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException ;
Program: 86018
Project: 86018
Buggy source:
Layer updateLayer(ConfigurationItemKey pKey,int pId,String pName) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException, LayerNotFoundException, UserNotActiveException ;

Fixed version (ground truth):
Layer updateLayer(ConfigurationItemKey pKey,int pId,String pName,String color) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException, LayerNotFoundException, UserNotActiveException ;
Program: 86019
Project: 86019
Buggy source:
/** 
 * Creates a new layer on a given product structure.
 * @param key The identifier object of the configuration item wherein the layer will be created
 * @param name The user friendly name of the layer
 * @return The newly created layer
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 * @throws ConfigurationItemNotFoundException
 */
Layer createLayer(ConfigurationItemKey key,String name) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException ;

Fixed version (ground truth):
/** 
 * Creates a new layer on a given product structure.
 * @param key The identifier object of the configuration item wherein the layer will be created
 * @param name The user friendly name of the layer
 * @return The newly created layer
 * @throws UserNotFoundException
 * @throws WorkspaceNotFoundException
 * @throws AccessRightException
 * @throws ConfigurationItemNotFoundException
 */
Layer createLayer(ConfigurationItemKey key,String name,String color) throws UserNotFoundException, WorkspaceNotFoundException, AccessRightException, ConfigurationItemNotFoundException ;