<commit_before>@(activities: List[model.Activity])(implicit context: app.Context)
@import context._
@import view.helpers._
@if(activities.isEmpty){
  No activity
} else {
  @activities.map { activity =>
    <div class="block">
      <div class="muted small">@datetime(activity.activityDate)</div>
      <div class="strong">
        @avatar(activity.activityUserName, 16)
        @activityMessage(activity.message)
      </div>
      @activity.additionalInfo.map { additionalInfo =>
        @(activity.activityType match {
          case "create_wiki" => {
            <div class="small activity-message">Created <a href={"%s/%s/%s/wiki/%s".format(path, activity.userName, activity.repositoryName, additionalInfo)}>{additionalInfo}</a>.</div>
          }
          case "edit_wiki" => {
            <div class="small activity-message">Edited <a href={"%s/%s/%s/wiki/%s".format(path, activity.userName, activity.repositoryName, additionalInfo)}>{additionalInfo}</a>.</div>
          }
          case "push" => {
            <div class="small activity-message">
              {additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
                if(i == 3){
                  <div>...</div>
                } else {
                  <div>
                    <a href={"%s/%s/%s/commit/%s".format(path, activity.userName, activity.repositoryName, commit.substring(0, 40))} class="monospace">{commit.substring(0, 7)}</a>
                    <span>{commit.substring(41)}</span>
                  </div>
                }
              }}
            </div>
          }
          case _ => {
            <div class=" activity-message">{additionalInfo}</div>
          }
        })
      }
    </div>
  }
}<commit_msg>Replace String#format() with string interpolation.<commit_after>@(activities: List[model.Activity])(implicit context: app.Context)
@import context._
@import view.helpers._
@if(activities.isEmpty){
  No activity
} else {
  @activities.map { activity =>
    <div class="block">
      <div class="muted small">@datetime(activity.activityDate)</div>
      <div class="strong">
        @avatar(activity.activityUserName, 16)
        @activityMessage(activity.message)
      </div>
      @activity.additionalInfo.map { additionalInfo =>
        @(activity.activityType match {
          case "create_wiki" => {
            <div class="small activity-message">Created <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
          }
          case "edit_wiki" => {
            <div class="small activity-message">Edited <a href={s"${path}/${activity.userName}/${activity.repositoryName}/wiki/${additionalInfo}"}>{additionalInfo}</a>.</div>
          }
          case "push" => {
            <div class="small activity-message">
              {additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
                if(i == 3){
                  <div>...</div>
                } else {
                  <div>
                    <a href={s"${path}/${activity.userName}/${activity.repositoryName}/commit/${commit.substring(0, 40)}"} class="monospace">{commit.substring(0, 7)}</a>
                    <span>{commit.substring(41)}</span>
                  </div>
                }
              }}
            </div>
          }
          case _ => {
            <div class=" activity-message">{additionalInfo}</div>
          }
        })
      }
    </div>
  }
}
{'fraction_non_alphanumeric': 0.17044476327116212, 'fraction_numerical': 0.006312769010043041, 'mean_word_length': 2.134892086330935, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 69, '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': '6709513', 'n_tokens_mistral': 1021, 'n_tokens_neox': 986, 'n_words': 153}