<commit_before>class InitController < ApplicationController

  def index
    #if the session is new
    if session[:main_route] == nil
     # initialize route
      @route = Route.new()
      session[:main_route] = @route.id
    else
      route_id = session[:main_route]
      @route = Route.find(route_id)
    end
    
    respond_to do |format|
      format.html
      format.xml  { render :xml }
    end
  end<commit_msg>bug with route creation<commit_after>class InitController < ApplicationController

  def index
    #if the session is new
    if session[:main_route] == nil
     # initialize route
      @route = Route.create()
      session[:main_route] = @route.id
    else
      route_id = session[:main_route]
      @route = Route.find(route_id)
    end
    
    respond_to do |format|
      format.html
      format.xml  { render :xml }
    end
  end
{'fraction_non_alphanumeric': 0.0880648899188876, 'fraction_numerical': 0.0, 'mean_word_length': 2.456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '7245667', 'n_tokens_mistral': 262, 'n_tokens_neox': 259, 'n_words': 70}