Buggy code:
public abstract class FormComponent extends WebMarkupContainer implements IFormProcessingListener { public static interface IVisitor { public Object formComponent ( IFormProcessingListener formComponent ) { } } public abstract static class AbstractVisitor implements FormComponent . IVisitor { public Object formComponent ( IFormProcessingListener component ) { } protected abstract void onFormComponent ( FormComponent formComponent ) { } } private final class RequiredStateChange extends Change { private static final long serialVersionUID = 1L ; private final boolean required = isRequired ( ) ; public void undo ( ) { } } public static String VALUE_SEPARATOR = ";" ; protected static final short FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL = FLAG_RESERVED1 ; private static final String [ ] EMPTY_STRING_ARRAY = new String [ ] { "" } ; private static final short FLAG_PERSISTENT = FLAG_RESERVED2 ; private static final short FLAG_REQUIRED = FLAG_RESERVED3 ; private static final String NO_RAW_INPUT = "[-NO-RAW-INPUT-]" ; private static final long serialVersionUID = 1L ; private transient Object convertedInput ; private IModel labelModel = null ; private String rawInput = FormComponent . NO_RAW_INPUT ; private Class type ; private Object validators = null ; public FormComponent ( final String id ) { } public FormComponent ( final String id , IModel model ) { } public final FormComponent add ( final IValidator validator ) { } public final boolean checkRequired ( ) { } public final void clearInput ( ) { } public final void error ( List resourceKeys , Map args ) { } public final Object getConvertedInput ( ) { } public Form getForm ( ) { } public String getInput ( ) { } public String [ ] getInputAsArray ( ) { } public String getInputName ( ) { String id = getId ( ) ; final PrependingStringBuffer inputName = new PrependingStringBuffer ( id . length ( ) ) ; Component c = this ; while ( true ) { inputName . prepend ( id ) ; c = c . getParent ( ) ; <START_BUG> if ( ( ( c == null ) || ( c instanceof Form ) ) || ( c instanceof Page ) ) { <END_BUG> break ; } inputName . prepend ( PATH_SEPARATOR ) ; id = c . getId ( ) ; } if ( inputName . equals ( "submit" ) ) { inputName . prepend ( PATH_SEPARATOR ) ; } return inputName . toString ( ) ; } public IModel getLabel ( ) { } public final String getRawInput ( ) { } public final Class getType ( ) { } public String getValidatorKeyPrefix ( ) { } public final List getValidators ( ) { } public final String getValue ( ) { } public final boolean hasRawInput ( ) { } public final void inputChanged ( ) { } public final void invalid ( ) { } public boolean isInputNullable ( ) { } public boolean isMultiPart ( ) { } public final boolean isPersistent ( ) { } public boolean isRequired ( ) { } public final boolean isValid ( ) { } public final boolean isValidated ( ) { } public final void processInput ( ) { } public FormComponent setLabel ( final IModel labelModel ) { } public void setModelValue ( final String value ) { } public void setModelValue ( final String [ ] value ) { } public final FormComponent setPersistent ( final boolean persistent ) { } public final FormComponent setRequired ( final boolean required ) { } public final FormComponent setType ( Class type ) { } public void updateModel ( ) { } public final void valid ( ) { } public final void validate ( ) { } protected final void convert ( ) { } protected Object convertValue ( String [ ] value ) throws ConversionException { } protected String getModelValue ( ) { } protected final int inputAsInt ( ) { } protected final int inputAsInt ( final int defaultValue ) { } protected final int [ ] inputAsIntArray ( ) { } protected final String [ ] inputAsStringArray ( ) { } protected void internalOnModelChanged ( ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onDisabled ( final ComponentTag tag ) { } protected void onDetach ( ) { } protected void onInvalid ( ) { } protected void onValid ( ) { } protected boolean supportsPersistence ( ) { } protected final void validateRequired ( ) { } protected final void validateValidators ( ) { } private void validators_add ( final IValidator validator ) { } private IValidator validators_get ( int index ) { } private int validators_size ( ) { } public boolean processChildren ( ) { } }

Fix:
if ( ( ( c == null ) || ( ( c instanceof Form ) && ( ( ( Form ) ( c ) ) . isRootForm ( ) ) ) ) || ( c instanceof Page ) ) {