Buggy code:
public class WicketTagComponentResolver implements IComponentResolver { private static Log log = LogFactory . getLog ( WicketTagComponentResolver . class ) ; public static int autoIndex = 0 ; public boolean resolve ( final Container container , final MarkupStream markupStream , final ComponentTag tag ) { } private Component createComponent ( final ComponentWicketTag tag ) { String componentName = tag . getNameAttribute ( ) ; if ( componentName == null ) { componentName = "anonymous-" + ( WicketTagComponentResolver . autoIndex ) ; ( WicketTagComponentResolver . autoIndex ) ++ ; } final String classname = tag . getAttributes ( ) . getString ( "class" ) ; <START_BUG> final Class clazz = RequestCycle . get ( ) . getApplication ( ) . getSettings ( ) . getPageFactory ( ) . getClassInstance ( classname ) ; <END_BUG> final Component component ; try { final Constructor constructor = clazz . getConstructor ( new Class [ ] { String . class } ) ; component = ( ( Component ) ( constructor . newInstance ( new Object [ ] { componentName } ) ) ) ; } catch ( NoSuchMethodException ex ) { throw new RenderException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Component<seq2seq4repair_space>derived<seq2seq4repair_space>from<seq2seq4repair_space>wicket<seq2seq4repair_space>tag" , ex ) ; } catch ( InvocationTargetException ex ) { throw new RenderException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Component<seq2seq4repair_space>derived<seq2seq4repair_space>from<seq2seq4repair_space>wicket<seq2seq4repair_space>tag" , ex ) ; } catch ( IllegalAccessException ex ) { throw new RenderException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Component<seq2seq4repair_space>derived<seq2seq4repair_space>from<seq2seq4repair_space>wicket<seq2seq4repair_space>tag" , ex ) ; } catch ( InstantiationException ex ) { throw new RenderException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Component<seq2seq4repair_space>derived<seq2seq4repair_space>from<seq2seq4repair_space>wicket<seq2seq4repair_space>tag" , ex ) ; } catch ( ClassCastException ex ) { throw new RenderException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>Component<seq2seq4repair_space>derived<seq2seq4repair_space>from<seq2seq4repair_space>wicket<seq2seq4repair_space>tag" , ex ) ; } final Iterator iter = tag . getAttributes ( ) . entrySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { final Map . Entry entry = ( ( Map . Entry ) ( iter . next ( ) ) ) ; final String key = ( ( String ) ( entry . getKey ( ) ) ) ; final String value = ( ( String ) ( entry . getKey ( ) ) ) ; if ( ( "name" . equalsIgnoreCase ( key ) ) || ( "class" . equalsIgnoreCase ( key ) ) ) { continue ; } final String methodName = "set" + key ; final Method [ ] methods = component . getClass ( ) . getMethods ( ) ; Method method = null ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { if ( methods [ i ] . getName ( ) . equalsIgnoreCase ( methodName ) ) { method = methods [ i ] ; } } if ( method == null ) { throw new RenderException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>Component.<seq2seq4repair_space>Method<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>" + methodName ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } final Class [ ] parameterClasses = method . getParameterTypes ( ) ; if ( ( parameterClasses . length ) != 1 ) { throw new RenderException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>Component.<seq2seq4repair_space>Method<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>" + methodName ) + "<seq2seq4repair_space>must<seq2seq4repair_space>have<seq2seq4repair_space>one<seq2seq4repair_space>and<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>parameter" ) ) ; } final Class paramClass = parameterClasses [ 0 ] ; try { if ( paramClass . equals ( String . class ) ) { method . invoke ( component , new Object [ ] { value } ) ; } else if ( paramClass . equals ( int . class ) ) { method . invoke ( component , new Object [ ] { new Integer ( tag . getAttributes ( ) . getInt ( key ) ) } ) ; } else if ( paramClass . equals ( long . class ) ) { method . invoke ( component , new Object [ ] { new Long ( tag . getAttributes ( ) . getLong ( key ) ) } ) ; } } catch ( IllegalAccessException ex ) { throw new RenderException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>Component.<seq2seq4repair_space>Failure<seq2seq4repair_space>while<seq2seq4repair_space>invoking<seq2seq4repair_space>method<seq2seq4repair_space>" + methodName ) , ex ) ; } catch ( InvocationTargetException ex ) { throw new RenderException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>Component.<seq2seq4repair_space>Failure<seq2seq4repair_space>while<seq2seq4repair_space>invoking<seq2seq4repair_space>method<seq2seq4repair_space>" + methodName ) , ex ) ; } catch ( StringValueConversionException ex ) { throw new RenderException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>Component.<seq2seq4repair_space>Failure<seq2seq4repair_space>while<seq2seq4repair_space>invoking<seq2seq4repair_space>method<seq2seq4repair_space>" + methodName ) , ex ) ; } } return component ; } }

Fix:
final Class clazz = RequestCycle . get ( ) . getApplication ( ) . getSettings ( ) . getDefaultPageFactory ( ) . classForName ( classname ) ;