<commit_before>package com.vmware;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Employee {
	private String name;
	private String ssn;

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public String getSsn() {
		return ssn;
	}

	public void setSsn(String ssn) throws IllegalArgumentException {

		Pattern pattern = Pattern.compile("\\d{3}-\\d{2}-\\d{4}");
		Matcher matcher = pattern.matcher(ssn);
		if (!matcher.matches()) {
			throw new IllegalArgumentException(ssn+ " is not a valid social security number");
		}
		this.ssn = ssn;
	}
}<commit_msg>refactored employee<commit_after>package com.vmware;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Employee {
	private String name;
	private String ssn;
	private Matcher matcher;
	private Pattern pattern;
	public Employee () {
		pattern = Pattern.compile("\\d{3}-\\d{2}-\\d{4}");
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public String getSsn() {
		return ssn;
	}

	public void setSsn(String ssn) throws IllegalArgumentException {
		matcher = pattern.matcher(ssn);
		if (!matcher.matches()) {
			throw new IllegalArgumentException(ssn+ " is not a valid social security number");
		}
		this.ssn = ssn;
	}
}
{'fraction_non_alphanumeric': 0.12462908011869436, 'fraction_numerical': 0.004451038575667656, 'mean_word_length': 3.9595588235294117, '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': '6704804', 'n_tokens_mistral': 481, 'n_tokens_neox': 447, 'n_words': 121}