<commit_before>package controllers;

import com.google.inject.Inject;
import com.google.inject.Singleton;

import services.LocalizationService;
import services.PropertyService;

import ninja.Context;
import ninja.Result;
import ninja.Results;
import ninja.jaxy.GET;
import ninja.jaxy.Path;
import ninja.params.PathParam;

@Singleton
@Path("")
public class IndexController {

  @Inject
  LocalizationService localizationService;
  @Inject
  private PropertyService propertyService;

  @GET
  @Path("^((?!(\\/api\\/|tpl)).)*$")
  public Result index() {
    return Results.ok().html().template("/app/index.html")
        .render("showMinifiedVersion", propertyService.showMinifiedVersion());
  }

  @GET
  @Path("{template: .*}\\.tpl\\.html")
  public Result getTemplate(Context context, @PathParam("template") String templateName) {
    return Results.ok().html().template("/app" + templateName + ".tpl.html")
        .render("language", localizationService.getLanguage(context).or("en")).render("dateFormat",
                                                                                         localizationService
                                                                                             .getPattern(context));
  }

  @GET
  @Path("/api/buildProperties")
  public Result getBuildPropertyDTO() {
    return Results.ok().json().render("buildProperties", propertyService.getBuildProperties());
  }

  @GET
  @Path("{file: .*}.js")
  public Result getCustomJavascriptModuleFiles(@PathParam("file") String fileName) {
    return Results.ok().html().template("/app" + fileName + ".js");
  }
}<commit_msg>HIRE-103: changes due to pull-request - renamed controller method<commit_after>package controllers;

import com.google.inject.Inject;
import com.google.inject.Singleton;

import services.LocalizationService;
import services.PropertyService;

import ninja.Context;
import ninja.Result;
import ninja.Results;
import ninja.jaxy.GET;
import ninja.jaxy.Path;
import ninja.params.PathParam;

@Singleton
@Path("")
public class IndexController {

  @Inject
  LocalizationService localizationService;
  @Inject
  private PropertyService propertyService;

  @GET
  @Path("^((?!(\\/api\\/|tpl)).)*$")
  public Result index() {
    return Results.ok().html().template("/app/index.html")
        .render("showMinifiedVersion", propertyService.showMinifiedVersion());
  }

  @GET
  @Path("{template: .*}\\.tpl\\.html")
  public Result getTemplate(Context context, @PathParam("template") String templateName) {
    return Results.ok().html().template("/app" + templateName + ".tpl.html")
        .render("language", localizationService.getLanguage(context).or("en")).render("dateFormat",
                                                                                         localizationService
                                                                                             .getPattern(context));
  }

  @GET
  @Path("/api/buildProperties")
  public Result getBuildProperties() {
    return Results.ok().json().render("buildProperties", propertyService.getBuildProperties());
  }

  @GET
  @Path("{file: .*}.js")
  public Result getCustomJavascriptModuleFiles(@PathParam("file") String fileName) {
    return Results.ok().html().template("/app" + fileName + ".js");
  }
}
{'fraction_non_alphanumeric': 0.14211964773762525, 'fraction_numerical': 0.0009110233829334953, 'mean_word_length': 2.8661971830985915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1553546', 'n_tokens_mistral': 876, 'n_tokens_neox': 869, 'n_words': 169}