Buggy code:
public abstract class FormComponent < T > extends LabeledWebMarkupContainer implements IFormModelUpdateListener , IFormVisitorParticipant { private static final Logger logger = LoggerFactory . getLogger ( FormComponent . class ) ; private class MessageSource implements IErrorMessageSource { private final Set < String > triedKeys = new LinkedHashSet < String > ( ) ; public String getMessage ( String key ) { } private String prefix ( String prefix , String key ) { } private String getString ( Localizer localizer , String key , Component component ) { } public String substitute ( String string , Map < String , Object > vars ) throws IllegalStateException { } private Map < String , Object > addDefaultVars ( Map < String , Object > params ) { } private String getLabel ( ) { } } private class ValidatableAdapter implements IValidatable < T > { public void error ( IValidationError error ) { } public T getValue ( ) { } public boolean isValid ( ) { } } public static String VALUE_SEPARATOR = ";" ; private static final String [ ] EMPTY_STRING_ARRAY = new String [ ] { "" } ; private static final short FLAG_REQUIRED = FLAG_RESERVED3 ; private static final String NO_RAW_INPUT = "[-NO-RAW-INPUT-]" ; private static final long serialVersionUID = 1L ; protected static final short FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL = FLAG_RESERVED1 ; public static final < R > R visitFormComponentsPostOrder ( Component component , final IVisitor < ? extends FormComponent , R > visitor ) { } public static final < R > R visitComponentsPostOrder ( Component component , final IVisitor < Component , R > visitor ) { } private transient T convertedInput ; private String rawInput = FormComponent . NO_RAW_INPUT ; private String typeName ; private Object validators = null ; public FormComponent ( final String id ) { } public FormComponent ( final String id , IModel < T > model ) { } public final FormComponent < T > add ( final IValidator < ? super T > validator ) { } public final FormComponent < T > add ( final IValidator < ? super T > ... validators ) { } public boolean checkRequired ( ) { } public final void clearInput ( ) { } public void error ( IValidationError error ) { } public final T getConvertedInput ( ) { } public final void setConvertedInput ( T convertedInput ) { } public Form < ? > getForm ( ) { } public String getInput ( ) { } public String [ ] getInputAsArray ( ) { } public String getInputName ( ) { String id = FormComponent . getId ( ) ; final PrependingStringBuffer inputName = new PrependingStringBuffer ( id . length ( ) ) ; Component c = this ; while ( true ) { inputName . prepend ( id ) ; c = c . getParent ( ) ; if ( ( ( c == null ) || ( ( c instanceof Form < ? > ) && ( ( ( Form < ? > ) ( c ) ) . isRootForm ( ) ) ) ) || ( c instanceof Page ) ) { break ; } inputName . prepend ( PATH_SEPARATOR ) ; id = c . getId ( ) ; } <START_BUG> if ( inputName . equals ( "submit" ) ) { <END_BUG> inputName . prepend ( PATH_SEPARATOR ) ; } Form < ? > form = FormComponent . findParent ( Form . class ) ; if ( form != null ) { return ( form . getInputNamePrefix ( ) ) + ( inputName . toString ( ) ) ; } else { return inputName . toString ( ) ; } } public final String getRawInput ( ) { } @ SuppressWarnings ( "unchecked" ) public final Class < T > getType ( ) { } public String getValidatorKeyPrefix ( ) { } public final List < IValidator < ? super T > > getValidators ( ) { } public final String getValue ( ) { } public final boolean hasRawInput ( ) { } public final void inputChanged ( ) { } public final void invalid ( ) { } public boolean isInputNullable ( ) { } public boolean isMultiPart ( ) { } public boolean isRequired ( ) { } public final boolean isValid ( ) { } public boolean processChildren ( ) { } public final void processInput ( ) { } public FormComponent < T > setLabel ( IModel < String > labelModel ) { } public void setModelValue ( final String [ ] value ) { } public final FormComponent < T > setRequired ( final boolean required ) { } public final FormComponent < T > setType ( Class < ? > type ) { } public void updateModel ( ) { } public final void valid ( ) { } public void validate ( ) { } @ SuppressWarnings ( "unchecked" ) private void validators_add ( final IValidator < ? super T > validator ) { } @ SuppressWarnings ( "unchecked" ) private IValidator < T > validators_get ( int index ) { } private int validators_size ( ) { } @ SuppressWarnings ( "unchecked" ) protected void convertInput ( ) { } private void reportValidationError ( ConversionException e , ValidationError error ) { } @ SuppressWarnings ( "unchecked" ) protected T convertValue ( String [ ] value ) throws ConversionException { } protected String getModelValue ( ) { } protected final int inputAsInt ( ) { } protected final int inputAsInt ( final int defaultValue ) { } protected final int [ ] inputAsIntArray ( ) { } @ Override protected void internalOnModelChanged ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } @ Override protected void onDetach ( ) { } protected void onDisabled ( final ComponentTag tag ) { } protected void onInvalid ( ) { } protected void onValid ( ) { } protected boolean shouldTrimInput ( ) { }

Fix:
if ( "submit" . equals ( inputName . toString ( ) ) ) {