<commit_before>module ArchivedMixin
  extend ActiveSupport::Concern

  included do
    scope :deleted, -> { where(:deleted => true) }
    scope :not_deleted, -> { where(:deleted => false) }

    belongs_to :old_ext_management_system, :foreign_key => :old_ems_id, :class_name => 'ExtManagementSystem'
  end

  def archived?
    ems_id.nil?
  end

  # Needed for metrics
  def my_zone
    if ext_management_system.present?
      ext_management_system.my_zone
    elsif old_ext_management_system.present?
      # Archived container entities need to retain their zone for metric collection
      # This makes the association more complex and might need a performance fix
      old_ext_management_system.my_zone
    end
  end
end
<commit_msg>Alias archived? to deleted?<commit_after>module ArchivedMixin
  extend ActiveSupport::Concern

  included do
    scope :deleted, -> { where(:deleted => true) }
    scope :not_deleted, -> { where(:deleted => false) }

    belongs_to :old_ext_management_system, :foreign_key => :old_ems_id, :class_name => 'ExtManagementSystem'
  end

  def archived?
    deleted?
  end

  # Needed for metrics
  def my_zone
    if ext_management_system.present?
      ext_management_system.my_zone
    elsif old_ext_management_system.present?
      # Archived container entities need to retain their zone for metric collection
      # This makes the association more complex and might need a performance fix
      old_ext_management_system.my_zone
    end
  end
end

{'fraction_non_alphanumeric': 0.06936026936026936, 'fraction_numerical': 0.0, 'mean_word_length': 3.7781350482315115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '109775', 'n_tokens_mistral': 444, 'n_tokens_neox': 441, 'n_words': 127}