<commit_before>class Role < ActiveRecord::Base
  attr_accessible :name, :title, :user_id

  belongs_to :project
  belongs_to :user

  validates_length_of :title, :within => 3..255, :too_short => I18n.t("validations.length.short", :attr => I18n.t("validations.attr.role_title"), :count => "%{count}"), :too_long => I18n.t("validations.length.long", :attr => I18n.t("validations.attr.role_title"), :count => "%{count}")
  validates_length_of :name, :within => 3..255, :too_short => I18n.t("validations.length.short", :attr => I18n.t("validations.attr.role_name"), :count => "%{count}"), :too_long => I18n.t("validations.length.long", :attr => I18n.t("validations.attr.role_name"), :count => "%{count}")
end
<commit_msg>try to fix a bug on production (user roles without name)<commit_after>class Role < ActiveRecord::Base
  attr_accessible :name, :title, :user_id

  belongs_to :project
  belongs_to :user

  validates_length_of :title, :within => 3..255, :too_short => I18n.t("validations.length.short", :attr => I18n.t("validations.attr.role_title"), :count => "%{count}"), :too_long => I18n.t("validations.length.long", :attr => I18n.t("validations.attr.role_title"), :count => "%{count}")
  validates_length_of :name, :within => 3..255, :too_short => I18n.t("validations.length.short", :attr => I18n.t("validations.attr.role_name"), :count => "%{count}"), :too_long => I18n.t("validations.length.long", :attr => I18n.t("validations.attr.role_name"), :count => "%{count}"), :allow_nil => true
end

{'fraction_non_alphanumeric': 0.20574482297929192, 'fraction_numerical': 0.03206412825651302, 'mean_word_length': 6.066037735849057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '2835586', 'n_tokens_mistral': 572, 'n_tokens_neox': 539, 'n_words': 100}