<commit_before>!!!
%html{:lang => "en"}
  %head
    %meta{:charset => "utf-8"}/
    %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
    %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
    %meta{:content => "Cucumber Step Characteristics", :name => "description"}/
    %title Cucumber Step Characteristics
    %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
    %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css", :rel => "stylesheet"}/
    / Custom styles for this layout
    :css
      body {
          min-height: 2000px;
          padding-top: 70px;
      }

      td {
          white-space: nowrap;
      }

      table.tablesorter thead tr .headerSortUp {
        background-color: #8dbdd8;
      }
      table.tablesorter thead tr .headerSortDown {
        background-color: #8dbdd8;
      }
    / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
    /[if lt IE 9]
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  %body
    .container
      .page-header
        %h1 Cucumber step characteristics
      .alert.alert-info
        %span
          #{profile.scenarios.count} Scenarios,
          #{profile.steps.count} Steps completed
          %span.text-muted
            (#{step_status_summary(profile)})<br>
          - if profile.ambiguous_count > 0
            #{profile.ambiguous_count}/#{profile.step_count(:failed)} failures due to ambiguous matches<br>
          Test duration #{format_ts(profile.duration)}s.
          %span.text-muted
            (#{format_ts(profile.step_duration)}s steps, #{format_ts(profile.nonstep_duration)}s non-steps)
        %span.text-muted.pull-right.small
          Finished on #{Time.now}

      %ul.nav.nav-tabs
        %li.active
          %a{:href => '#steps', :'data-toggle' => 'tab'} Steps
        %li
          %a{:href => '#features', :'data-toggle' => 'tab'} Features
        - if profile.unmatched_steps?
          %li
            %a{:href => '#unused_steps', :'data-toggle' => 'tab'} Unused Steps (#{profile.unmatched_steps.count})
      %div.tab-content
        %div.tab-pane.active#steps
          %table.table.table-striped.table-bordered.table-condensed.tablesorter#profile_table
            %thead
              %tr
                %th Step
                %th Total time
                %th Passed
                %th Average
                %th Fastest
                %th Slowest
                %th Variation
                %th Variance
                %th Std Deviation
                %th Skipped
                %th Error
                %th Undef
                %th Total count
            %tbody
              - profile.step_profiles.each do |step, meta|
                %tr.step_result
                  %td.step
                    %abbr{:title => "#{meta[:regexp]}"} #{step}
                  %td.total_time #{format_ts(meta[:total_duration])}
                  %td.passed_count
                    - if meta[:passed][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:passed]) }" } #{meta[:passed][:count]}
                    - else
                      0
                  %td.average_time #{format_ts(meta[:average])}
                  %td.fastest_time #{format_ts(meta[:fastest])}
                  %td.slowest_time #{format_ts(meta[:slowest])}
                  %td.variation_time #{format_ts(meta[:variation])}
                  %td.variance_time #{format_ts(meta[:variance])}
                  %td.std_dev_time #{format_ts(meta[:standard_deviation])}
                  %td.skipped_count
                    - if meta[:skipped][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:skipped]) }" } #{meta[:skipped][:count]}
                    - else
                      0
                  %td.failed_count
                    - if meta[:failed][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:failed]) }" } #{meta[:failed][:count]}
                    - else
                      0
                  %td.undef_count
                    - if meta[:undefined][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:undefined]) }" } #{meta[:undefined][:count]}
                    - else
                      0
                  %td.total_count #{meta[:total_count]}

        %div.tab-pane#features
          %table.table.table-striped.table-bordered.table-condensed#feature_table
            %thead
              %tr
                %th Feature
                %th Total time
                %th Step count
                %th Status
                %th
            %tbody
              - profile.feature_profiles.each do |feature, meta|
                %tr.feature_result{:class => "#{meta[:status] == :failed ? :danger : meta[:status] == :undefined ? :warning : nil }"}
                  %td.feature #{feature}
                  %td.total_time #{format_ts(meta[:total_duration])}
                  %td.step_count #{meta[:step_count]}
                  %td.status #{meta[:status]}
                  %td.examples
                    - if meta[:examples]
                      %button.btn.btn-primary{:'data-toggle'=>'modal', :'data-target'=>"##{Digest::MD5.hexdigest(feature)}"}
                        #{meta[:example_count]} Examples

          - profile.feature_profiles.select{|f,m| m.key?(:examples) }.each do |feature, meta|
            %div{ :class=> 'modal fade bs-example-modal-lg', :tabindex=>"-1", :role=>"dialog", :'aria-labelledby'=>"myLargeModalLabel", :'aria-hidden'=>"true", :id => "#{Digest::MD5.hexdigest(feature)}"}
              %div.modal-dialog.modal-lg
                %div.modal-content
                  %div.modal-header
                    %h4 #{feature}
                  %div.modal-body
                    %table.table.table-striped.table-bordered.table-condensed{:id => feature.split('/').last.gsub(/[\.:]/, '_') }
                      %thead
                        %tr
                          %th Example
                          %th Total time
                          %th Step count
                          %th Status
                      %tbody
                        - meta[:examples].each do |example, meta|
                          %tr.example_result{:class => "#{meta[:status] == :failed ? :danger : meta[:status] == :undefined ? :warning : nil }"}
                            %td.example #{example}
                            %td.total_time #{format_ts(meta[:total_duration])}
                            %td.step_count #{meta[:step_count]}
                            %td.status #{meta[:status]}
                      %tfooter
                        %tr.example_totals
                          %th
                          %th.total_time #{format_ts(meta[:total_duration])}
                          %th.step_count #{meta[:step_count]}
                          %th.status #{meta[:status]}
                  %div.modal-footer
                    %button.btn.btn-default{:type=>"button", :'data-dismiss'=>"modal"}
                      Close

        - if profile.unmatched_steps?
          %div.tab-pane#unused_steps
            %table.table.table-striped.table-bordered.table-condensed.tablesorter#unmatched_steps_table
              %thead
                %tr
                  %th Step Location
                  %th Step
              %tbody
                - profile.unmatched_steps.each do |step_location, step|
                  %tr
                    %td #{step_location}
                    %td #{step}

    %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
    %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
    %script{:src => "https://raw.githubusercontent.com/christianbach/tablesorter/master/jquery.tablesorter.min.js"}
    :javascript
      $(document).ready(function()
      {
          $("#profile_table").tablesorter( {sortList: [[1,1],[3,1]], widgets: ['zebra']} );
      }
      );<commit_msg>Fixed html table sorts<commit_after>!!!
%html{:lang => "en"}
  %head
    %meta{:charset => "utf-8"}/
    %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
    %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
    %meta{:content => "Cucumber Step Characteristics", :name => "description"}/
    %title Cucumber Step Characteristics
    %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
    %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css", :rel => "stylesheet"}/
    / Custom styles for this layout
    :css
      body {
          min-height: 2000px;
          padding-top: 70px;
      }

      td {
          white-space: nowrap;
      }

      table.tablesorter thead tr .headerSortUp {
        background-color: #8dbdd8;
      }
      table.tablesorter thead tr .headerSortDown {
        background-color: #8dbdd8;
      }
    / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
    /[if lt IE 9]
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  %body
    .container
      .page-header
        %h1 Cucumber step characteristics
      .alert.alert-info
        %span
          #{profile.scenarios.count} Scenarios,
          #{profile.steps.count} Steps completed
          %span.text-muted
            (#{step_status_summary(profile)})<br>
          - if profile.ambiguous_count > 0
            #{profile.ambiguous_count}/#{profile.step_count(:failed)} failures due to ambiguous matches<br>
          Test duration #{format_ts(profile.duration)}s.
          %span.text-muted
            (#{format_ts(profile.step_duration)}s steps, #{format_ts(profile.nonstep_duration)}s non-steps)
        %span.text-muted.pull-right.small
          Finished on #{Time.now}

      %ul.nav.nav-tabs
        %li.active
          %a{:href => '#steps', :'data-toggle' => 'tab'} Steps
        %li
          %a{:href => '#features', :'data-toggle' => 'tab'} Features
        - if profile.unmatched_steps?
          %li
            %a{:href => '#unused_steps', :'data-toggle' => 'tab'} Unused Steps (#{profile.unmatched_steps.count})
      %div.tab-content
        %div.tab-pane.active#steps
          %table.table.table-striped.table-bordered.table-condensed.tablesorter#profile_table
            %thead
              %tr
                %th Step
                %th Total time
                %th Passed
                %th Average
                %th Fastest
                %th Slowest
                %th Variation
                %th Variance
                %th Std Deviation
                %th Skipped
                %th Error
                %th Undef
                %th Total count
            %tbody
              - profile.step_profiles.each do |step, meta|
                %tr.step_result
                  %td.step
                    %abbr{:title => "#{meta[:regexp]}"} #{step}
                  %td.total_time #{format_ts(meta[:total_duration])}
                  %td.passed_count
                    - if meta[:passed][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:passed]) }" } #{meta[:passed][:count]}
                    - else
                      0
                  %td.average_time #{format_ts(meta[:average])}
                  %td.fastest_time #{format_ts(meta[:fastest])}
                  %td.slowest_time #{format_ts(meta[:slowest])}
                  %td.variation_time #{format_ts(meta[:variation])}
                  %td.variance_time #{format_ts(meta[:variance])}
                  %td.std_dev_time #{format_ts(meta[:standard_deviation])}
                  %td.skipped_count
                    - if meta[:skipped][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:skipped]) }" } #{meta[:skipped][:count]}
                    - else
                      0
                  %td.failed_count
                    - if meta[:failed][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:failed]) }" } #{meta[:failed][:count]}
                    - else
                      0
                  %td.undef_count
                    - if meta[:undefined][:count] > 0
                      %abbr{:title => "#{ format_step_usage(meta[:undefined]) }" } #{meta[:undefined][:count]}
                    - else
                      0
                  %td.total_count #{meta[:total_count]}

        %div.tab-pane#features
          %table.table.table-striped.table-bordered.table-condensed.tablesorter#feature_table
            %thead
              %tr
                %th Feature
                %th Total time
                %th Step count
                %th Status
                %th
            %tbody
              - profile.feature_profiles.each do |feature, meta|
                %tr.feature_result{:class => "#{meta[:status] == :failed ? :danger : meta[:status] == :undefined ? :warning : nil }"}
                  %td.feature #{feature}
                  %td.total_time #{format_ts(meta[:total_duration])}
                  %td.step_count #{meta[:step_count]}
                  %td.status #{meta[:status]}
                  %td.examples
                    - if meta[:examples]
                      %button.btn.btn-primary{:'data-toggle'=>'modal', :'data-target'=>"##{Digest::MD5.hexdigest(feature)}"}
                        #{meta[:example_count]} Examples

          - profile.feature_profiles.select{|f,m| m.key?(:examples) }.each do |feature, meta|
            %div{ :class=> 'modal fade bs-example-modal-lg', :tabindex=>"-1", :role=>"dialog", :'aria-labelledby'=>"myLargeModalLabel", :'aria-hidden'=>"true", :id => "#{Digest::MD5.hexdigest(feature)}"}
              %div.modal-dialog.modal-lg
                %div.modal-content
                  %div.modal-header
                    %h4 #{feature}
                  %div.modal-body
                    %table.table.table-striped.table-bordered.table-condensed{:id => feature.split('/').last.gsub(/[\.:]/, '_') }
                      %thead
                        %tr
                          %th Example
                          %th Total time
                          %th Step count
                          %th Status
                      %tbody
                        - meta[:examples].each do |example, meta|
                          %tr.example_result{:class => "#{meta[:status] == :failed ? :danger : meta[:status] == :undefined ? :warning : nil }"}
                            %td.example #{example}
                            %td.total_time #{format_ts(meta[:total_duration])}
                            %td.step_count #{meta[:step_count]}
                            %td.status #{meta[:status]}
                      %tfooter
                        %tr.example_totals
                          %th
                          %th.total_time #{format_ts(meta[:total_duration])}
                          %th.step_count #{meta[:step_count]}
                          %th.status #{meta[:status]}
                  %div.modal-footer
                    %button.btn.btn-default{:type=>"button", :'data-dismiss'=>"modal"}
                      Close

        - if profile.unmatched_steps?
          %div.tab-pane#unused_steps
            %table.table.table-striped.table-bordered.table-condensed.tablesorter#unmatched_steps_table
              %thead
                %tr
                  %th Step Location
                  %th Step
              %tbody
                - profile.unmatched_steps.each do |step_location, step|
                  %tr
                    %td #{step_location}
                    %td #{step}

    %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
    %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
    %script{:src => "https://raw.githubusercontent.com/christianbach/tablesorter/master/jquery.tablesorter.min.js"}
    :javascript
      $(document).ready(function()
      {
          $("#profile_table").tablesorter( {sortList: [[1,1],[3,1]], widgets: ['zebra']} );
          $("#feature_table").tablesorter( {sortList: [[3,0],[1,1]], widgets: ['zebra']} );
          $("#unmatched_steps_table").tablesorter( {sortList: [[1,0]], widgets: ['zebra']} );
      }
      );
{'fraction_non_alphanumeric': 0.14474078513635003, 'fraction_numerical': 0.006952352412346419, 'mean_word_length': 1.5439853636225034, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 103, 'https://': 8, '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': '1083289', 'n_tokens_mistral': 4989, 'n_tokens_neox': 4709, 'n_words': 779}