<commit_before>package gov.nih.nci.calab.dto.inventory;

import org.displaytag.decorator.TableDecorator;

/**
 * This decorator is used to for decorate different properties of a sample container to be
 * shown properly in the view page using display tag lib.
 * 
 * @author pansu
 * 
 */
public class ContainerDecorator extends TableDecorator {
	public String getContainerId() throws Exception {
		ContainerBean container = (ContainerBean) getCurrentRowObject();
		String checked = "";
		if (getListIndex() == 0) {
			checked = "checked";
		}
		String containerIdstr = "<input type='radio' name='containerId' value='"
				+ container.getContainerId() + "' " + checked + ">";

		return containerIdstr;
	}
}<commit_msg>updated to check containerId<commit_after>package gov.nih.nci.calab.dto.inventory;

import org.displaytag.decorator.TableDecorator;

/**
 * This decorator is used to for decorate different properties of a sample
 * container to be shown properly in the view page using display tag lib.
 * 
 * @author pansu
 * 
 */
public class ContainerDecorator extends TableDecorator {
	public String getContainerId() throws Exception {
		ContainerBean container = (ContainerBean) getCurrentRowObject();
		String checked = "";
		if (getPageContext().getAttribute("containerId") != null
				&& ((String) getPageContext().getAttribute("containerId"))
						.equals(container.getContainerId())) {
			checked = "checked";
		} else if (getListIndex() == 0) {
			checked = "checked";
		} else {
			checked = "";
		}
		String containerIdstr = "<input type='radio' name='containerId' value='"
				+ container.getContainerId() + "' " + checked + ">";

		return containerIdstr;
	}
}
{'fraction_non_alphanumeric': 0.12059701492537313, 'fraction_numerical': 0.0011940298507462687, 'mean_word_length': 4.406451612903226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4228105', 'n_tokens_mistral': 524, 'n_tokens_neox': 478, 'n_words': 138}