Program: 89241
Project: 89241
Buggy source:
/** 
 * @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,org.alfresco.service.cmr.repository.NodeRef)
 */
@Override protected void executeImpl(final Action action,final NodeRef actionedUponNodeRef){
  String actionName=action.getActionDefinitionName();
  if (isOkToProceedWithAction(actionedUponNodeRef,actionName)) {
    QName actionedUponType=nodeService.getType(actionedUponNodeRef);
    ;
    boolean targetIsUnfiledRecords;
    if (ACTION_FILETO.equals(action.getActionDefinitionName())) {
      targetIsUnfiledRecords=false;
    }
 else {
      targetIsUnfiledRecords=(dictionaryService.isSubClass(actionedUponType,ContentModel.TYPE_CONTENT) && !recordService.isFiled(actionedUponNodeRef)) || TYPE_UNFILED_RECORD_FOLDER.equals(actionedUponType);
    }
    NodeRef recordFolder=(NodeRef)action.getParameterValue(PARAM_DESTINATION_RECORD_FOLDER);
    if (recordFolder == null) {
      recordFolder=createOrResolvePath(action,actionedUponNodeRef,targetIsUnfiledRecords);
    }
    validateActionPostPathResolution(actionedUponNodeRef,recordFolder,actionName,targetIsUnfiledRecords);
    final NodeRef finalRecordFolder=recordFolder;
    AuthenticationUtil.runAsSystem(new RunAsWork<Void>(){
      @Override public Void doWork() throws Exception {
        try {
          if (mode == CopyMoveLinkFileToActionMode.MOVE) {
            fileFolderService.move(actionedUponNodeRef,finalRecordFolder,null);
          }
 else           if (mode == CopyMoveLinkFileToActionMode.COPY) {
            fileFolderService.copy(actionedUponNodeRef,finalRecordFolder,null);
          }
 else           if (mode == CopyMoveLinkFileToActionMode.LINK) {
            recordService.link(actionedUponNodeRef,finalRecordFolder);
          }
        }
 catch (        FileNotFoundException fileNotFound) {
          throw new AlfrescoRuntimeException("String_Node_Str" + (mode == CopyMoveLinkFileToActionMode.MOVE ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",fileNotFound);
        }
        return null;
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,org.alfresco.service.cmr.repository.NodeRef)
 */
@Override protected void executeImpl(final Action action,final NodeRef actionedUponNodeRef){
  String actionName=action.getActionDefinitionName();
  if (isOkToProceedWithAction(actionedUponNodeRef,actionName)) {
    QName actionedUponType=nodeService.getType(actionedUponNodeRef);
    boolean targetIsUnfiledRecords;
    if (ACTION_FILETO.equals(action.getActionDefinitionName())) {
      targetIsUnfiledRecords=false;
    }
 else {
      targetIsUnfiledRecords=(dictionaryService.isSubClass(actionedUponType,ContentModel.TYPE_CONTENT) && !recordService.isFiled(actionedUponNodeRef)) || TYPE_UNFILED_RECORD_FOLDER.equals(actionedUponType);
    }
    NodeRef recordFolder=(NodeRef)action.getParameterValue(PARAM_DESTINATION_RECORD_FOLDER);
    if (recordFolder == null) {
      recordFolder=createOrResolvePath(action,actionedUponNodeRef,targetIsUnfiledRecords);
    }
    validateActionPostPathResolution(actionedUponNodeRef,recordFolder,actionName,targetIsUnfiledRecords);
    final NodeRef finalRecordFolder=recordFolder;
    AuthenticationUtil.runAsSystem(new RunAsWork<Void>(){
      @Override public Void doWork() throws Exception {
        try {
          if (mode == CopyMoveLinkFileToActionMode.MOVE) {
            fileFolderService.move(actionedUponNodeRef,finalRecordFolder,null);
          }
 else           if (mode == CopyMoveLinkFileToActionMode.COPY) {
            fileFolderService.copy(actionedUponNodeRef,finalRecordFolder,null);
          }
 else           if (mode == CopyMoveLinkFileToActionMode.LINK) {
            recordService.link(actionedUponNodeRef,finalRecordFolder);
          }
        }
 catch (        FileNotFoundException fileNotFound) {
          throw new AlfrescoRuntimeException("String_Node_Str" + (mode == CopyMoveLinkFileToActionMode.MOVE ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",fileNotFound);
        }
        return null;
      }
    }
);
  }
}