Program: 89373
Project: 89373
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(Action action,NodeRef actionedUponNodeRef){
  NodeRef nextDispositionActionNodeRef=getNextDispostionAction(actionedUponNodeRef);
  boolean checkError=true;
  Boolean checkErrorValue=(Boolean)action.getParameterValue(PARAM_NO_ERROR_CHECK);
  if (checkErrorValue != null) {
    checkError=checkErrorValue.booleanValue();
  }
  DispositionSchedule di=checkDispositionActionExecutionValidity(actionedUponNodeRef,nextDispositionActionNodeRef,checkError);
  if (di != null) {
    if (checkEligibility(actionedUponNodeRef) == false || dispositionService.isNextDispositionActionEligible(actionedUponNodeRef) == true) {
      if (di.isRecordLevelDisposition() == true) {
        if (recordService.isRecord(actionedUponNodeRef) == true) {
          if (recordService.isDeclared(actionedUponNodeRef) == true) {
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_AT,new Date());
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_BY,AuthenticationUtil.getRunAsUser());
            executeRecordLevelDisposition(action,actionedUponNodeRef);
            if (nodeService.exists(nextDispositionActionNodeRef) == true && getSetDispositionActionComplete() == true) {
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_AT,new Date());
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_BY,AuthenticationUtil.getRunAsUser());
            }
          }
 else {
            throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_RECORD_NOT_DECLARED,getName(),actionedUponNodeRef.toString()));
          }
        }
 else {
          throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_EXPECTED_RECORD_LEVEL,getName(),actionedUponNodeRef.toString()));
        }
      }
 else {
        if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true) {
          if (recordFolderService.isRecordFolderDeclared(actionedUponNodeRef) == true) {
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_AT,new Date());
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_BY,AuthenticationUtil.getRunAsUser());
            executeRecordFolderLevelDisposition(action,actionedUponNodeRef);
            if (nodeService.exists(nextDispositionActionNodeRef) == true && getSetDispositionActionComplete() == true) {
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_AT,new Date());
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_BY,AuthenticationUtil.getRunAsUser());
            }
          }
 else {
            throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_ALL_RECORDS_DECLARED,getName(),actionedUponNodeRef.toString()));
          }
        }
 else {
          throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_RECORD_FOLDER,getName(),actionedUponNodeRef.toString()));
        }
      }
      if (nodeService.exists(actionedUponNodeRef) == true && getSetDispositionActionComplete() == true) {
        dispositionService.updateNextDispositionAction(actionedUponNodeRef);
      }
    }
 else {
      throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_ELIGIBLE,getName(),actionedUponNodeRef.toString()));
    }
  }
}

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(Action action,NodeRef actionedUponNodeRef){
  NodeRef nextDispositionActionNodeRef=getNextDispostionAction(actionedUponNodeRef);
  boolean checkError=true;
  Boolean checkErrorValue=(Boolean)action.getParameterValue(PARAM_NO_ERROR_CHECK);
  if (checkErrorValue != null) {
    checkError=checkErrorValue.booleanValue();
  }
  DispositionSchedule di=checkDispositionActionExecutionValidity(actionedUponNodeRef,nextDispositionActionNodeRef,checkError);
  if (di != null) {
    if (checkEligibility(actionedUponNodeRef) == false || dispositionService.isNextDispositionActionEligible(actionedUponNodeRef)) {
      if (di.isRecordLevelDisposition()) {
        if (recordService.isRecord(actionedUponNodeRef)) {
          if (recordService.isDeclared(actionedUponNodeRef)) {
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_AT,new Date());
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_BY,AuthenticationUtil.getRunAsUser());
            executeRecordLevelDisposition(action,actionedUponNodeRef);
            if (nodeService.exists(nextDispositionActionNodeRef) && getSetDispositionActionComplete()) {
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_AT,new Date());
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_BY,AuthenticationUtil.getRunAsUser());
            }
          }
 else {
            throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_RECORD_NOT_DECLARED,getName(),actionedUponNodeRef.toString()));
          }
        }
 else {
          throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_EXPECTED_RECORD_LEVEL,getName(),actionedUponNodeRef.toString()));
        }
      }
 else {
        if (recordFolderService.isRecordFolder(actionedUponNodeRef)) {
          if (recordFolderService.isRecordFolderDeclared(actionedUponNodeRef)) {
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_AT,new Date());
            nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_STARTED_BY,AuthenticationUtil.getRunAsUser());
            executeRecordFolderLevelDisposition(action,actionedUponNodeRef);
            if (nodeService.exists(nextDispositionActionNodeRef) && getSetDispositionActionComplete()) {
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_AT,new Date());
              nodeService.setProperty(nextDispositionActionNodeRef,PROP_DISPOSITION_ACTION_COMPLETED_BY,AuthenticationUtil.getRunAsUser());
            }
          }
 else {
            throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_ALL_RECORDS_DECLARED,getName(),actionedUponNodeRef.toString()));
          }
        }
 else {
          throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_RECORD_FOLDER,getName(),actionedUponNodeRef.toString()));
        }
      }
      if (nodeService.exists(actionedUponNodeRef) && getSetDispositionActionComplete()) {
        dispositionService.updateNextDispositionAction(actionedUponNodeRef);
      }
    }
 else {
      throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_ELIGIBLE,getName(),actionedUponNodeRef.toString()));
    }
  }
}