<commit_before>def print_backtrace
  raise 'foo'
rescue => exp
  puts exp.backtrace[1..-1].join("\n")
end

def raise_backtrace
  raise 'foo'
rescue => exp
  raise exp.backtrace[1..35].join("\n")
end

class Symbol
  def split(*args)
    raise_backtrace
  end
end

class SessionsController < Devise::SessionsController
  def index
    render :text => "Sup Index"
  end
  def show
    render :text => "Sup Show"
  end

  before_filter "setup_user_params!"

  def setup_user_params!
    if params[:email]
      params[:user] ||= {}
      params[:user][:email] ||= params[:email]
      params[:user][:password] ||= params[:password]
    end
  end
  def create
    puts "here in session create"
    authenticate_user!
    resource = current_user
    #raise "no user" unless current_user
    if current_user
      puts "login success"
      render :json => {:auth_token => current_user.authentication_token, :user_id => current_user.id, :success => true}
      #:redirect => stored_location_for(scope) || after_sign_in_path_for(current_user)}
    else
      puts "login fail"
      render :json => {:status => "error", :email => params[:user].andand[:email], :password => params[:user].andand[:password]}
    end
  end

  def destroy
    raise "no user" unless current_user
    #raise "emails don't match" unless current_user.email == params[:user][:email]
    puts "logging out #{current_user.email} | #{params.inspect}"
    res = sign_out current_user
    puts "current_user after sign out | #{res.inspect} | #{current_user.inspect}"
    render :json => {:success => true}
  end
 
  def failure
    raise 'in failure'
    return render:json => {:success => false, :errors => ["Login failed."]}
  end

  def options
    head :ok
  end
end<commit_msg>remove log prints<commit_after>def print_backtrace
  raise 'foo'
rescue => exp
  puts exp.backtrace[1..-1].join("\n")
end

def raise_backtrace
  raise 'foo'
rescue => exp
  raise exp.backtrace[1..35].join("\n")
end

class Symbol
  def split(*args)
    raise_backtrace
  end
end

class SessionsController < Devise::SessionsController
  def index
    render :text => "Sup Index"
  end
  def show
    render :text => "Sup Show"
  end

  before_filter "setup_user_params!"

  def setup_user_params!
    if params[:email]
      params[:user] ||= {}
      params[:user][:email] ||= params[:email]
      params[:user][:password] ||= params[:password]
    end
  end
  def create
    #puts "here in session create"
    authenticate_user!
    resource = current_user
    #raise "no user" unless current_user
    if current_user
      #puts "login success"
      render :json => {:auth_token => current_user.authentication_token, :user_id => current_user.id, :success => true}
      #:redirect => stored_location_for(scope) || after_sign_in_path_for(current_user)}
    else
      #puts "login fail"
      render :json => {:status => "error", :email => params[:user].andand[:email], :password => <PASSWORD>[:<PASSWORD>].andand[:password]}
    end
  end

  def destroy
    raise "no user" unless current_user
    #raise "emails don't match" unless current_user.email == params[:user][:email]
    #puts "logging out #{current_user.email} | #{params.inspect}"
    res = sign_out current_user
    #puts "current_user after sign out | #{res.inspect} | #{current_user.inspect}"
    render :json => {:success => true}
  end
 
  def failure
    raise 'in failure'
    return render:json => {:success => false, :errors => ["Login failed."]}
  end

  def options
    head :ok
  end
end
{'fraction_non_alphanumeric': 0.13259195893926431, 'fraction_numerical': 0.00285143997718848, 'mean_word_length': 3.5264516129032257, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 41, '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': '3937859', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1117, 'n_words': 307}