<commit_before>class Member < ActiveRecord::Base
  require 'digest/md5'
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable, :authentication_keys => [:login]

  attr_accessible :username, :email, :password, :password_confirmation, :remember_me

  attr_accessor :login

  attr_accessible :login

  def self.find_first_by_auth_conditions(warden_conditions)
	conditions = warden_conditions.dup
	if login = conditions.delete(:login)
	  where(conditions).where(["username = :value OR lower(email) = lower(:value)", { :value => login }]).first
	else
	  where(conditions).first
	end
  end

  # validation for username
  validates :username,
            :uniqueness => {
            :case_sensitive => false
            }

  # add gravatar profile image
  include Gravtastic
  gravtastic  :secure => TRUE,
              :default => "identicon",
              :size => 120

end
<commit_msg>fixed username cannot be blank<commit_after>class Member < ActiveRecord::Base
  require 'digest/md5'
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable, :authentication_keys => [:login]

  attr_accessible :username, :email, :password, :password_confirmation, :remember_me

  attr_accessor :login

  attr_accessible :login

  def self.find_first_by_auth_conditions(warden_conditions)
	conditions = warden_conditions.dup
	if login = conditions.delete(:login)
	  where(conditions).where(["username = :value OR lower(email) = lower(:value)", { :value => login }]).first
	else
	  where(conditions).first
	end
  end

  # validation for username
  validates :username,
            :presence => TRUE,
            :uniqueness => {
            :case_sensitive => false
            }

  # add gravatar profile image
  include Gravtastic
  gravtastic  :secure => TRUE,
              :default => "identicon",
              :size => 120

end

{'fraction_non_alphanumeric': 0.10332434860736747, 'fraction_numerical': 0.0035938903863432167, 'mean_word_length': 3.69831223628692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '4360387', 'n_tokens_mistral': 679, 'n_tokens_neox': 632, 'n_words': 163}