<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd>
<duplication lines="83" tokens="272">
<file line="190" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\LinkTag.java"/>
<file line="153" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\logic\RedirectTag.java"/>
<codefragment>
<![CDATA[
    }

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPage() {
        return (this.page);
    }

    public void setPage(String page) {
        this.page = page;
    }

    public String getAction() {
        return (this.action);
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getModule() {
        return (this.module);
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getParamId() {
        return (this.paramId);
    }

    public void setParamId(String paramId) {
        this.paramId = paramId;
    }

    public String getParamName() {
        return (this.paramName);
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamProperty() {
        return (this.paramProperty);
    }

    public void setParamProperty(String paramProperty) {
        this.paramProperty = paramProperty;
    }

    public String getParamScope() {
        return (this.paramScope);
    }

    public void setParamScope(String paramScope) {
        this.paramScope = paramScope;
    }

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getScope() {
        return (this.scope);
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public boolean getTransaction() {
]]>
</codefragment>
</duplication>
<duplication lines="67" tokens="219">
<file line="254" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\ImgTag.java"/>
<file line="206" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\LinkTag.java"/>
<codefragment>
<![CDATA[
    }

    public String getAction() {
        return (this.action);
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getModule() {
        return (this.module);
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getParamId() {
        return (this.paramId);
    }

    public void setParamId(String paramId) {
        this.paramId = paramId;
    }

    public String getParamName() {
        return (this.paramName);
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamProperty() {
        return (this.paramProperty);
    }

    public void setParamProperty(String paramProperty) {
        this.paramProperty = paramProperty;
    }

    public String getParamScope() {
        return (this.paramScope);
    }

    public void setParamScope(String paramScope) {
        this.paramScope = paramScope;
    }

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getScope() {
        return (this.scope);
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getTarget() {
]]>
</codefragment>
</duplication>
<duplication lines="67" tokens="218">
<file line="254" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\ImgTag.java"/>
<file line="169" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\logic\RedirectTag.java"/>
<codefragment>
<![CDATA[
    }

    public String getAction() {
        return (this.action);
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getModule() {
        return (this.module);
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getParamId() {
        return (this.paramId);
    }

    public void setParamId(String paramId) {
        this.paramId = paramId;
    }

    public String getParamName() {
        return (this.paramName);
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamProperty() {
        return (this.paramProperty);
    }

    public void setParamProperty(String paramProperty) {
        this.paramProperty = paramProperty;
    }

    public String getParamScope() {
        return (this.paramScope);
    }

    public void setParamScope(String paramScope) {
        this.paramScope = paramScope;
    }

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getScope() {
        return (this.scope);
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public boolean getTransaction() {
]]>
</codefragment>
</duplication>
<duplication lines="48" tokens="158">
<file line="308" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\OptionsCollectionTag.java"/>
<file line="317" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\OptionsTag.java"/>
<codefragment>
<![CDATA[
    protected void addOption(StringBuffer sb, String value, String label,
        boolean matched) {
        sb.append("<option value=\"");

        if (filter) {
            sb.append(TagUtils.getInstance().filter(value));
        } else {
            sb.append(value);
        }

        sb.append("\"");

        if (matched) {
            sb.append(" selected=\"selected\"");
        }

        if (style != null) {
            sb.append(" style=\"");
            sb.append(style);
            sb.append("\"");
        }

        if (styleClass != null) {
            sb.append(" class=\"");
            sb.append(styleClass);
            sb.append("\"");
        }

        sb.append(">");

        if (filter) {
            sb.append(TagUtils.getInstance().filter(label));
        } else {
            sb.append(label);
        }

        sb.append("</option>\r\n");
    }

    /**
     * Return an iterator for the option labels or values, based on our
     * configured properties.
     *
     * @param name     Name of the bean attribute (if any)
     * @param property Name of the bean property (if any)
     * @throws JspException if an error occurs
     */
    protected Iterator getIterator(String name, String property)
]]>
</codefragment>
</duplication>
<duplication lines="75" tokens="152">
<file line="40" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\HeaderTag.java"/>
<file line="36" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\ParameterTag.java"/>
<codefragment>
<![CDATA[
public class ParameterTag extends TagSupport {
    /**
     * The message resources for this package.
     */
    protected static MessageResources messages =
        MessageResources.getMessageResources(
            "org.apache.struts.taglib.bean.LocalStrings");

    // ------------------------------------------------------------- Properties

    /**
     * The name of the scripting variable that will be exposed as a page scope
     * attribute.
     */
    protected String id = null;

    /**
     * Return an array of parameter values if <code>multiple</code> is
     * non-null.
     */
    protected String multiple = null;

    /**
     * The name of the parameter whose value is to be exposed.
     */
    protected String name = null;

    /**
     * The default value to return if no parameter of the specified name is
     * found.
     */
    protected String value = null;

    public String getId() {
        return (this.id);
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMultiple() {
        return (this.multiple);
    }

    public void setMultiple(String multiple) {
        this.multiple = multiple;
    }

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return (this.value);
    }

    public void setValue(String value) {
        this.value = value;
    }

    // --------------------------------------------------------- Public Methods

    /**
     * Retrieve the required property and expose it as a scripting variable.
     *
     * @throws JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {
        // Deal with a single parameter value
        if (multiple == null) {
]]>
</codefragment>
</duplication>
<duplication lines="72" tokens="150">
<file line="40" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\CookieTag.java"/>
<file line="40" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\HeaderTag.java"/>
<codefragment>
<![CDATA[
public class HeaderTag extends TagSupport {
    /**
     * The message resources for this package.
     */
    protected static MessageResources messages =
        MessageResources.getMessageResources(
            "org.apache.struts.taglib.bean.LocalStrings");

    // ------------------------------------------------------------- Properties

    /**
     * The name of the scripting variable that will be exposed as a page scope
     * attribute.
     */
    protected String id = null;

    /**
     * Return an array of header values if <code>multiple</code> is non-null.
     */
    protected String multiple = null;

    /**
     * The name of the header whose value is to be exposed.
     */
    protected String name = null;

    /**
     * The default value to return if no header of the specified name is
     * found.
     */
    protected String value = null;

    public String getId() {
        return (this.id);
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMultiple() {
        return (this.multiple);
    }

    public void setMultiple(String multiple) {
        this.multiple = multiple;
    }

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return (this.value);
    }

    public void setValue(String value) {
        this.value = value;
    }

    // --------------------------------------------------------- Public Methods

    /**
     * Retrieve the required property and expose it as a scripting variable.
     *
     * @throws JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {
]]>
</codefragment>
</duplication>
<duplication lines="22" tokens="125">
<file line="144" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\logic\CompareTagBase.java"/>
<file line="105" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\logic\MatchTag.java"/>
<codefragment>
<![CDATA[
        String variable = null;

        if (cookie != null) {
            Cookie[] cookies =
                ((HttpServletRequest) pageContext.getRequest()).getCookies();

            if (cookies == null) {
                cookies = new Cookie[0];
            }

            for (int i = 0; i < cookies.length; i++) {
                if (cookie.equals(cookies[i].getName())) {
                    variable = cookies[i].getValue();

                    break;
                }
            }
        } else if (header != null) {
            variable =
                ((HttpServletRequest) pageContext.getRequest()).getHeader(header);
        } else if (name != null) {
            Object value =
]]>
</codefragment>
</duplication>
<duplication lines="14" tokens="118">
<file line="355" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\OptionsCollectionTag.java"/>
<file line="406" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\OptionsTag.java"/>
<codefragment>
<![CDATA[
        if (collection.getClass().isArray()) {
            collection = Arrays.asList((Object[]) collection);
        }

        if (collection instanceof Collection) {
            return (((Collection) collection).iterator());
        } else if (collection instanceof Iterator) {
            return ((Iterator) collection);
        } else if (collection instanceof Map) {
            return (((Map) collection).entrySet().iterator());
        } else if (collection instanceof Enumeration) {
            return new IteratorAdapter((Enumeration) collection);
        } else {
            throw new JspException(messages.getMessage("optionsTag.iterator",
]]>
</codefragment>
</duplication>
<duplication lines="34" tokens="116">
<file line="113" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\ErrorsTag.java"/>
<file line="114" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\html\MessagesTag.java"/>
<codefragment>
<![CDATA[
    public String getBundle() {
        return (this.bundle);
    }

    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

    public String getLocale() {
        return (this.locale);
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getHeader() {
        return (this.header);
]]>
</codefragment>
</duplication>
<duplication lines="40" tokens="109">
<file line="97" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\DefineTag.java"/>
<file line="86" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\bean\SizeTag.java"/>
<codefragment>
<![CDATA[
    public String getId() {
        return (this.id);
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getScope() {
        return (this.scope);
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    // --------------------------------------------------------- Public Methods

    /**
     * Retrieve the required property and expose it as a scripting variable.
     *
     * @throws JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedNotEmptyTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedNotEqualTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedNotMatchTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedNotPresentTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedPresentTag.java"/>
<codefragment>
<![CDATA[
public class NestedPresentTag extends PresentTag implements NestedNameSupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedMessagesNotPresentTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedMessagesPresentTag.java"/>
<codefragment>
<![CDATA[
    implements NestedPropertySupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedMultiboxTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedOptionsCollectionTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedPasswordTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedRadioTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedSelectTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedTextareaTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedTextTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedEmptyTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedEqualTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedGreaterEqualTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedGreaterThanTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedLessEqualTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedLessThanTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedMatchTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedNotEmptyTag.java"/>
<codefragment>
<![CDATA[
public class NestedNotEmptyTag extends NotEmptyTag implements NestedNameSupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedMessagesTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\logic\NestedMessagesNotPresentTag.java"/>
<codefragment>
<![CDATA[
    implements NestedPropertySupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="36" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedFileTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedHiddenTag.java"/>
<file line="36" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedImgTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedMultiboxTag.java"/>
<codefragment>
<![CDATA[
public class NestedMultiboxTag extends MultiboxTag implements NestedNameSupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedErrorsTag.java"/>
<file line="38" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedMessagesTag.java"/>
<codefragment>
<![CDATA[
    implements NestedPropertySupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="103">
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\bean\NestedDefineTag.java"/>
<file line="36" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\bean\NestedMessageTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\bean\NestedSizeTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\bean\NestedWriteTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedCheckboxTag.java"/>
<file line="36" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedFileTag.java"/>
<codefragment>
<![CDATA[
public class NestedFileTag extends FileTag implements NestedNameSupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
<duplication lines="59" tokens="101">
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\bean\NestedDefineTag.java"/>
<file line="37" path="C:\Workspace\STRUTS_1_3_BRANCH\taglib\src\main\java\org\apache\struts\taglib\nested\html\NestedErrorsTag.java"/>
<codefragment>
<![CDATA[
public class NestedErrorsTag extends ErrorsTag implements NestedPropertySupport {
    /* the usual private member variables */
    private String originalName = null;
    private String originalProperty = null;

    /**
     * Overriding method of the heart of the matter. Gets the relative
     * property and leaves the rest up to the original tag implementation.
     * Sweet.
     *
     * @return int JSP continuation directive. This is in the hands of the
     *         super class.
     */
    public int doStartTag() throws JspException {
        // get the original properties
        originalName = getName();
        originalProperty = getProperty();

        // request
        HttpServletRequest request =
            (HttpServletRequest) pageContext.getRequest();

        // set the properties
        NestedPropertyHelper.setNestedProperties(request, this);

        // let the super do it's thing
        return super.doStartTag();
    }

    /**
     * Complete the processing of the tag. The nested tags here will restore
     * all the original value for the tag itself and the nesting context.
     *
     * @return int to describe the next step for the JSP processor
     * @throws JspException for the bad things JSP's do
     */
    public int doEndTag() throws JspException {
        // do the super's ending part
        int i = super.doEndTag();

        // reset the properties
        setName(originalName);
        setProperty(originalProperty);

        // continue
        return i;
    }

    /**
     * Release the tag's resources and reset the values.
     */
    public void release() {
        super.release();

        // reset the originals
        originalName = null;
        originalProperty = null;
    }
}
]]>
</codefragment>
</duplication>
</pmd-cpd>