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 Log log = LogFactory . getLog ( 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 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 ( ) { } protected IValuePersister getValuePersister ( ) { } public final boolean hasError ( ) { } protected void internalOnModelChanged ( ) { visitFormComponents ( new FormComponent . AbstractVisitor ( ) { public void onFormComponent ( final FormComponent formComponent ) { <START_BUG> if ( formComponent . sameRootModel ( Form . this ) ) { <END_BUG> formComponent . modelChanged ( ) ; } } } ) ; } 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 ( formComponent . sameInnermostModel ( Form . this ) ) {