<commit_before>module ApplicationHelper

  def admin?
    current_user.try(:admin?)
  end

  def context_pane
    if params[:controller] == 'home'
      return 'shared/user_ontologies'
    end

    if params[:action] != 'index'
      return false
    end

    if %w[entities_search logics].include? params[:controller]
      return 'shared/user_ontologies'
    end

    if params[:controller] == 'ontologies' && !in_repository?
      return 'shared/user_ontologies'
    end

    if params[:controller] == 'repositories'
      return 'shared/user_repositories'
    end

    return false 
  end

  def cover_visible?
    params[:controller] == 'home' && !user_signed_in?
  end

  def in_repository?
    params[:repository_id] || params[:controller] == 'repositories'<commit_msg>Fix the presence of user content<commit_after>module ApplicationHelper

  def admin?
    current_user.try(:admin?)
  end

  def context_pane
    if params[:controller] == 'home'
      return 'shared/user_repositories'
    end

    if params[:action] != 'index'
      return false
    end

    if %w[entities_search logics links].include? params[:controller]
      return 'shared/user_ontologies'
    end

    if params[:controller] == 'ontologies' && !in_repository?
      return 'shared/user_ontologies'
    end

    if params[:controller] == 'repositories'
      return 'shared/user_repositories'
    end

    return false 
  end

  def cover_visible?
    params[:controller] == 'home' && !user_signed_in?
  end

  def in_repository?
    params[:repository_id] || params[:controller] == 'repositories'
{'fraction_non_alphanumeric': 0.10892970234325522, 'fraction_numerical': 0.0, 'mean_word_length': 3.352617079889807, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5810394', 'n_tokens_mistral': 492, 'n_tokens_neox': 466, 'n_words': 113}