<commit_before>package cec.model;

import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Search {

	String source;
	String patternToFind;
	
	Search(String source, String patternToFind)
	{
		this.patternToFind = patternToFind;
		this.source = source;
	}
	
	private boolean isMatch()
	{
		Pattern pattern = Pattern.compile(patternToFind);
		Matcher matcher = pattern.matcher(source);
		return matcher.find();		
	}
	public boolean isEmailStringMatch()
	{
		return isMatch();		
	}
	
}<commit_msg>Search<commit_after>package cec.model;

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

public class Search {

	String source;
	String patternToFind;
	
	Search(String source, String patternToFind)
	{		
		this.patternToFind=modifiedString(patternToFind.toUpperCase());
		this.source=modifiedString(source.toUpperCase());
		
		//this.patternToFind = patternToFind.toUpperCase();
		//this.source = source.toUpperCase();
	}
	
	
	private String modifiedString(String originalString)
	{
		String modifiedString=originalString;
		
		String toRemove="[[^A-Z]&&[^0-9]&&[^@]&&[^-]&&[^_]]";
		Pattern pattern = Pattern.compile(toRemove);
		Matcher matcher = pattern.matcher(originalString);//.toUpperCase());
		
		if(matcher.find())				
			modifiedString=matcher.replaceAll("");	
		
		return modifiedString;	
		
	}
	
	
	
	public boolean isMatch()
	{		
		Pattern pattern = Pattern.compile(patternToFind);
		Matcher matcher = pattern.matcher(source);
		return matcher.find();		
	}
	
}
{'fraction_non_alphanumeric': 0.12907518296739853, 'fraction_numerical': 0.0013306719893546241, 'mean_word_length': 4.4296028880866425, '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': '6870300', 'n_tokens_mistral': 537, 'n_tokens_neox': 473, 'n_words': 89}