Buggy code:
public class Form extends WebMarkupContainer implements IFormSubmitListener { public static final String METHOD_POST = "post" ; public static final String METHOD_GET = "get" ; abstract static class ValidationVisitor implements FormComponent . IVisitor { public Object formComponent ( IFormProcessingListener component ) { } public abstract void validate ( FormComponent formComponent ) { } } private static final String UPLOAD_TOO_LARGE_RESOURCE_KEY = "uploadTooLarge" ; private static final String UPLOAD_FAILED_RESOURCE_KEY = "uploadFailed" ; private static final short FLAG_SUBMITTED = FLAG_RESERVED1 ; private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( Form . class ) ; private Bytes maxSize = Bytes . MAX ; private boolean multiPart = false ; private String javascriptId ; private Object formValidators = null ; private Button defaultButton ; public Form ( final String id ) { } public Form ( final String id , IModel model ) { } protected String getMethod ( ) { } protected boolean getStatelessHint ( ) { } public final Button getDefaultButton ( ) { } public Bytes getMaxSize ( ) { } public final void loadPersistentFormComponentValues ( ) { } public final void onFormSubmitted ( ) { } public final boolean isSubmitted ( ) { } protected void onDetach ( ) { } public void removePersistentFormComponentValues ( final boolean disablePersistence ) { } public final void setDefaultButton ( Button button ) { } public void setMaxSize ( final Bytes maxSize ) { } public void setMultiPart ( boolean multiPart ) { } public final Component setVersioned ( final boolean isVersioned ) { } public boolean isVersioned ( ) { } public final void visitFormComponentsPostOrder ( final FormComponent . IVisitor visitor ) { } public final void visitFormComponents ( final FormComponent . IVisitor visitor ) { } protected void appendDefaultButtonField ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void beforeUpdateFormComponentModels ( ) { } protected void delegateSubmit ( IFormSubmittingComponent submittingButton ) { } public final IFormSubmittingComponent findSubmittingButton ( ) { IFormSubmittingComponent submittingButton = ( ( IFormSubmittingComponent ) ( getPage ( ) . visitChildren ( IFormSubmittingComponent . class , new IVisitor ( ) { public Object component ( final Component component ) { final IFormSubmittingComponent submit = ( ( IFormSubmittingComponent ) ( component ) ) ; <START_BUG> if ( ( ( submit . getForm ( ) ) == ( Form . this ) ) && ( ( ( getRequest ( ) . getParameter ( submit . getInputName ( ) ) ) != null ) || ( ( getRequest ( ) . getParameter ( ( ( submit . getInputName ( ) ) + ".x" ) ) ) != null ) ) ) { <END_BUG> if ( ! ( component . isVisible ( ) ) ) { throw new org . apache . wicket . WicketRuntimeException ( ( ( ( ( "Submit<seq2seq4repair_space>Button<seq2seq4repair_space>" + ( submit . getInputName ( ) ) ) + "<seq2seq4repair_space>(path=" ) + ( component . getPageRelativePath ( ) ) ) + ")<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>visible" ) ) ; } return submit ; } return CONTINUE_TRAVERSAL ; } } ) ) ) ; return submittingButton ; } protected IValuePersister getValuePersister ( ) { } public final boolean hasError ( ) { } protected void internalOnModelChanged ( ) { } protected final void markFormComponentsInvalid ( ) { } protected final void markFormComponentsValid ( ) { } protected final String getHiddenFieldId ( ) { } protected final String getJavascriptId ( ) { } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onError ( ) { } protected void onRender ( final MarkupStream markupStream ) { } protected void onSubmit ( ) { } public boolean process ( ) { } protected final void updateFormComponentModels ( ) { } public final void clearInput ( ) { } protected void validate ( ) { } protected final void validateRequired ( ) { } protected final void validateConversion ( ) { } protected final void validateValidators ( ) { } protected final void validateFormValidators ( ) { } protected final void validateFormValidator ( final IFormValidator validator ) { } private boolean anyFormComponentError ( ) { } protected boolean handleMultiPart ( ) { } private void persistFormComponentData ( ) { } private void dispatchEvent ( final Page page , final String url ) { } private void inputChanged ( ) { } public final CharSequence getJsForInterfaceUrl ( CharSequence url ) { } class FormDispatchRequest extends Request { private final Request realRequest ; private final String url ; private final ValueMap params = new ValueMap ( ) ; public FormDispatchRequest ( final Request realRequest , final String url ) { } public Locale getLocale ( ) { } public String getParameter ( String key ) { } public Map getParameterMap ( ) { } public String [ ] getParameters ( String key ) { } public String getPath ( ) { } public String getRelativeURL ( ) { } public String getURL ( ) { } } public String getValidatorKeyPrefix ( ) { } public void add ( IFormValidator validator ) { } private void formValidators_add ( final IFormValidator validator ) { } private IFormValidator formValidators_get ( int index ) { } private int formValidators_size ( ) { } public final void error ( String error , Map args ) { } public boolean isRootForm ( ) { } public Form getRootForm ( ) { } }

Fix:
if ( ( ( submit . getForm ( ) . getRootForm ( ) ) == ( Form . this ) ) && ( ( ( getRequest ( ) . getParameter ( submit . getInputName ( ) ) ) != null ) || ( ( getRequest ( ) . getParameter ( ( ( submit . getInputName ( ) ) + ".x" ) ) ) != null ) ) ) {