<commit_before>package ${packagePath}.${component.getPackage()}.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;

/**
 * <a href="Base${component.getSafeName()}Tag.java.html"><b><i>View Source</i></b></a>
 *
<#list authors as author>
 * @author ${author}
</#list>
 */
public class Base${component.getSafeName()}Tag extends ${component.getParentClass()} {

	public int doStartTag() throws JspException {
		setAttributeNamespace(_ATTRIBUTE_NAMESPACE);

		return super.doStartTag();
	}

	<#if component.isBodyContent() == true>
	protected String getEndPage() {
		return _END_PAGE;
	}

	protected String getStartPage() {
		return _START_PAGE;
	}

	<#else>
	protected String getPage() {
		return _PAGE;
	}

	</#if>
	<#list component.getAttributesAndEvents() as attribute>
	public ${attribute.getInputType()} get${attribute.getCapitalizedName()}() {
		return _${attribute.getSafeName()};
	}

	</#list>
	<#list component.getAttributesAndEvents() as attribute>
	public void set${attribute.getCapitalizedName()}(${attribute.getInputType()} ${attribute.getSafeName()}) {
		_${attribute.getSafeName()} = ${attribute.getSafeName()};

		setScopedAttribute("${attribute.getSafeName()}", ${attribute.getSafeName()});
	}

	</#list>
	protected void setAttributes(HttpServletRequest request) {
		<#list component.getAttributesAndEvents() as attribute>
		setNamespacedAttribute(request, "${attribute.getSafeName()}", _${attribute.getSafeName()});
		</#list><commit_msg>Alloy Taglibs Add cleanUp() auto generation<commit_after><#compress>
<#assign BLANK = "">
<#assign QUOTE = "\"">

<#function isQuoted simpleClassName>
	<#return (simpleClassName == "String") />
</#function>

<#function useDefaultValue simpleClassName>
	<#return ((simpleClassName == "String") || (simpleClassName == "Integer") || (simpleClassName == "Boolean") || (simpleClassName == "Double") || (simpleClassName == "Float") || (simpleClassName == "Long") || (simpleClassName == "Short") || (simpleClassName == "Number")) />
</#function>

<#function getDefaultValue simpleClassName defaultValue>
	<#assign defaultValueOutput = "null">

	<#if (defaultValue?? && (defaultValue != BLANK) && useDefaultValue(simpleClassName))>
		<#if isQuoted(simpleClassName)>
			<#assign defaultValueOutput = QUOTE + defaultValue + QUOTE>
		<#else>
			<#assign defaultValueOutput = defaultValue>
		</#if>
	</#if>

	<#return defaultValueOutput />
</#function>
</#compress>
package ${packagePath}.${component.getPackage()}.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;

/**
 * <a href="Base${component.getSafeName()}Tag.java.html"><b><i>View Source</i></b></a>
 *
<#list authors as author>
 * @author ${author}
</#list>
 */
public class Base${component.getSafeName()}Tag extends ${component.getParentClass()} {

	public int doStartTag() throws JspException {
		setAttributeNamespace(_ATTRIBUTE_NAMESPACE);

		return super.doStartTag();
	}

	<#list component.getAttributesAndEvents() as attribute>
	public ${attribute.getInputType()} get${attribute.getCapitalizedName()}() {
		return _${attribute.getSafeName()};
	}

	</#list>
	<#list component.getAttributesAndEvents() as attribute>
	public void set${attribute.getCapitalizedName()}(${attribute.getInputType()} ${attribute.getSafeName()}) {
		_${attribute.getSafeName()} = ${attribute.getSafeName()};

		setScopedAttribute("${attribute.getSafeName()}", ${attribute.getSafeName()});
	}

	</#list>

	protected void cleanUp() {
	<#list component.getAttributesAndEvents() as attribute>
		<#compress>
		<#assign outputSimpleClassName = attribute.getOutputTypeSimpleClassName()>

		<#assign defaultValue = "null">

		<#if attribute.getDefaultValue()??>
			<#assign defaultValue = getDefaultValue(outputSimpleClassName, attribute.getDefaultValue())>
		</#if>
		</#compress>
		_${attribute.getSafeName()} = ${defaultValue};
	</#list>
	}

	<#if component.isBodyContent() == true>
	protected String getEndPage() {
		return _END_PAGE;
	}

	protected String getStartPage() {
		return _START_PAGE;
	}

	<#else>
	protected String getPage() {
		return _PAGE;
	}

	</#if>
	
	protected void setAttributes(HttpServletRequest request) {
		<#list component.getAttributesAndEvents() as attribute>
		setNamespacedAttribute(request, "${attribute.getSafeName()}", _${attribute.getSafeName()});
		</#list>
{'fraction_non_alphanumeric': 0.17107381007128075, 'fraction_numerical': 0.0, 'mean_word_length': 6.225913621262459, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '4158712', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1350, 'n_words': 259}