Buggy code:
public class FormTag extends AbstractHtmlElementTag { private static final String DEFAULT_METHOD = "post" ; public static final String DEFAULT_COMMAND_NAME = "command" ; private static final String MODEL_ATTRIBUTE = "modelAttribute" ; public static final String MODEL_ATTRIBUTE_VARIABLE_NAME = Conventions . getQualifiedAttributeName ( AbstractFormTag . class , FormTag . MODEL_ATTRIBUTE ) ; private static final String DEFAULT_METHOD_PARAM = "_method" ; private static final String FORM_TAG = "form" ; private static final String INPUT_TAG = "input" ; private static final String ACTION_ATTRIBUTE = "action" ; private static final String METHOD_ATTRIBUTE = "method" ; private static final String TARGET_ATTRIBUTE = "target" ; private static final String ENCTYPE_ATTRIBUTE = "enctype" ; private static final String ACCEPT_CHARSET_ATTRIBUTE = "accept-charset" ; private static final String ONSUBMIT_ATTRIBUTE = "onsubmit" ; private static final String ONRESET_ATTRIBUTE = "onreset" ; private static final String AUTOCOMPLETE_ATTRIBUTE = "autocomplete" ; private static final String NAME_ATTRIBUTE = "name" ; private static final String VALUE_ATTRIBUTE = "value" ; private static final String TYPE_ATTRIBUTE = "type" ; private TagWriter tagWriter ; private String modelAttribute = FormTag . DEFAULT_COMMAND_NAME ; private String name ; private String action ; private String method = FormTag . DEFAULT_METHOD ; private String target ; private String enctype ; private String acceptCharset ; private String onsubmit ; private String onreset ; private String autocomplete ; private String methodParam = FormTag . DEFAULT_METHOD_PARAM ; private String previousNestedPath ; public void setModelAttribute ( String modelAttribute ) { } protected String getModelAttribute ( ) { } public void setCommandName ( String commandName ) { } protected String getCommandName ( ) { } public void setName ( String name ) { } @ Override protected String getName ( ) throws JspException { } public void setAction ( String action ) { } protected String getAction ( ) { } public void setMethod ( String method ) { } protected String getMethod ( ) { } public void setTarget ( String target ) { } public String getTarget ( ) { } public void setEnctype ( String enctype ) { } protected String getEnctype ( ) { } public void setAcceptCharset ( String acceptCharset ) { } protected String getAcceptCharset ( ) { } public void setOnsubmit ( String onsubmit ) { } protected String getOnsubmit ( ) { } public void setOnreset ( String onreset ) { } protected String getOnreset ( ) { } public void setAutocomplete ( String autocomplete ) { } protected String getAutocomplete ( ) { } public void setMethodParam ( String methodParam ) { } protected String getMethodParameter ( ) { } protected boolean isMethodBrowserSupported ( String method ) { } @ Override protected int writeTagContent ( TagWriter tagWriter ) throws JspException { this . tagWriter = tagWriter ; tagWriter . startTag ( FormTag . FORM_TAG ) ; writeDefaultAttributes ( tagWriter ) ; tagWriter . writeAttribute ( FormTag . ACTION_ATTRIBUTE , resolveAction ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . METHOD_ATTRIBUTE , ( isMethodBrowserSupported ( getMethod ( ) ) ? getMethod ( ) : FormTag . DEFAULT_METHOD ) ) ; writeOptionalAttribute ( tagWriter , FormTag . TARGET_ATTRIBUTE , getTarget ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . ENCTYPE_ATTRIBUTE , getEnctype ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . ACCEPT_CHARSET_ATTRIBUTE , getAcceptCharset ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . ONSUBMIT_ATTRIBUTE , getOnsubmit ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . ONRESET_ATTRIBUTE , getOnreset ( ) ) ; writeOptionalAttribute ( tagWriter , FormTag . AUTOCOMPLETE_ATTRIBUTE , getAutocomplete ( ) ) ; tagWriter . forceBlock ( ) ; if ( ! ( isMethodBrowserSupported ( getMethod ( ) ) ) ) { String inputName = getMethodParameter ( ) ; String inputType = "hidden" ; tagWriter . startTag ( FormTag . INPUT_TAG ) ; writeOptionalAttribute ( tagWriter , FormTag . TYPE_ATTRIBUTE , inputType ) ; writeOptionalAttribute ( tagWriter , FormTag . NAME_ATTRIBUTE , inputName ) ; <START_BUG> writeOptionalAttribute ( tagWriter , FormTag . VALUE_ATTRIBUTE , processFieldValue ( getName ( ) , getMethod ( ) , inputType ) ) ; <END_BUG> tagWriter . endTag ( ) ; } String modelAttribute = resolveModelAttribute ( ) ; this . pageContext . setAttribute ( FormTag . MODEL_ATTRIBUTE_VARIABLE_NAME , modelAttribute , REQUEST_SCOPE ) ; this . pageContext . setAttribute ( COMMAND_NAME_VARIABLE_NAME , modelAttribute , REQUEST_SCOPE ) ; this . previousNestedPath = ( ( String ) ( this . pageContext . getAttribute ( NESTED_PATH_VARIABLE_NAME , REQUEST_SCOPE ) ) ) ; this . pageContext . setAttribute ( NESTED_PATH_VARIABLE_NAME , ( modelAttribute + ( PropertyAccessor . NESTED_PROPERTY_SEPARATOR ) ) , REQUEST_SCOPE ) ; return EVAL_BODY_INCLUDE ; } @ Override protected String autogenerateId ( ) throws JspException { } protected String resolveModelAttribute ( ) throws JspException { } protected String resolveAction ( ) throws JspException { } private String processAction ( String action ) { } @ Override public int doEndTag ( ) throws JspException { } private void writeHiddenFields ( Map < String , String > hiddenFields ) throws JspException { } @ Override public void doFinally ( ) { } @ Override protected String resolveCssClass ( ) throws JspException { } @ Override public void setPath ( String path ) { } @ Override public void setCssErrorClass ( String cssErrorClass ) { } }

Fix:
writeOptionalAttribute ( tagWriter , FormTag . VALUE_ATTRIBUTE , processFieldValue ( inputName , getMethod ( ) , inputType ) ) ;