<commit_before>package actionForm;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class DeletePhoneNumberValidationForm extends ActionForm {
	private static final long serialVersionUID = 1L;
	
	private long id = 0;   
	private String phoneNumber 	= null;
	private String phoneKind 	= null;
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	public String getPhoneNumber() {
		return phoneNumber;
	}
	
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	public String getPhoneKind() {
		return phoneKind;
	}
	
	public void setPhoneKind(String phoneKind) {
		this.phoneKind = phoneKind;
	}
	
	public void reset(ActionMapping mapping, HttpServletRequest request) {
	  	this.id = 0;
	    this.phoneNumber	= null;
	    this.phoneKind 		= null;
	}

	public ActionErrors validate(
		ActionMapping mapping, HttpServletRequest request ) {
		ActionErrors errors = new ActionErrors();
		      
		if( getPhoneNumber() == null || getPhoneNumber().length() < 2 &&
				getPhoneKind() == null || getPhoneKind().length() < 1) {
			errors.add("phonenumber ", new ActionMessage("phonenumber.delete.error"));
		}
		
		return errors;
	}
}
<commit_msg>Fix bug with Delete phone number validation<commit_after>package actionForm;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class DeletePhoneNumberValidationForm extends ActionForm {
	private static final long serialVersionUID = 1L;
	
	private long id = 0;   
	private String phoneNumber 	= null;
	private String phoneKind 	= null;
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	public String getPhoneNumber() {
		return phoneNumber;
	}
	
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	public String getPhoneKind() {
		return phoneKind;
	}
	
	public void setPhoneKind(String phoneKind) {
		this.phoneKind = phoneKind;
	}
	
	public void reset(ActionMapping mapping, HttpServletRequest request) {
	  	this.id = 0;
	    this.phoneNumber	= null;
	    this.phoneKind 		= null;
	}

	public ActionErrors validate(
		ActionMapping mapping, HttpServletRequest request ) {
		ActionErrors errors = new ActionErrors();
		      
		if((getPhoneNumber() == null || getPhoneNumber().length() < 2) &&
				(getPhoneKind() == null || getPhoneKind().length() < 1)) {
			errors.add("phonenumber ", new ActionMessage("phonenumber.delete.error"));
		}
		
		return errors;
	}
}

{'fraction_non_alphanumeric': 0.10059795990151249, 'fraction_numerical': 0.0035174111853675696, 'mean_word_length': 4.078571428571428, 'pattern_counts': {'":': 0, '<': 7, '<?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': '130419', 'n_tokens_mistral': 941, 'n_tokens_neox': 848, 'n_words': 215}