nus-yam/ex-repair huggingface dataset:
Program: 89141
Project: 89141
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordService#hideRecord(org.alfresco.service.cmr.repository.NodeRef)
 */
@Override public void hideRecord(final NodeRef nodeRef){
  ParameterCheck.mandatory("String_Node_Str",nodeRef);
  runAsSystem(new RunAsWork<Void>(){
    @Override public Void doWork(){
      NodeRef originatingLocation=(NodeRef)nodeService.getProperty(nodeRef,PROP_RECORD_ORIGINATING_LOCATION);
      List<ChildAssociationRef> parentAssocs=nodeService.getParentAssocs(nodeRef);
      for (      ChildAssociationRef childAssociationRef : parentAssocs) {
        if (!childAssociationRef.isPrimary() && childAssociationRef.getParentRef().equals(originatingLocation)) {
          nodeService.removeChildAssociation(childAssociationRef);
          break;
        }
      }
      extendedSecurityService.removeAllExtendedSecurity(nodeRef);
      return null;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordService#hideRecord(org.alfresco.service.cmr.repository.NodeRef)
 */
@Override public void hideRecord(final NodeRef nodeRef){
  ParameterCheck.mandatory("String_Node_Str",nodeRef);
  authenticationUtil.runAsSystem(new RunAsWork<Void>(){
    @Override public Void doWork(){
      NodeRef originatingLocation=(NodeRef)nodeService.getProperty(nodeRef,PROP_RECORD_ORIGINATING_LOCATION);
      List<ChildAssociationRef> parentAssocs=nodeService.getParentAssocs(nodeRef);
      for (      ChildAssociationRef childAssociationRef : parentAssocs) {
        if (!childAssociationRef.isPrimary() && childAssociationRef.getParentRef().equals(originatingLocation)) {
          nodeService.removeChildAssociation(childAssociationRef);
          break;
        }
      }
      extendedSecurityService.removeAllExtendedSecurity(nodeRef);
      return null;
    }
  }
);
}
Program: 89143
Project: 89143
Buggy source:
/** 
 * Override with check for RM read
 * @param aclId
 * @return
 */
private Set<String> getReadersDenied(Long aclId){
  AccessControlList acl=aclDaoComponent.getAccessControlList(aclId);
  if (acl == null) {
    return Collections.emptySet();
  }
  Set<String> denied=readersDeniedCache.get(aclId);
  if (denied != null) {
    return denied;
  }
  denied=new HashSet<String>();
  Set<String> assigned=new HashSet<String>();
  for (  AccessControlEntry ace : acl.getEntries()) {
    assigned.add(ace.getAuthority());
  }
  for (  String authority : assigned) {
    UnconditionalDeniedAclTest test=new UnconditionalDeniedAclTest(getPermissionReference(PermissionService.READ));
    UnconditionalDeniedAclTest rmTest=new UnconditionalDeniedAclTest(getPermissionReference(RMPermissionModel.READ_RECORDS));
    if (test.evaluate(authority,aclId) || rmTest.evaluate(authority,aclId)) {
      denied.add(authority);
    }
  }
  readersDeniedCache.put((Serializable)acl.getProperties(),denied);
  return denied;
}

Fixed version (ground truth):
/** 
 * Override with check for RM read
 * @param aclId
 * @return
 */
public Set<String> getReadersDenied(Long aclId){
  AccessControlList acl=aclDaoComponent.getAccessControlList(aclId);
  if (acl == null) {
    return Collections.emptySet();
  }
  Set<String> denied=readersDeniedCache.get(aclId);
  if (denied != null) {
    return denied;
  }
  denied=new HashSet<String>();
  Set<String> assigned=new HashSet<String>();
  for (  AccessControlEntry ace : acl.getEntries()) {
    assigned.add(ace.getAuthority());
  }
  for (  String authority : assigned) {
    UnconditionalDeniedAclTest test=new UnconditionalDeniedAclTest(getPermissionReference(PermissionService.READ));
    UnconditionalDeniedAclTest rmTest=new UnconditionalDeniedAclTest(getPermissionReference(RMPermissionModel.READ_RECORDS));
    if (test.evaluate(authority,aclId) || rmTest.evaluate(authority,aclId)) {
      denied.add(authority);
    }
  }
  readersDeniedCache.put((Serializable)acl.getProperties(),denied);
  return denied;
}
Program: 89144
Project: 89144
Buggy source:
@Override public FileInfo create(NodeRef parentNodeRef,String name,QName typeQName,QName assocQName) throws FileExistsException {
  FileInfo result=null;
  recordService.disablePropertyEditableCheck();
  try {
    result=super.create(parentNodeRef,name,typeQName,assocQName);
  }
  finally {
    recordService.enablePropertyEditableCheck();
    recordService.disablePropertyEditableCheck(result.getNodeRef());
  }
  return result;
}

Fixed version (ground truth):
@Override public FileInfo create(NodeRef parentNodeRef,String name,QName typeQName,QName assocQName){
  FileInfo result=null;
  recordService.disablePropertyEditableCheck();
  try {
    result=super.create(parentNodeRef,name,typeQName,assocQName);
  }
  finally {
    recordService.enablePropertyEditableCheck();
    recordService.disablePropertyEditableCheck(result.getNodeRef());
  }
  return result;
}
Program: 89145
Project: 89145
Buggy source:
/** 
 * Persists any changes made to the events on the given disposition action definition on the given next action.
 * @param dispositionActionDef The disposition action definition node
 * @param nextAction The next disposition action
 */
@Override protected void addParameterDefinitions(List<ParameterDefinition> paramList){
}

Fixed version (ground truth):
@Override protected void addParameterDefinitions(List<ParameterDefinition> paramList){
}
Program: 89146
Project: 89146
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executeInternal(){
  try {
    if (logger.isInfoEnabled()) {
      logger.info("String_Node_Str" + getName() + "String_Node_Str");
    }
    retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>(){
      @Override public Void execute(){
        behaviourFilter.disableBehaviour();
        try {
          executePatch();
        }
  finally {
          behaviourFilter.enableBehaviour();
        }
        return null;
      }
    }
,false,true);
    if (logger.isInfoEnabled()) {
      logger.info("String_Node_Str" + getName() + "String_Node_Str");
    }
  }
 catch (  Throwable exception) {
    if (logger.isInfoEnabled()) {
      logger.info("String_Node_Str" + exception.getMessage(),exception);
    }
    throw exception;
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executeInternal(){
  try {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + getName() + "String_Node_Str");
    }
    retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>(){
      @Override public Void execute(){
        behaviourFilter.disableBehaviour();
        try {
          executePatch();
        }
  finally {
          behaviourFilter.enableBehaviour();
        }
        return null;
      }
    }
,false,true);
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + getName() + "String_Node_Str");
    }
  }
 catch (  Throwable exception) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + exception.getMessage(),exception);
    }
    throw exception;
  }
}
Program: 89149
Project: 89149
Buggy source:
/** 
 * @see org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback#execute()
 */
@Override public Integer execute() throws Throwable {
  Long maxNodeId=patchDAO.getMaxAdmNodeID();
  Pair<Long,QName> before=qnameDAO.getQName(qnameBefore);
  if (before != null) {
    for (Long i=0L; i < maxNodeId; i+=BATCH_SIZE) {
      if ("String_Node_Str".equals(reindexClass)) {
        List<Long> nodeIds=patchDAO.getNodesByTypeQNameId(before.getFirst(),i,i + BATCH_SIZE);
        nodeDAO.touchNodes(nodeDAO.getCurrentTransactionId(true),nodeIds);
      }
 else       if ("String_Node_Str".equals(reindexClass)) {
        List<Long> nodeIds=patchDAO.getNodesByAspectQNameId(before.getFirst(),i,i + BATCH_SIZE);
        nodeDAO.touchNodes(nodeDAO.getCurrentTransactionId(true),nodeIds);
      }
    }
    qnameDAO.updateQName(qnameBefore,qnameAfter);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + qnameBefore.toString());
    }
  }
 else {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + qnameBefore.toString());
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback#execute()
 */
@Override public Integer execute() throws Throwable {
  Long maxNodeId=patchDAO.getMaxAdmNodeID();
  Pair<Long,QName> before=qnameDAO.getQName(qnameBefore);
  if (before != null) {
    for (Long i=0L; i < maxNodeId; i+=BATCH_SIZE) {
      if ("String_Node_Str".equals(reindexClass)) {
        List<Long> nodeIds=patchDAO.getNodesByTypeQNameId(before.getFirst(),i,i + BATCH_SIZE);
        nodeDAO.touchNodes(nodeDAO.getCurrentTransactionId(true),nodeIds);
      }
 else       if ("String_Node_Str".equals(reindexClass)) {
        List<Long> nodeIds=patchDAO.getNodesByAspectQNameId(before.getFirst(),i,i + BATCH_SIZE);
        nodeDAO.touchNodes(nodeDAO.getCurrentTransactionId(true),nodeIds);
      }
    }
    qnameDAO.updateQName(qnameBefore,qnameAfter);
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + qnameBefore.toString());
    }
  }
 else {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + qnameBefore.toString());
    }
  }
  return 0;
}
Program: 89150
Project: 89150
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  if (siteService.getSite(RM_SITE_ID) != null) {
    List<SavedSearchDetails> savedSearches=recordsManagementSearchService.getSavedSearches(RM_SITE_ID);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + savedSearches.size() + "String_Node_Str");
    }
    for (    SavedSearchDetails savedSearchDetails : savedSearches) {
      String refreshedJSON=savedSearchDetails.toJSONString();
      NodeRef nodeRef=savedSearchDetails.getNodeRef();
      if (nodeRef != null) {
        ContentWriter writer=contentService.getWriter(nodeRef,ContentModel.PROP_CONTENT,true);
        writer.putContent(refreshedJSON);
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + savedSearchDetails.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  if (siteService.getSite(RM_SITE_ID) != null) {
    List<SavedSearchDetails> savedSearches=recordsManagementSearchService.getSavedSearches(RM_SITE_ID);
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + savedSearches.size() + "String_Node_Str");
    }
    for (    SavedSearchDetails savedSearchDetails : savedSearches) {
      String refreshedJSON=savedSearchDetails.toJSONString();
      NodeRef nodeRef=savedSearchDetails.getNodeRef();
      if (nodeRef != null) {
        ContentWriter writer=contentService.getWriter(nodeRef,ContentModel.PROP_CONTENT,true);
        writer.putContent(refreshedJSON);
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("String_Node_Str" + savedSearchDetails.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str");
        }
      }
    }
  }
}
Program: 89152
Project: 89152
Buggy source:
public Object doWork(){
  RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
    public Void execute() throws Throwable {
      nodeService.setProperty(OLD_BEHAVIOR_SCRIPTS_FOLDER,ContentModel.PROP_DESCRIPTION,"String_Node_Str");
      List<FileInfo> oldBehaviorScripts=fileFolderService.listFiles(OLD_BEHAVIOR_SCRIPTS_FOLDER);
      if (oldBehaviorScripts != null && !oldBehaviorScripts.isEmpty()) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str");
        }
        for (        FileInfo script : oldBehaviorScripts) {
          fileFolderService.moveFrom(script.getNodeRef(),OLD_BEHAVIOR_SCRIPTS_FOLDER,RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder,script.getName());
          if (logger.isDebugEnabled()) {
            logger.debug("String_Node_Str" + script.getName());
          }
        }
      }
      return null;
    }
  }
;
  retryingTransactionHelper.doInTransaction(callback);
  return null;
}

Fixed version (ground truth):
public Object doWork(){
  RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
    public Void execute() throws Throwable {
      nodeService.setProperty(OLD_BEHAVIOR_SCRIPTS_FOLDER,ContentModel.PROP_DESCRIPTION,"String_Node_Str");
      List<FileInfo> oldBehaviorScripts=fileFolderService.listFiles(OLD_BEHAVIOR_SCRIPTS_FOLDER);
      if (oldBehaviorScripts != null && !oldBehaviorScripts.isEmpty()) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("String_Node_Str");
        }
        for (        FileInfo script : oldBehaviorScripts) {
          fileFolderService.moveFrom(script.getNodeRef(),OLD_BEHAVIOR_SCRIPTS_FOLDER,RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder,script.getName());
          if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("String_Node_Str" + script.getName());
          }
        }
      }
      return null;
    }
  }
;
  retryingTransactionHelper.doInTransaction(callback);
  return null;
}
Program: 89153
Project: 89153
Buggy source:
public Void execute() throws Throwable {
  nodeService.setProperty(OLD_BEHAVIOR_SCRIPTS_FOLDER,ContentModel.PROP_DESCRIPTION,"String_Node_Str");
  List<FileInfo> oldBehaviorScripts=fileFolderService.listFiles(OLD_BEHAVIOR_SCRIPTS_FOLDER);
  if (oldBehaviorScripts != null && !oldBehaviorScripts.isEmpty()) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
    for (    FileInfo script : oldBehaviorScripts) {
      fileFolderService.moveFrom(script.getNodeRef(),OLD_BEHAVIOR_SCRIPTS_FOLDER,RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder,script.getName());
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + script.getName());
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Void execute() throws Throwable {
  nodeService.setProperty(OLD_BEHAVIOR_SCRIPTS_FOLDER,ContentModel.PROP_DESCRIPTION,"String_Node_Str");
  List<FileInfo> oldBehaviorScripts=fileFolderService.listFiles(OLD_BEHAVIOR_SCRIPTS_FOLDER);
  if (oldBehaviorScripts != null && !oldBehaviorScripts.isEmpty()) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str");
    }
    for (    FileInfo script : oldBehaviorScripts) {
      fileFolderService.moveFrom(script.getNodeRef(),OLD_BEHAVIOR_SCRIPTS_FOLDER,RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder,script.getName());
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + script.getName());
      }
    }
  }
  return null;
}
Program: 89154
Project: 89154
Buggy source:
/** 
 * Adds a new capability to the specified roles.
 * @param filePlan          file plan
 * @param capabilityName    capability name
 * @param roles             roles
 */
protected void addCapability(NodeRef filePlan,String capabilityName,String... roles){
  Capability capability=capabilityService.getCapability(capabilityName);
  if (capability == null) {
    throw new AlfrescoRuntimeException("String_Node_Str" + capabilityName + "String_Node_Str");
  }
  for (  String roleName : roles) {
    Role role=filePlanRoleService.getRole(filePlan,roleName);
    if (role != null) {
      Set<Capability> capabilities=role.getCapabilities();
      if (!capabilities.contains(capability)) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + capabilityName + "String_Node_Str"+ role.getName());
        }
        capabilities.add(capability);
        filePlanRoleService.updateRole(filePlan,role.getName(),role.getDisplayLabel(),capabilities);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds a new capability to the specified roles.
 * @param filePlan          file plan
 * @param capabilityName    capability name
 * @param roles             roles
 */
protected void addCapability(NodeRef filePlan,String capabilityName,String... roles){
  Capability capability=capabilityService.getCapability(capabilityName);
  if (capability == null) {
    throw new AlfrescoRuntimeException("String_Node_Str" + capabilityName + "String_Node_Str");
  }
  for (  String roleName : roles) {
    Role role=filePlanRoleService.getRole(filePlan,roleName);
    if (role != null) {
      Set<Capability> capabilities=role.getCapabilities();
      if (!capabilities.contains(capability)) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("String_Node_Str" + capabilityName + "String_Node_Str"+ role.getName());
        }
        capabilities.add(capability);
        filePlanRoleService.updateRole(filePlan,role.getName(),role.getDisplayLabel(),capabilities);
      }
    }
  }
}
Program: 89156
Project: 89156
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Set<NodeRef> filePlans=filePlanService.getFilePlans();
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    if (filePlanService.getUnfiledContainer(filePlan) == null) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + filePlan.toString());
      }
      ruleService.disableRules();
      try {
        filePlanPermissionService.setPermission(filePlan,ExtendedReaderDynamicAuthority.EXTENDED_READER,RMPermissionModel.READ_RECORDS);
        filePlanPermissionService.setPermission(filePlan,ExtendedWriterDynamicAuthority.EXTENDED_WRITER,RMPermissionModel.FILING);
        filePlanService.createHoldContainer(filePlan);
        filePlanService.createTransferContainer(filePlan);
        filePlanService.createUnfiledContainer(filePlan);
        moveExistingHolds(filePlan);
        moveExistingTransfers(filePlan);
        filePlanRoleService.createRole(filePlan,FilePlanRoleService.ROLE_EXTENDED_READERS,ROLE_READERS_LABEL,getCapabilities(ROLE_READERS_CAPABILITIES));
        filePlanRoleService.createRole(filePlan,FilePlanRoleService.ROLE_EXTENDED_WRITERS,ROLE_WRITERS_LABEL,getCapabilities(ROLE_WRITERS_CAPABILITIES));
      }
  finally {
        ruleService.enableRules();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Set<NodeRef> filePlans=filePlanService.getFilePlans();
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    if (filePlanService.getUnfiledContainer(filePlan) == null) {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + filePlan.toString());
      }
      ruleService.disableRules();
      try {
        filePlanPermissionService.setPermission(filePlan,ExtendedReaderDynamicAuthority.EXTENDED_READER,RMPermissionModel.READ_RECORDS);
        filePlanPermissionService.setPermission(filePlan,ExtendedWriterDynamicAuthority.EXTENDED_WRITER,RMPermissionModel.FILING);
        filePlanService.createHoldContainer(filePlan);
        filePlanService.createTransferContainer(filePlan);
        filePlanService.createUnfiledContainer(filePlan);
        moveExistingHolds(filePlan);
        moveExistingTransfers(filePlan);
        filePlanRoleService.createRole(filePlan,FilePlanRoleService.ROLE_EXTENDED_READERS,ROLE_READERS_LABEL,getCapabilities(ROLE_READERS_CAPABILITIES));
        filePlanRoleService.createRole(filePlan,FilePlanRoleService.ROLE_EXTENDED_WRITERS,ROLE_WRITERS_LABEL,getCapabilities(ROLE_WRITERS_CAPABILITIES));
      }
  finally {
        ruleService.enableRules();
      }
    }
  }
}
Program: 89157
Project: 89157
Buggy source:
private void moveExistingTransfers(NodeRef filePlan){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + filePlan.toString());
  }
  NodeRef container=filePlanService.getTransferContainer(filePlan);
  List<ChildAssociationRef> assocs=nodeService.getChildAssocs(filePlan,ASSOC_TRANSFERS,RegexQNamePattern.MATCH_ALL);
  for (  ChildAssociationRef assoc : assocs) {
    NodeRef transfer=assoc.getChildRef();
    String name=(String)nodeService.getProperty(transfer,ContentModel.PROP_NAME);
    nodeService.moveNode(transfer,container,ContentModel.ASSOC_CONTAINS,QName.createQName(RM_URI,name));
  }
}

Fixed version (ground truth):
private void moveExistingTransfers(NodeRef filePlan){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + filePlan.toString());
  }
  NodeRef container=filePlanService.getTransferContainer(filePlan);
  List<ChildAssociationRef> assocs=nodeService.getChildAssocs(filePlan,ASSOC_TRANSFERS,RegexQNamePattern.MATCH_ALL);
  for (  ChildAssociationRef assoc : assocs) {
    NodeRef transfer=assoc.getChildRef();
    String name=(String)nodeService.getProperty(transfer,ContentModel.PROP_NAME);
    nodeService.moveNode(transfer,container,ContentModel.ASSOC_CONTAINS,QName.createQName(RM_URI,name));
  }
}
Program: 89158
Project: 89158
Buggy source:
private void moveExistingHolds(NodeRef filePlan){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + filePlan.toString());
  }
  NodeRef container=filePlanService.getHoldContainer(filePlan);
  List<ChildAssociationRef> assocs=nodeService.getChildAssocs(filePlan,ASSOC_HOLDS,RegexQNamePattern.MATCH_ALL);
  for (  ChildAssociationRef assoc : assocs) {
    NodeRef hold=assoc.getChildRef();
    String name=(String)nodeService.getProperty(hold,ContentModel.PROP_NAME);
    nodeService.moveNode(hold,container,ContentModel.ASSOC_CONTAINS,QName.createQName(RM_URI,name));
  }
}

Fixed version (ground truth):
private void moveExistingHolds(NodeRef filePlan){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + filePlan.toString());
  }
  NodeRef container=filePlanService.getHoldContainer(filePlan);
  List<ChildAssociationRef> assocs=nodeService.getChildAssocs(filePlan,ASSOC_HOLDS,RegexQNamePattern.MATCH_ALL);
  for (  ChildAssociationRef assoc : assocs) {
    NodeRef hold=assoc.getChildRef();
    String name=(String)nodeService.getProperty(hold,ContentModel.PROP_NAME);
    nodeService.moveNode(hold,container,ContentModel.ASSOC_CONTAINS,QName.createQName(RM_URI,name));
  }
}
Program: 89159
Project: 89159
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Pair<Long,QName> aspectPair=qnameDAO.getQName(ASPECT_RECORD);
  if (aspectPair != null) {
    List<Long> records=patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(),0L,patchDAO.getMaxAdmNodeID());
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + records.size() + "String_Node_Str");
    }
    for (    Long record : records) {
      Pair<Long,NodeRef> recordPair=nodeDAO.getNodePair(record);
      NodeRef recordNodeRef=recordPair.getSecond();
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + recordNodeRef.toString());
        ChildAssociationRef assoc=nodeService.getPrimaryParent(recordNodeRef);
        NodeRef parent=assoc.getParentRef();
        if (parent != null) {
          filePlanPermissionServiceImpl.setupPermissions(parent,recordNodeRef);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Pair<Long,QName> aspectPair=qnameDAO.getQName(ASPECT_RECORD);
  if (aspectPair != null) {
    List<Long> records=patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(),0L,patchDAO.getMaxAdmNodeID());
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + records.size() + "String_Node_Str");
    }
    for (    Long record : records) {
      Pair<Long,NodeRef> recordPair=nodeDAO.getNodePair(record);
      NodeRef recordNodeRef=recordPair.getSecond();
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + recordNodeRef.toString());
        ChildAssociationRef assoc=nodeService.getPrimaryParent(recordNodeRef);
        NodeRef parent=assoc.getParentRef();
        if (parent != null) {
          filePlanPermissionServiceImpl.setupPermissions(parent,recordNodeRef);
        }
      }
    }
  }
}
Program: 89160
Project: 89160
Buggy source:
@Override protected void executePatch(){
  if (nodeService.exists(RM_CONFIG_FOLDER) && !nodeService.exists(TEMPLATE_ROOT)) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
    NodeRef destructionTemplate=createNode(ContentModel.TYPE_CONTENT,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    nodeService.addAspect(destructionTemplate,ContentModel.ASPECT_TITLED,null);
    nodeService.addAspect(destructionTemplate,ContentModel.ASPECT_AUTHOR,null);
    ContentWriter writer=contentService.getWriter(destructionTemplate,ContentModel.PROP_CONTENT,true);
    InputStream is=getClass().getClassLoader().getResourceAsStream(PATH_DESTRUCTION_TEMPLATE);
    writer.setEncoding("String_Node_Str");
    writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
    writer.putContent(is);
  }
}

Fixed version (ground truth):
@Override protected void executePatch(){
  if (nodeService.exists(RM_CONFIG_FOLDER) && !nodeService.exists(TEMPLATE_ROOT)) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str");
    }
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str");
    }
    NodeRef destructionTemplate=createNode(ContentModel.TYPE_CONTENT,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    nodeService.addAspect(destructionTemplate,ContentModel.ASPECT_TITLED,null);
    nodeService.addAspect(destructionTemplate,ContentModel.ASPECT_AUTHOR,null);
    ContentWriter writer=contentService.getWriter(destructionTemplate,ContentModel.PROP_CONTENT,true);
    InputStream is=getClass().getClassLoader().getResourceAsStream(PATH_DESTRUCTION_TEMPLATE);
    writer.setEncoding("String_Node_Str");
    writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
    writer.putContent(is);
  }
}
Program: 89161
Project: 89161
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
 */
@Override protected void executePatch(){
  Set<NodeRef> filePlans=filePlanService.getFilePlans();
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    boolean parentAddedToZone=false;
    Set<Role> roles=filePlanRoleService.getRoles(filePlan);
    for (    Role role : roles) {
      String roleGroupName=role.getRoleGroupName();
      if (!authorityService.getAuthorityZones(roleGroupName).contains(RMAuthority.ZONE_APP_RM)) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + roleGroupName + "String_Node_Str"+ filePlan.toString());
        }
        addAuthorityToZone(roleGroupName);
        if (!parentAddedToZone) {
          String allRolesGroupName=filePlanRoleService.getAllRolesContainerGroup(filePlan);
          addAuthorityToZone(allRolesGroupName);
          parentAddedToZone=true;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
 */
@Override protected void executePatch(){
  Set<NodeRef> filePlans=filePlanService.getFilePlans();
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    boolean parentAddedToZone=false;
    Set<Role> roles=filePlanRoleService.getRoles(filePlan);
    for (    Role role : roles) {
      String roleGroupName=role.getRoleGroupName();
      if (!authorityService.getAuthorityZones(roleGroupName).contains(RMAuthority.ZONE_APP_RM)) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("String_Node_Str" + roleGroupName + "String_Node_Str"+ filePlan.toString());
        }
        addAuthorityToZone(roleGroupName);
        if (!parentAddedToZone) {
          String allRolesGroupName=filePlanRoleService.getAllRolesContainerGroup(filePlan);
          addAuthorityToZone(allRolesGroupName);
          parentAddedToZone=true;
        }
      }
    }
  }
}
Program: 89162
Project: 89162
Buggy source:
/** 
 * @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#init()
 */
@Override public void init(){
  AuthenticationUtil.runAs(new RunAsWork<Object>(){
    public Object doWork(){
      RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
        public Void execute(){
          recordsManagementActionService.register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
          return null;
        }
      }
;
      retryingTransactionHelper.doInTransaction(callback);
      return null;
    }
  }
,AuthenticationUtil.getSystemUserName());
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#init()
 */
@Override public void init(){
  AuthenticationUtil.runAs(new RunAsWork<Object>(){
    public Object doWork(){
      RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
        public Void execute(){
          getRecordsManagementActionService().register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
          return null;
        }
      }
;
      retryingTransactionHelper.doInTransaction(callback);
      return null;
    }
  }
,AuthenticationUtil.getSystemUserName());
}
Program: 89163
Project: 89163
Buggy source:
public Void execute(){
  recordsManagementActionService.register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
  return null;
}

Fixed version (ground truth):
public Void execute(){
  getRecordsManagementActionService().register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
  return null;
}
Program: 89164
Project: 89164
Buggy source:
public Object doWork(){
  RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
    public Void execute(){
      recordsManagementActionService.register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
      return null;
    }
  }
;
  retryingTransactionHelper.doInTransaction(callback);
  return null;
}

Fixed version (ground truth):
public Object doWork(){
  RetryingTransactionCallback<Void> callback=new RetryingTransactionCallback<Void>(){
    public Void execute(){
      getRecordsManagementActionService().register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
      return null;
    }
  }
;
  retryingTransactionHelper.doInTransaction(callback);
  return null;
}
Program: 89165
Project: 89165
Buggy source:
/** 
 * Initialise RM action service
 */
public void init(){
  beforeRMActionExecutionDelegate=policyComponent.registerClassPolicy(BeforeRMActionExecution.class);
  onRMActionExecutionDelegate=policyComponent.registerClassPolicy(OnRMActionExecution.class);
}

Fixed version (ground truth):
/** 
 * Initialise RM action service
 */
public void init(){
  beforeRMActionExecutionDelegate=getPolicyComponent().registerClassPolicy(BeforeRMActionExecution.class);
  onRMActionExecutionDelegate=getPolicyComponent().registerClassPolicy(OnRMActionExecution.class);
}
Program: 89166
Project: 89166
Buggy source:
/** 
 * Invoke onRMActionExecution policy
 * @param nodeRef       node reference
 * @param name          action name
 * @param parameters    action parameters
 */
protected void invokeOnRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters){
  Set<QName> qnames=PoliciesUtil.getTypeAndAspectQNames(nodeService,nodeRef);
  OnRMActionExecution policy=onRMActionExecutionDelegate.get(qnames);
  policy.onRMActionExecution(nodeRef,name,parameters);
}

Fixed version (ground truth):
/** 
 * Invoke onRMActionExecution policy
 * @param nodeRef       node reference
 * @param name          action name
 * @param parameters    action parameters
 */
protected void invokeOnRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters){
  Set<QName> qnames=PoliciesUtil.getTypeAndAspectQNames(getNodeService(),nodeRef);
  OnRMActionExecution policy=onRMActionExecutionDelegate.get(qnames);
  policy.onRMActionExecution(nodeRef,name,parameters);
}
Program: 89167
Project: 89167
Buggy source:
/** 
 * Invoke beforeRMActionExecution policy
 * @param nodeRef       node reference
 * @param name          action name
 * @param parameters    action parameters
 */
protected void invokeBeforeRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters){
  Set<QName> qnames=PoliciesUtil.getTypeAndAspectQNames(nodeService,nodeRef);
  BeforeRMActionExecution policy=beforeRMActionExecutionDelegate.get(qnames);
  policy.beforeRMActionExecution(nodeRef,name,parameters);
}

Fixed version (ground truth):
/** 
 * Invoke beforeRMActionExecution policy
 * @param nodeRef       node reference
 * @param name          action name
 * @param parameters    action parameters
 */
protected void invokeBeforeRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters){
  Set<QName> qnames=PoliciesUtil.getTypeAndAspectQNames(getNodeService(),nodeRef);
  BeforeRMActionExecution policy=beforeRMActionExecutionDelegate.get(qnames);
  policy.beforeRMActionExecution(nodeRef,name,parameters);
}
Program: 89168
Project: 89168
Buggy source:
@Override protected boolean evaluateImpl(ActionCondition actionCondition,NodeRef actionedUponNodeRef){
  boolean result=false;
  String kind=((QName)actionCondition.getParameterValue(PARAM_KIND)).getLocalName();
  FilePlanComponentKind filePlanComponentKind=filePlanService.getFilePlanComponentKind(actionedUponNodeRef);
  if (filePlanComponentKind != null && filePlanComponentKind.toString().equals(kind)) {
    result=true;
  }
  return result;
}

Fixed version (ground truth):
@Override protected boolean evaluateImpl(ActionCondition actionCondition,NodeRef actionedUponNodeRef){
  boolean result=false;
  String kind=((QName)actionCondition.getParameterValue(PARAM_KIND)).getLocalName();
  FilePlanComponentKind filePlanComponentKind=getFilePlanService().getFilePlanComponentKind(actionedUponNodeRef);
  if (filePlanComponentKind != null && filePlanComponentKind.toString().equals(kind)) {
    result=true;
  }
  return result;
}
Program: 89170
Project: 89170
Buggy source:
@Override public void init(){
  super.init();
  this.mode=CopyMoveLinkFileToActionMode.COPY;
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  setMode(CopyMoveLinkFileToActionMode.COPY);
}
Program: 89171
Project: 89171
Buggy source:
@Override public void init(){
  super.init();
  this.mode=CopyMoveLinkFileToActionMode.MOVE;
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  setMode(CopyMoveLinkFileToActionMode.MOVE);
}
Program: 89172
Project: 89172
Buggy source:
@Override public void init(){
  super.init();
  this.mode=CopyMoveLinkFileToActionMode.LINK;
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  setMode(CopyMoveLinkFileToActionMode.LINK);
}
Program: 89173
Project: 89173
Buggy source:
@Override public void init(){
  super.init();
  this.mode=CopyMoveLinkFileToActionMode.MOVE;
}

Fixed version (ground truth):
@Override public void init(){
  super.init();
  setMode(CopyMoveLinkFileToActionMode.MOVE);
}
Program: 89174
Project: 89174
Buggy source:
/** 
 * @return   audit event label
 */
public String getLabel(){
  String lookup=I18NUtil.getMessage(label);
  if (lookup == null) {
    lookup=label;
  }
  return lookup;
}

Fixed version (ground truth):
/** 
 * @return   audit event label
 */
public String getLabel(){
  String lookup=I18NUtil.getMessage(label);
  if (StringUtils.isBlank(lookup)) {
    lookup=label;
  }
  return lookup;
}
Program: 89175
Project: 89175
Buggy source:
/** 
 * Default constructor.
 * @param name  audit event name
 * @param label audit event label (can be actual label or I18N lookup key)
 */
public AuditEvent(String name,String label){
  ParameterCheck.mandatory("String_Node_Str",name);
  ParameterCheck.mandatory("String_Node_Str",label);
  this.name=name;
  this.label=label;
}

Fixed version (ground truth):
/** 
 * Default constructor.
 * @param name  audit event name
 * @param label audit event label (can be actual label or I18N lookup key)
 */
public AuditEvent(String name,String label){
  ParameterCheck.mandatory("String_Node_Str",name);
  ParameterCheck.mandatory("String_Node_Str",label);
  setName(name);
  setLabel(label);
}
Program: 89176
Project: 89176
Buggy source:
/** 
 * Compare by label.
 * @param compare   compare to audit event
 * @return int      
 */
@Override public int compareTo(AuditEvent compare){
  return getLabel().compareTo(compare.getLabel());
}

Fixed version (ground truth):
/** 
 * Compare by label.
 * @param compare   compare to audit event
 * @return int
 */
@Override public int compareTo(AuditEvent compare){
  return getLabel().compareTo(compare.getLabel());
}
Program: 89177
Project: 89177
Buggy source:
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy#onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,type="String_Node_Str") public void onCreateNode(ChildAssociationRef childAssocRef){
  recordsManagementAuditService.auditEvent(childAssocRef.getChildRef(),name);
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy#onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,type="String_Node_Str") public void onCreateNode(ChildAssociationRef childAssocRef){
  recordsManagementAuditService.auditEvent(childAssocRef.getChildRef(),getName());
}
Program: 89178
Project: 89178
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluateImpl(org.alfresco.service.cmr.repository.NodeRef)
 */
@Override public int evaluateImpl(NodeRef nodeRef){
  int result=AccessDecisionVoter.ACCESS_DENIED;
  for (  Capability capability : capabilities) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + capability.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str"+ name);
    }
    int capabilityResult=capability.evaluate(nodeRef);
    if (capabilityResult != AccessDecisionVoter.ACCESS_DENIED) {
      result=AccessDecisionVoter.ACCESS_ABSTAIN;
      if (!isUndetermined() && capabilityResult == AccessDecisionVoter.ACCESS_GRANTED) {
        result=AccessDecisionVoter.ACCESS_GRANTED;
      }
      break;
    }
 else {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + capability.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str"+ name);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluateImpl(org.alfresco.service.cmr.repository.NodeRef)
 */
@Override public int evaluateImpl(NodeRef nodeRef){
  int result=AccessDecisionVoter.ACCESS_DENIED;
  for (  Capability capability : capabilities) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + capability.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str"+ name);
    }
    int capabilityResult=capability.evaluate(nodeRef);
    if (capabilityResult != AccessDecisionVoter.ACCESS_DENIED) {
      result=AccessDecisionVoter.ACCESS_ABSTAIN;
      if (!isUndetermined() && capabilityResult == AccessDecisionVoter.ACCESS_GRANTED) {
        result=AccessDecisionVoter.ACCESS_GRANTED;
      }
      break;
    }
 else {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + capability.getName() + "String_Node_Str"+ nodeRef.toString()+ "String_Node_Str"+ name);
      }
    }
  }
  return result;
}
Program: 89179
Project: 89179
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluate(org.alfresco.service.cmr.repository.NodeRef)
 */
public int evaluate(NodeRef nodeRef){
  if (nodeRef != null) {
    if (getFilePlanService().isFilePlanComponent(nodeRef)) {
      return checkRmRead(nodeRef);
    }
 else {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + nodeRef.toString() + "String_Node_Str");
      }
    }
  }
  return AccessDecisionVoter.ACCESS_ABSTAIN;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluate(org.alfresco.service.cmr.repository.NodeRef)
 */
public int evaluate(NodeRef nodeRef){
  if (nodeRef != null) {
    if (getFilePlanService().isFilePlanComponent(nodeRef)) {
      return checkRmRead(nodeRef);
    }
 else {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("String_Node_Str" + nodeRef.toString() + "String_Node_Str");
      }
    }
  }
  return AccessDecisionVoter.ACCESS_ABSTAIN;
}
Program: 89180
Project: 89180
Buggy source:
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy#onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,notificationFrequency=NotificationFrequency.TRANSACTION_COMMIT) public void onCreateNode(final ChildAssociationRef childAssocRef){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str");
  }
  AuthenticationUtil.runAsSystem(new RunAsWork<Void>(){
    @Override public Void doWork(){
      filePlanPermissionService.setupRecordCategoryPermissions(childAssocRef.getChildRef());
      return null;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy#onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,notificationFrequency=NotificationFrequency.TRANSACTION_COMMIT) public void onCreateNode(final ChildAssociationRef childAssocRef){
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str");
  }
  AuthenticationUtil.runAsSystem(new RunAsWork<Void>(){
    @Override public Void doWork(){
      filePlanPermissionService.setupRecordCategoryPermissions(childAssocRef.getChildRef());
      return null;
    }
  }
);
}
Program: 89181
Project: 89181
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatch#apply()
 */
@Override public void apply(){
  if (logger.isInfoEnabled()) {
    logger.info("String_Node_Str" + description + "String_Node_Str");
  }
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + id + "String_Node_Str"+ moduleId+ "String_Node_Str"+ fixesFromSchema+ "String_Node_Str"+ fixesToSchema+ "String_Node_Str"+ targetSchema);
  }
  transactionService.getRetryingTransactionHelper().doInTransaction(new ApplyCallback(),true,false);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatch#apply()
 */
@Override public void apply(){
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("String_Node_Str" + description + "String_Node_Str");
  }
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + id + "String_Node_Str"+ moduleId+ "String_Node_Str"+ fixesFromSchema+ "String_Node_Str"+ fixesToSchema+ "String_Node_Str"+ targetSchema);
  }
  transactionService.getRetryingTransactionHelper().doInTransaction(new ApplyCallback(),true,false);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str");
  }
}
Program: 89182
Project: 89182
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executeInternal(){
  int currentSchema=getCurrentSchema();
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + currentSchema + "String_Node_Str"+ moduleSchema+ "String_Node_Str");
  }
  if (moduleSchema > currentSchema) {
    List<ModulePatch> patchesToApply=new ArrayList<ModulePatch>(13);
    for (    ModulePatch modulePatch : modulePatches.values()) {
      if (modulePatch.getFixesFromSchema() <= currentSchema && modulePatch.getFixesToSchema() >= currentSchema) {
        patchesToApply.add(modulePatch);
      }
    }
    Collections.sort(patchesToApply);
    for (    ModulePatch patchToApply : patchesToApply) {
      patchToApply.apply();
    }
    updateSchema(moduleSchema);
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executeInternal(){
  int currentSchema=getCurrentSchema();
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + currentSchema + "String_Node_Str"+ moduleSchema+ "String_Node_Str");
  }
  if (moduleSchema > currentSchema) {
    List<ModulePatch> patchesToApply=new ArrayList<ModulePatch>(13);
    for (    ModulePatch modulePatch : modulePatches.values()) {
      if (modulePatch.getFixesFromSchema() <= currentSchema && modulePatch.getFixesToSchema() >= currentSchema) {
        patchesToApply.add(modulePatch);
      }
    }
    Collections.sort(patchesToApply);
    for (    ModulePatch patchToApply : patchesToApply) {
      patchToApply.apply();
    }
    updateSchema(moduleSchema);
  }
}
Program: 89183
Project: 89183
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchExecuter#register(org.alfresco.module.org_alfresco_module_rm.patch.ModulePatch)
 */
@Override public void register(ModulePatch modulePatch){
  if (!getModuleId().equals(modulePatch.getModuleId())) {
    throw new AlfrescoRuntimeException("String_Node_Str");
  }
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + modulePatch.getId() + "String_Node_Str"+ getModuleId());
  }
  modulePatches.put(modulePatch.getId(),modulePatch);
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchExecuter#register(org.alfresco.module.org_alfresco_module_rm.patch.ModulePatch)
 */
@Override public void register(ModulePatch modulePatch){
  if (!getModuleId().equals(modulePatch.getModuleId())) {
    throw new AlfrescoRuntimeException("String_Node_Str");
  }
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + modulePatch.getId() + "String_Node_Str"+ getModuleId());
  }
  modulePatches.put(modulePatch.getId(),modulePatch);
}
Program: 89184
Project: 89184
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.AbstractModulePatch#applyInternal()
 */
@Override public void applyInternal(){
  Set<NodeRef> filePlans=getFilePlans();
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + filePlan.toString());
    }
    applyCapabilityPatch(filePlan);
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.patch.AbstractModulePatch#applyInternal()
 */
@Override public void applyInternal(){
  Set<NodeRef> filePlans=getFilePlans();
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str" + filePlans.size() + "String_Node_Str");
  }
  for (  NodeRef filePlan : filePlans) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + filePlan.toString());
    }
    applyCapabilityPatch(filePlan);
  }
}