<commit_before>module OsApiActionators
  def list_actionators(service)
    if service.is_a?(Hash)
      SoftwareServiceDefinition.software_service_definition(service)
    else
      service_def = SoftwareServiceDefinition.find(service.type_path,service.publisher_namespace)
    end
   
     unless service_def.is_a?(Hash)
       log_error_mesg('list_actionators not a service def ',service_def)
       return []
  end
    unless service_def.key?(:actionators)
      log_error_mesg('list_actionators no actionators',service_def)
      return []
    end
     unless service_def[:actionators].is_a?(Array)
       log_error_mesg('list_actionators not an array',service_def[:actionators])
         retval =[]
           retval.push(service_def[:actionators])
       return retval
     end
    SystemDebug.debug(SystemDebug.actions,service,service_def[:actionators],service_def)
    return service_def[:actionators]
      
    rescue StandardError => e
        log_exception_and_fail('list_actionators', e)
  end
  
  def perform_service_action(service_name,actionator_name,params)
    SystemDebug.debug(SystemDebug.actions,service_name,actionator_name,params)
   return EnginesOSapiResult.failed('list_actionators' + service_name,params.to_s ,actionator_name)
    rescue StandardError => e
        log_exception_and_fail('perform_service_action', e)
  end
  
end<commit_msg>as hash no as array<commit_after>module OsApiActionators
  def list_actionators(service)
    if service.is_a?(Hash)
      SoftwareServiceDefinition.software_service_definition(service)
    else
      service_def = SoftwareServiceDefinition.find(service.type_path,service.publisher_namespace)
    end
   
     unless service_def.is_a?(Hash)
       log_error_mesg('list_actionators not a service def ',service_def)
       return []
  end
    unless service_def.key?(:actionators)
      log_error_mesg('list_actionators no actionators',service_def)
      return []
    end
     unless service_def[:actionators].is_a?(Array)
       return service_def[:actionators]
     end
    SystemDebug.debug(SystemDebug.actions,service,service_def[:actionators],service_def)
    return service_def[:actionators]
      
    rescue StandardError => e
        log_exception_and_fail('list_actionators', e)
  end
  
  def perform_service_action(service_name,actionator_name,params)
    SystemDebug.debug(SystemDebug.actions,service_name,actionator_name,params)
   return EnginesOSapiResult.failed('list_actionators' + service_name,params.to_s ,actionator_name)
    rescue StandardError => e
        log_exception_and_fail('perform_service_action', e)
  end
  
end
{'fraction_non_alphanumeric': 0.08116385911179173, 'fraction_numerical': 0.0, 'mean_word_length': 4.421161825726141, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7245869', 'n_tokens_mistral': 775, 'n_tokens_neox': 783, 'n_words': 121}