<commit_before>class ReviewMappingController < ApplicationController
  auto_complete_for :user, :name
  use_google_charts
  
  def auto_complete_for_user_name
    name = params[:user][:name]+"%"
    puts "************"
    puts session[:contributor]    
    puts "************"
    assignment_id = session[:contributor].parent_id
    @users = User.find(:all, :include => :participants, 
      :conditions => ['participants.type = "AssignmentParticipant" and users.name like ? and participants.parent_id = ?',name,assignment_id], 
      :order => 'name') 

    render :inline => "<%= auto_complete_result @users, 'name' %>", :layout => false
  end
  
  def select_reviewer
    assignment = Assignment.find(params[:id])     
    @contributor = assignment.get_contributor(params[:contributor_id])
    session[:contributor] = @contributor
  end
  
  def select_metareviewer
    @mapping = ResponseMap.find(params[:id])    <commit_msg>Removed or commented debug statements. These only server during debug points and can cause unnecessary expansion of the log size.<commit_after>class ReviewMappingController < ApplicationController
  auto_complete_for :user, :name
  use_google_charts
  
  def auto_complete_for_user_name
    name = params[:user][:name]+"%"
    assignment_id = session[:contributor].parent_id
    @users = User.find(:all, :include => :participants, 
      :conditions => ['participants.type = "AssignmentParticipant" and users.name like ? and participants.parent_id = ?',name,assignment_id], 
      :order => 'name') 

    render :inline => "<%= auto_complete_result @users, 'name' %>", :layout => false
  end
  
  def select_reviewer
    assignment = Assignment.find(params[:id])     
    @contributor = assignment.get_contributor(params[:contributor_id])
    session[:contributor] = @contributor
  end
  
  def select_metareviewer
    @mapping = ResponseMap.find(params[:id])    
{'fraction_non_alphanumeric': 0.12836767036450078, 'fraction_numerical': 0.0, 'mean_word_length': 4.380681818181818, 'pattern_counts': {'":': 0, '<': 7, '<?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': '923544', 'n_tokens_mistral': 576, 'n_tokens_neox': 553, 'n_words': 121}