Buggy code:
public class FormTester { protected abstract class ChoiceSelector { private final class SearchOptionByIndexVisitor implements IVisitor < Component > { int count = 0 ; private final int index ; private SearchOptionByIndexVisitor ( int index ) { } public Object component ( Component component ) { } } private final FormComponent < ? > formComponent ; protected ChoiceSelector ( FormComponent < ? > formComponent ) { } protected abstract void assignValueToFormComponent ( FormComponent < ? > formComponent , String value ) { } protected final void doSelect ( final int index ) { } @ SuppressWarnings ( "unchecked" ) private String selectAbstractChoice ( FormComponent < ? > formComponent , final int index ) { } } private class ChoiceSelectorFactory { private final class MultipleChoiceSelector extends FormTester . ChoiceSelector { protected MultipleChoiceSelector ( FormComponent < ? > formComponent ) { } @ Override protected void assignValueToFormComponent ( FormComponent < ? > formComponent , String value ) { } } private final class SingleChoiceSelector extends FormTester . ChoiceSelector { protected SingleChoiceSelector ( FormComponent < ? > formComponent ) { } @ Override protected void assignValueToFormComponent ( FormComponent < ? > formComponent , String value ) { } } protected FormTester . ChoiceSelector create ( FormComponent < ? > formComponent ) { } protected FormTester . ChoiceSelector createForMultiple ( FormComponent < ? > formComponent ) { } private boolean allowMultipleChoice ( FormComponent < ? > formComponent ) { } } private final FormTester . ChoiceSelectorFactory choiceSelectorFactory = new FormTester . ChoiceSelectorFactory ( ) ; private boolean closed = false ; private final String path ; private final BaseWicketTester baseWicketTester ; private final Form < ? > workingForm ; protected FormTester ( final String path , final Form < ? > workingForm , final BaseWicketTester wicketTester , final boolean fillBlankString ) { } public Form < ? > getForm ( ) { } public String getTextComponentValue ( String id ) { } public void select ( String formComponentId , int index ) { } public void selectMultiple ( String formComponentId , int [ ] indexes ) { } public void selectMultiple ( String formComponentId , int [ ] indexes , final boolean replace ) { } public void setValue ( final String formComponentId , final String value ) { } public void setValue ( String checkBoxId , boolean value ) { } public void setFile ( final String formComponentId , final File file , final String contentType ) { } public void submit ( ) { } private boolean isMultiPart ( ) { try { Field multiPart = Form . class . getDeclaredField ( "multiPart" ) ; multiPart . setAccessible ( true ) ; <START_BUG> return multiPart . getBoolean ( workingForm ) ; <END_BUG> } catch ( SecurityException e ) { throw new RuntimeException ( e ) ; } catch ( NoSuchFieldException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } } public void submit ( String buttonComponentId ) { } public void submitLink ( String path , final boolean pageRelative ) { } private void addFormComponentValue ( FormComponent < ? > formComponent , String value ) { } private void checkClosed ( ) { } private boolean parameterExist ( FormComponent < ? > formComponent ) { } private void setFormComponentValue ( FormComponent < ? > formComponent , String value ) { } private void setFormSubmittingComponentValue ( IFormSubmittingComponent component , String value ) { } private void fail ( String message ) { } }

Fix:
return ( multiPart . getShort ( workingForm ) ) != 0 ;