<commit_before><div class="forum">
<div class="topic <%= @topic.locked ? 'locked' : 'unlocked' %>">
  <div id="menu" class="pull-right btn-toolbar">
    <div class="btn-group">
      <%= link_to 'Next unread', next_unread_course_forums_path(@course), class: 'btn', title: 'Jump to next unread topic' %>
      <button class="btn dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
      </button>
      <ul class="dropdown-menu">
        <li><%= link_to 'Next unanswered question', next_unanswered_course_forums_path(@course) %></li>
      </ul>
    </div>
    <div class="btn-group">
      <% if @topic.subscribed?(curr_user_course) %>
        <%= link_to 'Unsubscribe', unsubscribe_course_forum_topic_path(@course, @forum, @topic), class: 'btn' %>
      <% else %>
        <%= link_to 'Subscribe', subscribe_course_forum_topic_path(@course, @forum, @topic), class: 'btn' %>
      <% end %>
      <% if @topic.can_be_replied_to? %>
        <%= link_to 'Reply', reply_course_forum_topic_post_path(@course, @forum, @topic, @topic.posts.last), class: 'btn btn-primary reply', 'data-post-id' => @topic.posts.last.id, 'data-post-title' => @topic.title %>
      <% end %>
    </div>
    <div class="btn-group dropdown-trigger-on-hover">
      <% if can? :edit, @topic %>
        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
          Manage topic
          <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
          <li><%= link_to 'Edit/Move', edit_course_forum_topic_path(@course, @forum, @topic) %></li>
          <% if can? :set_hidden, @topic %>
            <li><%= link_to 'Hide', course_forum_topic_hide_path(@course, @forum, @topic, hide: @topic.hidden? ? 0 : 1), method: :put %></li>
          <% end %>
          <% if can? :set_locked, @topic %>
            <li><%= link_to 'Lock', course_forum_topic_lock_path(@course, @forum, @topic, lock: @topic.locked? ? 0 : 1), method: :put %></li>
          <% end %>
          <li class="divider"></li>
          <% ForumTopic::TOPIC_TYPES.each do |t| %>
            <% if can? t[2], @topic %>
              <li><%= link_to t[0], course_forum_topic_type_path(@course, @forum, @topic, type: t[1]), method: :put %></li>
            <% end %><commit_msg>Display the current topic type in the topic menu.<commit_after><div class="forum">
<div class="topic <%= @topic.locked ? 'locked' : 'unlocked' %>">
  <div id="menu" class="pull-right btn-toolbar">
    <div class="btn-group">
      <%= link_to 'Next unread', next_unread_course_forums_path(@course), class: 'btn', title: 'Jump to next unread topic' %>
      <button class="btn dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
      </button>
      <ul class="dropdown-menu">
        <li><%= link_to 'Next unanswered question', next_unanswered_course_forums_path(@course) %></li>
      </ul>
    </div>
    <div class="btn-group">
      <% if @topic.subscribed?(curr_user_course) %>
        <%= link_to 'Unsubscribe', unsubscribe_course_forum_topic_path(@course, @forum, @topic), class: 'btn' %>
      <% else %>
        <%= link_to 'Subscribe', subscribe_course_forum_topic_path(@course, @forum, @topic), class: 'btn' %>
      <% end %>
      <% if @topic.can_be_replied_to? %>
        <%= link_to 'Reply', reply_course_forum_topic_post_path(@course, @forum, @topic, @topic.posts.last), class: 'btn btn-primary reply', 'data-post-id' => @topic.posts.last.id, 'data-post-title' => @topic.title %>
      <% end %>
    </div>
    <div class="btn-group dropdown-trigger-on-hover">
      <% if can? :edit, @topic %>
        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
          Manage topic
          <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
          <li><%= link_to 'Edit/Move', edit_course_forum_topic_path(@course, @forum, @topic) %></li>
          <% if can? :set_hidden, @topic %>
            <li><%= link_to 'Hide', course_forum_topic_hide_path(@course, @forum, @topic, hide: @topic.hidden? ? 0 : 1), method: :put %></li>
          <% end %>
          <% if can? :set_locked, @topic %>
            <li><%= link_to 'Lock', course_forum_topic_lock_path(@course, @forum, @topic, lock: @topic.locked? ? 0 : 1), method: :put %></li>
          <% end %>
          <li class="divider"></li>
          <% ForumTopic::TOPIC_TYPES.each do |t| %>
            <% if can? t[2], @topic %>
              <li class="<%= t[1] == @topic.topic_type ? 'active' : '' %>">
                <%= link_to t[0], course_forum_topic_type_path(@course, @forum, @topic, type: t[1]), method: :put %>
              </li>
            <% end %>
{'fraction_non_alphanumeric': 0.19287706500750912, 'fraction_numerical': 0.0032181935207037118, 'mean_word_length': 3.0051546391752577, 'pattern_counts': {'":': 0, '<': 112, '<?xml version=': 0, '>': 116, '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': '4424204', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1535, 'n_words': 340}