<commit_before>module CopyMove
  module Model
    def new_slug_and_title_under(parent)
      test_page = self.clone
      test_page.parent = parent
      until test_page.valid?
        index = (index || 0) + 1
        test_page.title = "#{title} (Copy#{' '+index if index > 1})"
        test_page.slug = "#{slug}-#{index}"
      end
      {:slug => test_page.slug, :title => test_page.title}
    end<commit_msg>fixing TypeError (can't convert Fixnum into String)<commit_after>module CopyMove
  module Model
    def new_slug_and_title_under(parent)
      test_page = self.clone
      test_page.parent = parent
      until test_page.valid?
        index = (index.to_i || 0) + 1
        test_page.title = "#{title} (Copy#{' '+index if index > 1})"
        test_page.slug = "#{slug}-#{index}"
      end
      {:slug => test_page.slug, :title => test_page.title}
    end
{'fraction_non_alphanumeric': 0.13179190751445086, 'fraction_numerical': 0.006936416184971098, 'mean_word_length': 2.7327586206896552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3062595', 'n_tokens_mistral': 294, 'n_tokens_neox': 295, 'n_words': 67}