<commit_before>class MiqProvisionRequestTemplate < MiqProvisionRequest

  def create_tasks_for_service(service_task, parent_svc)

    template_service_resource = ServiceResource.find_by_id(service_task.options[:service_resource_id])
    scaling_min = template_service_resource.nil? ? 1 : template_service_resource.scaling_min

    tasks = []
    0.upto(scaling_min - 1).each do |idx|

      task = self.create_request_task(idx)
      task.options[:miq_force_unique_name] = [true, 1]
      task.options[:service_guid] = parent_svc.guid
      task.options[:service_resource_id] = template_service_resource.id
      task.options[:service_template_request] = false
      task.userid = service_task.userid
      user = User.find_by_userid(task.userid)
      unless user.nil?
        task.options[:owner_email]      = user.email
        task.options[:owner_first_name] = user.first_name
        task.options[:owner_last_name]  = user.last_name
      end
      task.save!
      task.after_request_task_create
      service_task.miq_request.miq_request_tasks << task<commit_msg>Removed an extra call to after_request_task_create<commit_after>class MiqProvisionRequestTemplate < MiqProvisionRequest

  def create_tasks_for_service(service_task, parent_svc)

    template_service_resource = ServiceResource.find_by_id(service_task.options[:service_resource_id])
    scaling_min = template_service_resource.nil? ? 1 : template_service_resource.scaling_min

    tasks = []
    0.upto(scaling_min - 1).each do |idx|

      task = self.create_request_task(idx)
      task.options[:miq_force_unique_name] = [true, 1]
      task.options[:service_guid] = parent_svc.guid
      task.options[:service_resource_id] = template_service_resource.id
      task.options[:service_template_request] = false
      task.userid = service_task.userid
      user = User.find_by_userid(task.userid)
      unless user.nil?
        task.options[:owner_email]      = user.email
        task.options[:owner_first_name] = user.first_name
        task.options[:owner_last_name]  = user.last_name
      end
      task.save!
      service_task.miq_request.miq_request_tasks << task
{'fraction_non_alphanumeric': 0.0883177570093458, 'fraction_numerical': 0.003738317757009346, 'mean_word_length': 3.9790697674418603, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '7314342', 'n_tokens_mistral': 688, 'n_tokens_neox': 669, 'n_words': 93}