Buggy code:
public class ListMultipleChoice < T > extends AbstractChoice < Collection < T > , T > { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( ListMultipleChoice . class ) ; private static int defaultMaxRows = 8 ; private int maxRows = ListMultipleChoice . defaultMaxRows ; protected static int getDefaultMaxRows ( ) { } @ SuppressWarnings ( "unchecked" ) protected static void setDefaultMaxRows ( final int defaultMaxRows ) { } public ListMultipleChoice ( MarkupContainer parent , final String id ) { } public ListMultipleChoice ( MarkupContainer parent , final String id , final List < T > choices ) { } public ListMultipleChoice ( MarkupContainer parent , final String id , final List < T > choices , final int maxRows ) { } public ListMultipleChoice ( MarkupContainer parent , final String id , final List < T > choices , final IChoiceRenderer < T > renderer ) { } public ListMultipleChoice ( MarkupContainer parent , final String id , IModel < Collection < T > > object , final List < T > choices ) { } public ListMultipleChoice ( MarkupContainer parent , final String id , IModel < Collection < T > > object , final List < T > choices , final IChoiceRenderer < T > renderer ) { } public ListMultipleChoice ( MarkupContainer parent , String id , IModel < List < T > > choices ) { } public ListMultipleChoice ( MarkupContainer parent , String id , IModel < Collection < T > > model , IModel < List < T > > choices ) { } public ListMultipleChoice ( MarkupContainer parent , String id , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public ListMultipleChoice ( MarkupContainer parent , String id , IModel < Collection < T > > model , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public final ListMultipleChoice < T > setMaxRows ( final int maxRows ) { } @ SuppressWarnings ( "unchecked" ) @ Override public final String getModelValue ( ) { Object modelObject = ListMultipleChoice . getModelObject ( ) ; <START_BUG> if ( ! ( modelObject instanceof Collection ) ) { <END_BUG> throw new WicketRuntimeException ( ( ( "Model<seq2seq4repair_space>object<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>ListMultipleChoice<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>Collection<seq2seq4repair_space>(found<seq2seq4repair_space>" + ( modelObject . getClass ( ) ) ) + ")" ) ) ; } final Collection < T > selectedValues = ( ( Collection < T > ) ( modelObject ) ) ; final AppendingStringBuffer buffer = new AppendingStringBuffer ( ) ; if ( selectedValues != null ) { final List < T > choices = ListMultipleChoice . getChoices ( ) ; for ( T object : selectedValues ) { int index = choices . indexOf ( object ) ; buffer . append ( ListMultipleChoice . getChoiceRenderer ( ) . getIdValue ( object , index ) ) ; buffer . append ( VALUE_SEPARATOR ) ; } } return buffer . toString ( ) ; } @ Override protected final boolean isSelected ( T choice , int index , String selected ) { } @ Override protected final void onComponentTag ( final ComponentTag tag ) { } @ Override protected Collection < T > convertValue ( String [ ] ids ) throws ConversionException { } @ Override public final void updateModel ( ) { } }

Fix:
if ( ( modelObject != null ) && ( ! ( modelObject instanceof Collection ) ) ) {