<commit_before><h3>Hotspot Results</h3>
<p>Meta analysis of your metrics to find hotspots in your code.</p>
<br/>

<% if !@hotspots || @hotspots.size == 0 %>
No Hotspots were found.
<% elsif @hotspots && @hotspots.size > 0 %>

<% granularities = [:files, :classes, :methods] %>
<table>
<tr valign="top">
<% granularities.each do |granularity| %>
   <th width='33%'>
<%= granularity.to_s.capitalize %></th>
<% end %>
</tr>

<% items = [] %>
<% granularities.each_index do |index| %>
  <% granularity = granularities[index] %>
  <% items << @hotspots[granularity] %>
<% end %>

<% items_length = 0 %>
<% columns = [0, 1, 2] %>
<% while (items_length < items[0].length || items_length < items[1].length || items_length < items[2].length) do %>
    <tr  valign="top">
       <% columns.each do |column| %>
       <% item = items[column].length >= items_length ? items[column][items_length] : nil %>
       <% if item %>
       <td>
       <b>
          <%= display_location(item[:location], nil) %>
        </b>
        <br/><br/>
        <!-- TODO HOTSPOTS for metric fu nice metric_link method -->
        <% item[:details].each do |metric, info| %>
          <%#= metric_link(@stat, metric, h(metric.to_s.capitalize)) + ": " + h(info)%><br/>
          <%= "#{metric.to_s.capitalize}: #{info}" %><br/>
          <% end %>
          </td>
      <% else %>
      <td> &nbsp; </td>
      <% end %>
      <% end %>
      <% items_length += 1 %>
      </tr>
    <% end %>

</table>
<% end %>


<p>Generated on <%= Time.now.localtime %></p><commit_msg>link to annotated versions from hotspots<commit_after><h3>Hotspot Results</h3>
<p>Meta analysis of your metrics to find hotspots in your code.</p>
<br/>

<% if !@hotspots || @hotspots.size == 0 %>
No Hotspots were found.
<% elsif @hotspots && @hotspots.size > 0 %>

<% granularities = [:files, :classes, :methods] %>
<table>
<tr valign="top">
<% granularities.each do |granularity| %>
   <th width='33%'>
<%= granularity.to_s.capitalize %></th>
<% end %>
</tr>

<% items = [] %>
<% granularities.each_index do |index| %>
  <% granularity = granularities[index] %>
  <% items << @hotspots[granularity] %>
<% end %>

<% items_length = 0 %>
<% columns = [0, 1, 2] %>
<% while (items_length < items[0].length || items_length < items[1].length || items_length < items[2].length) do %>
    <tr  valign="top">
       <% columns.each do |column| %>
       <% item = items[column].length >= items_length ? items[column][items_length] : nil %>
       <% if item %>
       <td>
       <b>
          <%= display_location(item[:location], nil) %>
        </b>
        <% if item[:location].file_path %>
          <% file, line = item[:location].file_path.split(/:/) %>
          <% if per_file_data[file] %>
            <small>&laquo;
              <b><a href="<%= file.gsub(%r{/}, '_') %>.html<%= (line.nil? ? '' : "#line#{line}") %>">annotate</a></b>
            &raquo;</small>
          <% end %>
        <% end %>
        <br/><br/>
        <!-- TODO HOTSPOTS for metric fu nice metric_link method -->
        <% item[:details].each do |metric, info| %>
          <%#= metric_link(@stat, metric, h(metric.to_s.capitalize)) + ": " + h(info)%><br/>
          <%= "#{metric.to_s.capitalize}: #{info}" %><br/>
          <% end %>
          </td>
      <% else %>
      <td> &nbsp; </td>
      <% end %>
      <% end %>
      <% items_length += 1 %>
      </tr>
    <% end %>

</table>
<% end %>


<p>Generated on <%= Time.now.localtime %></p>
{'fraction_non_alphanumeric': 0.22020725388601037, 'fraction_numerical': 0.008059873344847437, 'mean_word_length': 2.6010362694300517, 'pattern_counts': {'":': 2, '<': 136, '<?xml version=': 0, '>': 130, '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': '3505534', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1180, 'n_words': 262}