<commit_before>class LoggedOutUser
  include AvatarInitials
  attr_accessor :name, :email, :avatar_initials
  alias :read_attribute_for_serialization :send

  def initialize(name: nil, email: nil)
    @name = name
    @email = email
    set_avatar_initials if (@name || @email)
  end

  NIL_METHODS   = [:id, :key, :username, :avatar_url, :selected_locale, :deactivated_at, :time_zone]
  FALSE_METHODS = [:is_logged_in?, :uses_markdown?, :is_organisation_coordinator?, :belongs_to_manual_subscription_group?,
                   :email_when_proposal_closing_soon, :email_missed_yesterday, :email_when_mentioned, :email_on_participation]
  EMPTY_METHODS = [:groups, :group_ids, :adminable_group_ids]
  TRUE_METHODS  = [:is_logged_out?]

  NIL_METHODS.each   { |method| define_method(method, -> { nil }) }
  FALSE_METHODS.each { |method| define_method(method, -> { false }) }
  EMPTY_METHODS.each { |method| define_method(method, -> { [] }) }
  TRUE_METHODS.each  { |method| define_method(method, -> { true }) }

  def angular_ui_enabled
    false
  end
  alias :angular_ui_enabled? :angular_ui_enabled

  def votes
    Vote.none
  end

  def locale
    I18n.default_locale
  end

  def avatar_url(size)
    nil
  end

  def avatar_kind
    'initials'
  end

  def is_member_of?(group)
    false
  end

  def can?(*args)
    false
  end

  def ability
    @ability ||= Ability.new(self)
  end<commit_msg>Add empty memberships to LoggedOutUser<commit_after>class LoggedOutUser
  include AvatarInitials
  attr_accessor :name, :email, :avatar_initials
  alias :read_attribute_for_serialization :send

  def initialize(name: nil, email: nil)
    @name = name
    @email = email
    set_avatar_initials if (@name || @email)
  end

  NIL_METHODS   = [:id, :key, :username, :avatar_url, :selected_locale, :deactivated_at, :time_zone]
  FALSE_METHODS = [:is_logged_in?, :uses_markdown?, :is_organisation_coordinator?, :belongs_to_manual_subscription_group?,
                   :email_when_proposal_closing_soon, :email_missed_yesterday, :email_when_mentioned, :email_on_participation]
  EMPTY_METHODS = [:groups, :group_ids, :adminable_group_ids]
  TRUE_METHODS  = [:is_logged_out?]

  NIL_METHODS.each   { |method| define_method(method, -> { nil }) }
  FALSE_METHODS.each { |method| define_method(method, -> { false }) }
  EMPTY_METHODS.each { |method| define_method(method, -> { [] }) }
  TRUE_METHODS.each  { |method| define_method(method, -> { true }) }

  def angular_ui_enabled
    false
  end
  alias :angular_ui_enabled? :angular_ui_enabled

  def votes
    Vote.none
  end

  def memberships
    Membership.none
  end

  def locale
    I18n.default_locale
  end

  def avatar_url(size)
    nil
  end

  def avatar_kind
    'initials'
  end

  def is_member_of?(group)
    false
  end

  def can?(*args)
    false
  end

  def ability
    @ability ||= Ability.new(self)
  end
{'fraction_non_alphanumeric': 0.10410863509749303, 'fraction_numerical': 0.001392757660167131, 'mean_word_length': 3.9965217391304346, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7222096', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1020, 'n_words': 205}