<commit_before>class TomcatsController < ApplicationController
  respond_to :html, :js

  def index
    @tomcats = Tomcat.all
    #filters options
    @filters = {}
    @tomcats.each do |tomcat|
      tomcat.each do |key,value|
        @filters[key] ||= []
        value = value.split("_").first if key == :tomcat
        value = value.sub(/:80$/, "") if key == :vip
        @filters[key] << value unless @filters[key].include?(value)
        @filters[key] = @filters[key].compact.sort
      end
    end
    #restrict tomcats
    @tomcats = @tomcats.select{|t| t[:vip].sub(/:80$/,"") == params[:by_vip]} if params[:by_vip].present?
    @tomcats = @tomcats.select{|t| t[:server] == params[:by_server]} if params[:by_server].present?
    @tomcats = @tomcats.select{|t| t[:tomcat].starts_with?(params[:by_tomcat]) } if params[:by_tomcat].present?
    @tomcats = @tomcats.select{|t| t[:java_version].starts_with?(params[:by_java]) } if params[:by_java].present?
  end
end<commit_msg>Don't remove :80 endings in tomcat vips<commit_after>class TomcatsController < ApplicationController
  respond_to :html, :js

  def index
    @tomcats = Tomcat.all
    #filters options
    @filters = {}
    @tomcats.each do |tomcat|
      tomcat.each do |key,value|
        @filters[key] ||= []
        value = value.split("_").first if key == :tomcat
        @filters[key] << value unless @filters[key].include?(value)
        @filters[key] = @filters[key].compact.sort
      end
    end
    #restrict tomcats
    @tomcats = @tomcats.select{|t| t[:vip].sub(/:80$/,"") == params[:by_vip]} if params[:by_vip].present?
    @tomcats = @tomcats.select{|t| t[:server] == params[:by_server]} if params[:by_server].present?
    @tomcats = @tomcats.select{|t| t[:tomcat].starts_with?(params[:by_tomcat]) } if params[:by_tomcat].present?
    @tomcats = @tomcats.select{|t| t[:java_version].starts_with?(params[:by_java]) } if params[:by_java].present?
  end
end
{'fraction_non_alphanumeric': 0.17503883997928535, 'fraction_numerical': 0.004142931123770067, 'mean_word_length': 3.8059701492537314, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1441085', 'n_tokens_mistral': 704, 'n_tokens_neox': 665, 'n_words': 128}