Buggy code:
public class RadioChoice < T > extends AbstractSingleSelectChoice < T > implements IOnChangeListener { private static final long serialVersionUID = 1L ; private class SuffixChange extends Change { private static final long serialVersionUID = 1L ; final String prevSuffix ; SuffixChange ( String prevSuffix ) { } @ Override public void undo ( ) { } @ Override public String toString ( ) { } } private class PrefixChange extends Change { private static final long serialVersionUID = 1L ; private final String prevPrefix ; PrefixChange ( String prevSuffix ) { } @ Override public void undo ( ) { } @ Override public String toString ( ) { } } private String prefix = "" ; private String suffix = "<br<seq2seq4repair_space>//>\n" ; public RadioChoice ( MarkupContainer parent , final String id ) { } public RadioChoice ( MarkupContainer parent , final String id , final List < T > choices ) { } public RadioChoice ( MarkupContainer parent , final String id , final List < T > choices , final IChoiceRenderer < T > renderer ) { } public RadioChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > choices ) { } public RadioChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > choices , final IChoiceRenderer < T > renderer ) { } public RadioChoice ( MarkupContainer parent , String id , IModel < List < T > > choices ) { } public RadioChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices ) { } public RadioChoice ( MarkupContainer parent , String id , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public RadioChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( T newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } @ Override protected boolean getStatelessHint ( ) { } public final String getPrefix ( ) { } public final RadioChoice setPrefix ( String prefix ) { } public final String getSuffix ( ) { } public final RadioChoice < T > setSuffix ( String suffix ) { } @ Override protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { final List < T > choices = RadioChoice . getChoices ( ) ; final AppendingStringBuffer buffer = new AppendingStringBuffer ( ( ( ( choices . size ( ) ) + 1 ) * 70 ) ) ; final String selected = RadioChoice . getValue ( ) ; for ( int index = 0 ; index < ( choices . size ( ) ) ; index ++ ) { final T choice = choices . get ( index ) ; Object displayValue = RadioChoice . getChoiceRenderer ( ) . getDisplayValue ( choice ) ; Class objectClass = ( displayValue == null ) ? null : displayValue . getClass ( ) ; final String label = RadioChoice . getConverter ( objectClass ) . convertToString ( displayValue , RadioChoice . getLocale ( ) ) ; if ( label != null ) { buffer . append ( getPrefix ( ) ) ; String id = RadioChoice . getChoiceRenderer ( ) . getIdValue ( choice , index ) ; final String idAttr = ( ( RadioChoice . getInputName ( ) ) + "_" ) + id ; buffer . append ( "<input<seq2seq4repair_space>name=\"" ) . append ( RadioChoice . getInputName ( ) ) . append ( "\"" ) . append ( "<seq2seq4repair_space>type=\"radio\"" ) . append ( ( RadioChoice . isSelected ( choice , index , selected ) ? "<seq2seq4repair_space>checked=\"checked\"" : "" ) ) . append ( ( RadioChoice . isEnabled ( ) ? "" : "<seq2seq4repair_space>disabled=\"disabled\"" ) ) . append ( "<seq2seq4repair_space>value=\"" ) . append ( id ) . append ( "\"<seq2seq4repair_space>id=\"" ) . append ( idAttr ) . append ( "\"" ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = urlFor ( INTERFACE ) ; Form form = RadioChoice . findParent ( Form . class ) ; if ( form != null ) { buffer . append ( "<seq2seq4repair_space>onclick=\"" ) . append ( form . getJsForInterfaceUrl ( url ) ) . append ( ";\"" ) ; } else { <START_BUG> buffer . append ( "<seq2seq4repair_space>onclick=\"location.href=\'" ) . append ( url ) . append ( ( "&" + ( RadioChoice . getInputName ( ) ) ) ) . append ( "=" ) . append ( id ) . append ( "\';\"" ) ; <END_BUG> } } buffer . append ( "//>" ) ; String display = label ; if ( RadioChoice . localizeDisplayValues ( ) ) { display = RadioChoice . getLocalizer ( ) . getString ( label , this , label ) ; } CharSequence escaped = Strings . escapeMarkup ( display , false , true ) ; buffer . append ( "<label<seq2seq4repair_space>for=\"" ) . append ( idAttr ) . append ( "\">" ) . append ( escaped ) . append ( "<//label>" ) ; buffer . append ( getSuffix ( ) ) ; } } replaceComponentTagBody ( markupStream , openTag , buffer ) ; } }

Fix:
buffer . append ( "<seq2seq4repair_space>onclick=\"window.location.href=\'" ) . append ( url ) . append ( ( "&" + ( RadioChoice . getInputName ( ) ) ) ) . append ( "=" ) . append ( id ) . append ( "\';\"" ) ;