Buggy code:
public class AjaxEditableLabel extends Panel { private static final long serialVersionUID = 1L ; private FormComponent editor ; private Component label ; protected class EditorAjaxBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public EditorAjaxBehavior ( ) { } protected void onComponentTag ( ComponentTag tag ) { } protected void respond ( AjaxRequestTarget target ) { } } protected class LabelAjaxBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; public LabelAjaxBehavior ( String event ) { } protected void onEvent ( AjaxRequestTarget target ) { } } public AjaxEditableLabel ( String id ) { } public AjaxEditableLabel ( String id , IModel model ) { } public final AjaxEditableLabel add ( IValidator validator ) { } public final AjaxEditableLabel setLabel ( final IModel labelModel ) { } public final Component setModel ( IModel model ) { } public final AjaxEditableLabel setRequired ( final boolean required ) { } public final AjaxEditableLabel setType ( Class type ) { } protected FormComponent newEditor ( MarkupContainer parent , String componentId , IModel model ) { } protected Component newLabel ( MarkupContainer parent , String componentId , IModel model ) { } protected final FormComponent getEditor ( ) { } protected final Component getLabel ( ) { } protected void onBeforeRender ( ) { } protected void onCancel ( AjaxRequestTarget target ) { } protected void onEdit ( AjaxRequestTarget target ) { label . setVisible ( false ) ; editor . setVisible ( true ) ; target . addComponent ( this ) ; <START_BUG> target . appendJavascript ( ( ( ( ( ( ( "{<seq2seq4repair_space>var<seq2seq4repair_space>el=wicketGet('" + ( editor . getMarkupId ( ) ) ) + "');" ) + "<seq2seq4repair_space>el.focus();<seq2seq4repair_space>" ) + "<seq2seq4repair_space>if<seq2seq4repair_space>(el.createTextRange)<seq2seq4repair_space>{<seq2seq4repair_space>" ) + "<seq2seq4repair_space>var<seq2seq4repair_space>v<seq2seq4repair_space>=<seq2seq4repair_space>el.value;<seq2seq4repair_space>var<seq2seq4repair_space>r<seq2seq4repair_space>=<seq2seq4repair_space>el.createTextRange();<seq2seq4repair_space>" ) + "<seq2seq4repair_space>r.moveStart('character',<seq2seq4repair_space>v.length);<seq2seq4repair_space>r.select();<seq2seq4repair_space>}<seq2seq4repair_space>}" ) ) ; <END_BUG> target . focusComponent ( editor ) ; } protected void onError ( AjaxRequestTarget target ) { } protected void onSubmit ( AjaxRequestTarget target ) { } private void initLabelAndEditor ( IModel model ) { } private IModel getParentModel ( ) { } protected String defaultNullLabel ( ) { } }

Fix:
target . appendJavascript ( ( ( ( ( ( "{<seq2seq4repair_space>var<seq2seq4repair_space>el=wicketGet('" + ( editor . getMarkupId ( ) ) ) + "');" ) + "<seq2seq4repair_space>if<seq2seq4repair_space>(el.createTextRange)<seq2seq4repair_space>{<seq2seq4repair_space>" ) + "<seq2seq4repair_space>var<seq2seq4repair_space>v<seq2seq4repair_space>=<seq2seq4repair_space>el.value;<seq2seq4repair_space>var<seq2seq4repair_space>r<seq2seq4repair_space>=<seq2seq4repair_space>el.createTextRange();<seq2seq4repair_space>" ) + "<seq2seq4repair_space>r.moveStart('character',<seq2seq4repair_space>v.length);<seq2seq4repair_space>r.select();<seq2seq4repair_space>}<seq2seq4repair_space>}" ) ) ;