<commit_before>class PracticePhoneNumber < ActiveRecord::Base
  include Rails.application.routes.url_helpers

  before_create :purchase_phone_number!
  after_commit :update_phone_number_with_url!
  before_destroy :return_phone_number!

  validates :name, presence: true
  validates :owner, presence: true
  validate :users_includes_owner

  belongs_to :owner, class_name: "User"
  has_many :user_practice_phone_numbers, inverse_of: :practice_phone_number
  has_many :users, through: :user_practice_phone_numbers, inverse_of: :practice_phone_numbers
  has_many :scenarios

  def purchase_phone_number!<commit_msg>fix method name<commit_after>class PracticePhoneNumber < ActiveRecord::Base
  include Rails.application.routes.url_helpers

  before_create :purchase_phone_number!
  after_commit :update_phone_number!
  before_destroy :return_phone_number!

  validates :name, presence: true
  validates :owner, presence: true
  validate :users_includes_owner

  belongs_to :owner, class_name: "User"
  has_many :user_practice_phone_numbers, inverse_of: :practice_phone_number
  has_many :users, through: :user_practice_phone_numbers, inverse_of: :practice_phone_numbers
  has_many :scenarios

  def purchase_phone_number!
{'fraction_non_alphanumeric': 0.0657354149548069, 'fraction_numerical': 0.0, 'mean_word_length': 7.5174825174825175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2213589', 'n_tokens_mistral': 401, 'n_tokens_neox': 374, 'n_words': 79}