<commit_before>class LinkedCloneVisibilityService
  def determine_visibility(provision_type, linked_clone, snapshot_count)
    field_names_to_show = []
    field_names_to_hide = []

    if provision_type.to_s == 'vmware' && snapshot_count > 0
      field_names_to_show += [:linked_clone]
      if linked_clone == true
        field_names_to_show += [:snapshot]
      else
        field_names_to_hide += [:snapshot]
      end
    else
      field_names_to_hide += [:linked_clone, :snapshot]
    end

    {:hide => field_names_to_hide, :show => field_names_to_show}
  end
end
<commit_msg>Utilize 'show' for linked_clone field to allow it to be disabled (transferred from ManageIQ/manageiq@<PASSWORD>)<commit_after>class LinkedCloneVisibilityService
  def determine_visibility(provision_type, linked_clone, snapshot_count)
    field_names_to_show = []
    field_names_to_edit = []
    field_names_to_hide = []

    if provision_type.to_s == 'vmware'
      if snapshot_count > 0
        field_names_to_edit += [:linked_clone]
      else
        field_names_to_show += [:linked_clone]
      end

      if linked_clone == true
        field_names_to_edit += [:snapshot]
      else
        field_names_to_hide += [:snapshot]
      end
    else
      field_names_to_hide += [:linked_clone, :snapshot]
    end

    {:hide => field_names_to_hide, :edit => field_names_to_edit, :show => field_names_to_show}
  end
end

{'fraction_non_alphanumeric': 0.08955223880597014, 'fraction_numerical': 0.0014214641080312722, 'mean_word_length': 3.527331189710611, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, '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': '817497', 'n_tokens_mistral': 468, 'n_tokens_neox': 464, 'n_words': 91}