<commit_before>package ca.corefacility.bioinformatics.irida.ria.web.projects.settings;

import java.security.Principal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import ca.corefacility.bioinformatics.irida.model.project.Project;
import ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils;
import ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectsController;
import ca.corefacility.bioinformatics.irida.service.ProjectService;
import ca.corefacility.bioinformatics.irida.service.sample.MetadataTemplateService;

/**
 * Controller for managing metadata settings for a project
 */
@Controller
@RequestMapping("/projects/{projectId}/settings")
public class ProjectSettingsMetadataController {
	private final ProjectService projectService;
	private final ProjectControllerUtils projectControllerUtils;
	private MetadataTemplateService metadataTemplateService;

	@Autowired
	public ProjectSettingsMetadataController(ProjectService projectService,
			ProjectControllerUtils projectControllerUtils) {
		this.projectService = projectService;
		this.projectControllerUtils = projectControllerUtils;
	}

	/**
	 * Request for a {@link Project} remote settings page
	 *
	 * @param projectId the ID of the {@link Project} to read
	 * @param model     Model for the view
	 * @param principal Logged in user
	 * @return name of the project remote settings page
	 */
	@RequestMapping(value = {"/metadata", "/metadata/*"})
	public String getSampleMetadataTemplatesPage(@PathVariable Long projectId, final Model model,
			final Principal principal) {
		Project project = projectService.read(projectId);
		model.addAttribute("project", project);
		projectControllerUtils.getProjectTemplateDetails(model, principal, project);

		model.addAttribute(ProjectsController.ACTIVE_NAV, ProjectSettingsController.ACTIVE_NAV_SETTINGS);
		model.addAttribute("page", "metadata_templates");
		return "projects/settings/pages/metadata_templates";
	}
}
<commit_msg>Working on pattern matching the url<commit_after>package ca.corefacility.bioinformatics.irida.ria.web.projects.settings;

import java.security.Principal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import ca.corefacility.bioinformatics.irida.model.project.Project;
import ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils;
import ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectsController;
import ca.corefacility.bioinformatics.irida.service.ProjectService;
import ca.corefacility.bioinformatics.irida.service.sample.MetadataTemplateService;

/**
 * Controller for managing metadata settings for a project
 */
@Controller
@RequestMapping("/projects/{projectId}/settings")
public class ProjectSettingsMetadataController {
	private final ProjectService projectService;
	private final ProjectControllerUtils projectControllerUtils;
	private MetadataTemplateService metadataTemplateService;

	@Autowired
	public ProjectSettingsMetadataController(ProjectService projectService,
			ProjectControllerUtils projectControllerUtils) {
		this.projectService = projectService;
		this.projectControllerUtils = projectControllerUtils;
	}

	/**
	 * Request for a {@link Project} remote settings page
	 *
	 * @param projectId the ID of the {@link Project} to read
	 * @param model     Model for the view
	 * @param principal Logged in user
	 * @return name of the project remote settings page
	 */
	@RequestMapping(value = {"/metadata", "/metadata/**/*"})
	public String getSampleMetadataTemplatesPage(@PathVariable Long projectId, final Model model,
			final Principal principal) {
		Project project = projectService.read(projectId);
		model.addAttribute("project", project);
		projectControllerUtils.getProjectTemplateDetails(model, principal, project);

		model.addAttribute(ProjectsController.ACTIVE_NAV, ProjectSettingsController.ACTIVE_NAV_SETTINGS);
		model.addAttribute("page", "metadata_templates");
		return "projects/settings/pages/metadata_templates";
	}
}

{'fraction_non_alphanumeric': 0.08786988931556358, 'fraction_numerical': 0.0, 'mean_word_length': 6.647668393782383, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '836857', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1116, 'n_words': 251}