<commit_before>package spring.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import spring.model.Categoria;
import spring.service.ICategoriaService;
import spring.service.IDepartamentoService;

@Controller
public class AgendaController {
	@Autowired
	private ICategoriaService categoriaService;
	@Autowired
	private IDepartamentoService departamentoService;

	@RequestMapping(value = "/", method = RequestMethod.GET)
	public ModelAndView getDepartamentos() {
		ModelAndView model = new ModelAndView("home");
		System.out.println(departamentoService.get(1));
		return model;
	}
	
	@ModelAttribute("categoria")
	public Categoria getCategoriaObjectNew() {
		System.out.println("-- Genero una categoria nueva.--");
		return new Categoria();
	}

	@RequestMapping(value = "/", method = RequestMethod.GET)	
	public String initForm() {
		return "form1";
	}
	
	@RequestMapping(value = "/addCategoria", method = RequestMethod.POST)		
	public String altaCategoria() {
		return "form2";
	}
}<commit_msg>eliminar ruta duplicada<commit_after>package spring.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import spring.model.Categoria;
import spring.service.ICategoriaService;
import spring.service.IDepartamentoService;

@Controller
public class AgendaController {
	@Autowired
	private ICategoriaService categoriaService;
	@Autowired
	private IDepartamentoService departamentoService;
	
	@ModelAttribute("categoria")
	public Categoria getCategoriaObjectNew() {
		System.out.println("-- Genero una categoria nueva.--");
		return new Categoria();
	}
	
	@ModelAttribute("categoria")
	public Categoria getDeObjectNew() {
		System.out.println("-- Genero una categoria nueva.--");
		return new Categoria();
	}
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public ModelAndView getDepartamentos() {
		return new ModelAndView("home");
	}

	@RequestMapping(value = "/categoria/new", method = RequestMethod.GET)	
	public String initForm() {
		return "form1";
	}
	
	@RequestMapping(value = "/categoria/addCategoria", method = RequestMethod.POST)		
	public String altaCategoria() {
		return "form2";
	}
}
{'fraction_non_alphanumeric': 0.10899780541331383, 'fraction_numerical': 0.0018288222384784199, 'mean_word_length': 5.9770408163265305, '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': '1884651', 'n_tokens_mistral': 832, 'n_tokens_neox': 807, 'n_words': 159}