<commit_before><div class="diff_chunk">
  <table cellspacing="0" cellpadding="0">

  <% # iterate over lines %>
  <% chunk.lines.each do |line| %>

    <%
      best_idx = line.best_file_index
      blob = file_change_set.blobs[best_idx]
      blob_line_number = line.line_numbers[ best_idx ]
      line_id = blob + '_line_' + blob_line_number.to_s
     %>

    <tr class="diff_line" id="<%= line_id %>">
    <% # Line numbers %>
      <% line.line_numbers.each do |n| %>
        <td class="line_number"><%=h n.nil? ? "-" : n %></td>
      <% end %>
      <td class="<%= (line_classes line).join(" ") %>">
        <% if line.line.empty? %>
          &nbsp;
        <% else %>
          <code><%=h line.line %></code><br/>
        <% end %>
      </td>
      <% if ! @review.nil? %>
        <td class="comment_link">
          <%= link_to_remote '+', :url => {
                :controller => 'review',
                :action => 'new_comment_ajax',
                'comment[review_id]'   => @review.id,
                'comment[index_hash]'  => blob,
                'comment[line_number]' => blob_line_number
           } %>
        </td>
      <% end %>
    </tr>
  <% comments = comments_for_line(blob, blob_line_number) %>
  <% comments.each do |comment| %>
    </table>
      <%= render_partial 'comment/show', comment %>
    <table>
  <% end %>


  <% end %>

  </table>
</div><commit_msg>Move comment link to the beginning of each line of the diff<commit_after><div class="diff_chunk">
  <table cellspacing="0" cellpadding="0">

  <% # iterate over lines %>
  <% chunk.lines.each do |line| %>

    <%
      best_idx = line.best_file_index
      blob = file_change_set.blobs[best_idx]
      blob_line_number = line.line_numbers[ best_idx ]
      line_id = blob + '_line_' + blob_line_number.to_s
     %>

    <tr class="diff_line" id="<%= line_id %>">
      <% if ! @review.nil? %>
        <td class="comment_link">
          <%= link_to_remote '+', :url => {
                :controller => 'review',
                :action => 'new_comment_ajax',
                'comment[review_id]'   => @review.id,
                'comment[index_hash]'  => blob,
                'comment[line_number]' => blob_line_number
           } %>
        </td>
      <% end %>
    <% # Line numbers %>
      <% line.line_numbers.each do |n| %>
        <td class="line_number"><%=h n.nil? ? "-" : n %></td>
      <% end %>
      <td class="<%= (line_classes line).join(" ") %>">
        <% if line.line.empty? %>
          &nbsp;
        <% else %>
          <code><%=h line.line.sub(/\r$/,'') %></code><br/>
        <% end %>
      </td>
    </tr>
  <% comments = comments_for_line(blob, blob_line_number) %>
  <% comments.each do |comment| %>
    </table>
      <%= render_partial 'comment/show', comment %>
    <table>
  <% end %>


  <% end %>

  </table>
</div>
{'fraction_non_alphanumeric': 0.18890449438202248, 'fraction_numerical': 0.0014044943820224719, 'mean_word_length': 2.050321199143469, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 91, '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': '2108162', 'n_tokens_mistral': 1050, 'n_tokens_neox': 932, 'n_words': 178}