<commit_before>package de.frosner.broccoli.controllers

import java.io.File
import javax.inject.Inject

import de.frosner.broccoli.models.Template
import Template.{templateReads, templateWrites}
import de.frosner.broccoli.services.TemplateService
import play.{Logger, Play, Application}

import play.api.libs.json.Json
import play.api.libs.ws.WSClient
import play.api.mvc.{Action, Controller}

import scala.io.Source
import scala.util.Try

class TemplateController @Inject() (configuration: play.api.Configuration, templateService: TemplateService) extends Controller {

  private val templates = templateService.templates

  def list = Action {
    Ok(Json.toJson(templateService.templates.map(_.id)))
  }

  def show(id: String) = Action {
    templates.find(_.id == id).map(template => Ok(Json.toJson(template))).getOrElse(NotFound)
  }

}<commit_msg>manage import<commit_after>package de.frosner.broccoli.controllers

import java.io.File
import javax.inject.Inject

import de.frosner.broccoli.models.Template
import Template.{templateReads, templateWrites}
import de.frosner.broccoli.services.TemplateService

import play.api.libs.json.Json
import play.api.mvc.{Action, Controller}


class TemplateController @Inject() (configuration: play.api.Configuration, templateService: TemplateService) extends Controller {

  private val templates = templateService.templates

  def list = Action {
    Ok(Json.toJson(templateService.templates.map(_.id)))
  }

  def show(id: String) = Action {
    templates.find(_.id == id).map(template => Ok(Json.toJson(template))).getOrElse(NotFound)
  }

}
{'fraction_non_alphanumeric': 0.11383647798742139, 'fraction_numerical': 0.0, 'mean_word_length': 5.389558232931727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2274083', 'n_tokens_mistral': 497, 'n_tokens_neox': 478, 'n_words': 95}