<commit_before>package com.springsource.greenhouse.signup;

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.Size;

import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;

public class SignupForm {
	
	@NotEmpty
	private String firstName;

	@NotEmpty
	private String lastName;

	@NotEmpty
	@Size(max=320)
	private String email;

	@NotEmpty
	@Size(min=6)
	private String password;

	@NotEmpty
	@Size(min=6)
	private String confirmPassword;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getConfirmPassword() {
		return confirmPassword;
	}

	public void setConfirmPassword(String confirmPassword) {
		this.confirmPassword = confirmPassword;
	}
	
	@AssertTrue(message="Passwords did not match")
	public boolean isMatchingPasswords() {
		return StringUtils.equals(password, confirmPassword);
	}
	
	public void setMatchingPasswords(boolean matching) {}
}<commit_msg>Prevent signup unless the password and confirmation match.<commit_after>package com.springsource.greenhouse.signup;

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.Size;

import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;

public class SignupForm {
	
	@NotEmpty
	private String firstName;

	@NotEmpty
	private String lastName;

	@NotEmpty
	@Size(max=320)
	private String email;

	@NotEmpty
	@Size(min=6)
	private String password;

	@NotEmpty
	@Size(min=6)
	private String confirmPassword;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getConfirmPassword() {
		return confirmPassword;
	}

	public void setConfirmPassword(String confirmPassword) {
		this.confirmPassword = <PASSWORD>Password;
	}
	
	@AssertTrue(message="Passwords did not match")
	public boolean isMatchingPasswords() {
		return StringUtils.equals(password, confirmPassword);
	}
}
{'fraction_non_alphanumeric': 0.09045760908123449, 'fraction_numerical': 0.0035473572188719402, 'mean_word_length': 4.887265135699374, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '981101', 'n_tokens_mistral': 927, 'n_tokens_neox': 861, 'n_words': 213}