<commit_before>/**
 * 
 */
package gov.nih.nci.calab.dto.common;

import gov.nih.nci.calab.domain.ProtocolFile;

/**
 * @author zengje
 * 
 */
public class ProtocolFileBean extends LabFileBean {
	private ProtocolBean protocolBean = new ProtocolBean();

	/**
	 * 
	 */
	public ProtocolFileBean() {
		super();
	}

	public ProtocolFileBean(ProtocolFile protocolFile) {
		super(protocolFile);
		protocolBean=new ProtocolBean(protocolFile.getProtocol());
	}

	public ProtocolBean getProtocolBean() {
		return protocolBean;
	}

	public void setProtocolBean(ProtocolBean protocolBean) {
		this.protocolBean = protocolBean;
	}
	public int compareTo(Object obj) {
		int comparison = 0;
		if (obj instanceof ProtocolFileBean) {
			ProtocolFileBean inPb = (ProtocolFileBean) obj;
			
			if (this.getName() != null){
				comparison = this.getName().compareTo(inPb.getName());
				if (comparison == 0){
					if (this.getVersion() != null)
						comparison = this.getVersion().compareTo(inPb.getVersion());
				}
			}
			else {
				if (this.getVersion() != null){
					comparison = this.getVersion().compareTo(inPb.getVersion());
				}
			}
		}
		return comparison;
	}

	public boolean equals(Object obj) {
		boolean eq = false;
		if (obj instanceof ProtocolFileBean) {
			ProtocolFileBean c = (ProtocolFileBean) obj;
			String thisId = this.getId();
			// String name = this.getName();
			if (thisId != null && thisId.equals(c.getId())) { // &&
				// name != null && name.equals(c.getName())) {
				eq = true;
			}
		}
		return eq;
	}
}
<commit_msg>commented out compareTo() since it is not implementing Comparable().<commit_after>/**
 * 
 */
package gov.nih.nci.calab.dto.common;

import gov.nih.nci.calab.domain.ProtocolFile;

/**
 * @author zengje
 * 
 */
public class ProtocolFileBean extends LabFileBean {
	private ProtocolBean protocolBean = new ProtocolBean();

	/**
	 * 
	 */
	public ProtocolFileBean() {
		super();
	}

	public ProtocolFileBean(ProtocolFile protocolFile) {
		super(protocolFile);
		protocolBean=new ProtocolBean(protocolFile.getProtocol());
	}

	public ProtocolBean getProtocolBean() {
		return protocolBean;
	}

	public void setProtocolBean(ProtocolBean protocolBean) {
		this.protocolBean = protocolBean;
	}
//	public int compareTo(Object obj) {
//		int comparison = 0;
//		if (obj instanceof ProtocolFileBean) {
//			ProtocolFileBean inPb = (ProtocolFileBean) obj;
//			
//			if (this.getName() != null){
//				comparison = this.getName().compareTo(inPb.getName());
//				if (comparison == 0){
//					if (this.getVersion() != null)
//						comparison = this.getVersion().compareTo(inPb.getVersion());
//				}
//			}
//			else {
//				if (this.getVersion() != null){
//					comparison = this.getVersion().compareTo(inPb.getVersion());
//				}
//			}
//		}
//		return comparison;
//	}

	public boolean equals(Object obj) {
		boolean eq = false;
		if (obj instanceof ProtocolFileBean) {
			ProtocolFileBean c = (ProtocolFileBean) obj;
			String thisId = this.getId();
			// String name = this.getName();
			if (thisId != null && thisId.equals(c.getId())) { // &&
				// name != null && name.equals(c.getName())) {
				eq = true;
			}
		}
		return eq;
	}
}

{'fraction_non_alphanumeric': 0.15052066898075103, 'fraction_numerical': 0.0012622278321236984, 'mean_word_length': 3.307065217391304, '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': '6983257', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1019, 'n_words': 218}