<commit_before>package gov.nih.nci.cananolab.dto.common;

import gov.nih.nci.cananolab.domain.common.ExperimentConfig;
import gov.nih.nci.cananolab.domain.common.Instrument;
import gov.nih.nci.cananolab.domain.common.Technique;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;

/**
 * View bean for technique and associated instruments;
 *
 * @author pansu, tanq
 *
 */
public class ExperimentConfigBean {
	private ExperimentConfig domain;
	private String displayName;
	private List<Instrument> instruments = new ArrayList<Instrument>(20);

	public ExperimentConfigBean() {
		domain = new ExperimentConfig();
		domain.setTechnique(new Technique());
		instruments.add(new Instrument());
	}

	public ExperimentConfigBean(ExperimentConfig config) {
		domain = config;
		for (Instrument instrument : config.getInstrumentCollection()) {
			instruments.add(instrument);
		}
	}

	public ExperimentConfig getDomain() {
		return domain;
	}

	public void setDomain(ExperimentConfig domain) {
		this.domain = domain;
	}

	public String getDisplayName() {
		if (domain.getTechnique().getAbbreviation() != null) {
			displayName = domain.getTechnique().getType() + "("
					+ domain.getTechnique().getAbbreviation() + ")";
		} else {
			displayName = domain.getTechnique().getType();
		}
		return displayName;
	}

	public void addInstrument() {
		instruments.add(new Instrument());
	}

	public void removeInstrument(int ind) {
		instruments.remove(ind);
	}

	/**
	 * @return the instruments
	 */
	public List<Instrument> getInstruments() {
		return instruments;<commit_msg>updated getDisplayName<commit_after>package gov.nih.nci.cananolab.dto.common;

import gov.nih.nci.cananolab.domain.common.ExperimentConfig;
import gov.nih.nci.cananolab.domain.common.Instrument;
import gov.nih.nci.cananolab.domain.common.Technique;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;

/**
 * View bean for technique and associated instruments;
 *
 * @author pansu, tanq
 *
 */
public class ExperimentConfigBean {
	private ExperimentConfig domain;
	private String displayName;
	private List<Instrument> instruments = new ArrayList<Instrument>(20);

	public ExperimentConfigBean() {
		domain = new ExperimentConfig();
		domain.setTechnique(new Technique());
		instruments.add(new Instrument());
	}

	public ExperimentConfigBean(ExperimentConfig config) {
		domain = config;
		for (Instrument instrument : config.getInstrumentCollection()) {
			instruments.add(instrument);
		}
	}

	public ExperimentConfig getDomain() {
		return domain;
	}

	public void setDomain(ExperimentConfig domain) {
		this.domain = domain;
	}

	public String getDisplayName() {
		if (domain.getTechnique().getAbbreviation() != null
				&& domain.getTechnique().getAbbreviation().trim().length() > 0) {
			displayName = domain.getTechnique().getType() + "("
					+ domain.getTechnique().getAbbreviation() + ")";
		} else {
			displayName = domain.getTechnique().getType();
		}
		return displayName;
	}

	public void addInstrument() {
		instruments.add(new Instrument());
	}

	public void removeInstrument(int ind) {
		instruments.remove(ind);
	}

	/**
	 * @return the instruments
	 */
	public List<Instrument> getInstruments() {
		return instruments;
{'fraction_non_alphanumeric': 0.12333333333333334, 'fraction_numerical': 0.0015151515151515152, 'mean_word_length': 4.791228070175438, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '936409', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1008, 'n_words': 206}