<commit_before>package voterAccess;

import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import types.ChangePass;
import types.UserInfo;
import types.UserPass;

@Controller
@RestController
public class MainController {
	
	public static UserInfo usuario1 = new UserInfo("David","1234546789J","uo212486", "123A");
	public static UserPass pass1 = new UserPass("<PASSWORD>", "password");
	

    /*@RequestMapping("/")
    public String landing() {
        return "User Management Service";
    }*/
    
    /*@RequestMapping("/error")
    public String errorPage() {
        return "Error";
        http://stackoverflow.com/questions/25356781/spring-boot-remove-whitelabel-error-page
    }*/
    
    @RequestMapping(value = "/user", method = RequestMethod.POST)
    public UserInfo GetVoterInfo(@RequestBody @Valid final UserPass message) {
        return new UserInfo("David","1234546789J","uo212486", "123A");
    }
    
    /*@RequestMapping("/ChangePassword")
    public UserInfo user() {
        return new UserInfo("pepe",0);
    }*/
    
    //Metodos condicionales para probar que se meta bien los datos
    
    @RequestMapping(value = "/user2", method = RequestMethod.POST)
    public UserInfo GetVoterInfo2(@RequestBody @Valid final UserPass message) {
    	if(message.getLogin().split("@")[0].equals(pass1.getLogin()) &&  message.getPassword().equals(pass1.getPassword()))
    		return usuario1;
    	return null;
    }
    
    @RequestMapping(value = "/ChangePassword", method = RequestMethod.POST)
    public UserPass user(@RequestBody @Valid final ChangePass message) {
    	if(message.getLogin().split("@")[0].equals(pass1.getLogin()) &&  message.getOldPassword().equals(pass1.getPassword()))
    		return pass1;
    	return null;
    }
}<commit_msg>Pruebas de verificacion de campos. Un sin Fix<commit_after>package voterAccess;

import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import types.ChangePass;
import types.UserInfo;
import types.UserPass;

@Controller
@RestController
public class MainController {
	
	public static UserInfo usuario1 = new UserInfo("David","1234546789J","uo212486", "123A");
	public static UserPass pass1 = new UserPass("<PASSWORD>", "password");
	

    /*@RequestMapping("/")
    public String landing() {
        return "User Management Service";
    }*/
    
    /*@RequestMapping("/error")
    public String errorPage() {
        return "Error";
        http://stackoverflow.com/questions/25356781/spring-boot-remove-whitelabel-error-page
    }*/
    
    @RequestMapping(value = "/user", method = RequestMethod.POST)
    public UserInfo GetVoterInfo(@RequestBody @Valid final UserPass message) {
        return new UserInfo("David","1234546789J","uo212486", "123A");
    }
    
    /*@RequestMapping("/ChangePassword")
    public UserInfo user() {
        return new UserInfo("pepe",0);
    }*/
    
    //Metodos condicionales para probar que se meta bien los datos
    
    @RequestMapping(value = "/user2", method = RequestMethod.POST)
    public UserInfo GetVoterInfo2(@RequestBody @Valid final UserPass message) {
    	if(message.getLogin().split("@")[0].equals(pass1.getLogin()) &&  message.getPassword().equals(pass1.getPassword()))
    		return usuario1;
    	return null;
    }
    
    @RequestMapping(value = "/ChangePassword", method = RequestMethod.POST)
    public UserPass user(@RequestBody @Valid final ChangePass message) {
    	if(message.getLogin().split("@")[0].equals(pass1.getLogin()) &&  message.getOldPassword().equals(pass1.getPassword())){
    		pass1 = new UserPass(message.getLogin(), message.getNewPassword());
    		return pass1;
    	}
    	return null;
    }
}
{'fraction_non_alphanumeric': 0.1295238095238095, 'fraction_numerical': 0.028333333333333332, 'mean_word_length': 4.02511961722488, 'pattern_counts': {'":': 0, '<': 5, '<?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': '361755', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1213, 'n_words': 251}