Buggy code:
private final class TreeItem extends AbstractItem { private static final int FLAG_RENDER_CHILDREN = FLAG_RESERVED8 ; private static final long serialVersionUID = 1L ; private List < AbstractTree . TreeItem > children = null ; private final int level ; private final AbstractTree . TreeItem parent ; public TreeItem ( AbstractTree . TreeItem parent , String id , final Object node , int level ) { } public AbstractTree . TreeItem getParentItem ( ) { } public List < AbstractTree . TreeItem > getChildren ( ) { } public int getLevel ( ) { } @ Override public String getMarkupId ( ) { } public void setChildren ( List < AbstractTree . TreeItem > children ) { } protected final boolean isRenderChildren ( ) { } @ Override protected void onRender ( ) { } public Object getModelObject ( ) { } @ Override public void renderHead ( final HtmlHeaderContainer container ) { } protected final void setRenderChildren ( boolean value ) { } @ Override protected void onDetach ( ) { } @ Override protected void onBeforeRender ( ) { } @ Override protected void onAfterRender ( ) { } private boolean hasParentWithChildrenMarkedToRecreation ( ) { } } private class TreeItemContainer extends WebMarkupContainer { private static final long serialVersionUID = 1L ; public TreeItemContainer ( String id ) { } @ Override public void remove ( Component component ) { } @ Override protected void onRender ( ) { } } private boolean attached = false ; private final AppendingStringBuffer deleteIds = new AppendingStringBuffer ( ) ; private boolean dirtyAll = false ; private final Set < AbstractTree . TreeItem > dirtyItems = new HashSet < AbstractTree . TreeItem > ( ) ; private final Set < AbstractTree . TreeItem > dirtyItemsCreateDOM = new HashSet < AbstractTree . TreeItem > ( ) ; private int idCounter = 0 ; private AbstractTree . TreeItemContainer itemContainer ; private final Map < Object , AbstractTree . TreeItem > nodeToItemMap = new HashMap < Object , AbstractTree . TreeItem > ( ) ; private TreeModel previousModel = null ; private AbstractTree . TreeItem rootItem = null ; private boolean rootLess = false ; private ITreeState state ; public AbstractTree ( String id ) { } public AbstractTree ( String id , IModel < ? extends TreeModel > model ) { } public final void allNodesCollapsed ( ) { } public final void allNodesExpanded ( ) { } @ SuppressWarnings ( "unchecked" ) public IModel < ? extends TreeModel > getModel ( ) { } public TreeModel getModelObject ( ) { } public MarkupContainer setModel ( IModel < ? extends TreeModel > model ) { } public MarkupContainer setModelObject ( TreeModel model ) { } public ITreeState getTreeState ( ) { } protected void onBeforeAttach ( ) { } private void onBeforeRenderInternal ( ) { } @ Override public void onBeforeRender ( ) { } @ Override public void onDetach ( ) { } public final void invalidateAll ( ) { } public final boolean isRootLess ( ) { } public final void nodeCollapsed ( Object node ) { } public final void nodeExpanded ( Object node ) { } public final void nodeSelected ( Object node ) { } public final void nodeUnselected ( Object node ) { } protected boolean isForceRebuildOnSelectionChange ( ) { } public void setRootLess ( boolean rootLess ) { } public final void treeNodesChanged ( TreeModelEvent e ) { } private void markTheLastButOneChildDirty ( AbstractTree . TreeItem parent , AbstractTree . TreeItem child ) { } public final void treeNodesInserted ( TreeModelEvent e ) { } public final void treeNodesRemoved ( TreeModelEvent e ) { } public final void treeStructureChanged ( TreeModelEvent e ) { } public final void updateTree ( ) { } protected void addComponent ( AjaxRequestTarget target , Component component ) { <START_BUG> target . addComponent ( component ) ; <END_BUG> } public void onTargetRespond ( AjaxRequestTarget target ) { } public final void updateTree ( final AjaxRequestTarget target ) { } protected final boolean isNodeExpanded ( Object node ) { } protected ITreeState newTreeState ( ) { } @ Override protected void onAfterRender ( ) { } protected abstract void populateTreeItem ( WebMarkupContainer item , int level ) { } private void buildItemChildren ( AbstractTree . TreeItem item ) { } private List < AbstractTree . TreeItem > buildTreeItems ( AbstractTree . TreeItem parent , Iterator < Object > nodes , int level ) { } private void checkModel ( ) { } private void clearAllItem ( ) { } private String getElementsDeleteJavascript ( ) { } private String getShortItemId ( AbstractTree . TreeItem item ) { } private static final ResourceReference JAVASCRIPT = new JavascriptResourceReference ( AbstractTree . class , "res//tree.js" ) ; private void init ( ) { } public final void markNodeDirty ( Object node ) { } public final void markNodeChildrenDirty ( Object node ) { } private void invalidateNode ( Object node , boolean forceRebuild ) { } private void invalidateNodeWithChildren ( Object node ) { } private boolean isNodeVisible ( Object node ) { } public Object getParentNode ( Object node ) { } private AbstractTree . TreeItem newTreeItem ( AbstractTree . TreeItem parent , Object node , int level ) { } private AbstractTree . TreeItem newTreeItem ( AbstractTree . TreeItem parent , Object node , int level , String id ) { } public final Iterator < Object > nodeChildren ( Object node ) { } public final Object getChildAt ( Object parent , int index ) { } public final boolean isLeaf ( Object node ) { } public final int getChildCount ( Object parent ) { } private TreeModel getTreeModel ( ) { } private void rebuildDirty ( ) { } private void removeItem ( AbstractTree . TreeItem item ) { } private void updated ( ) { } private void visitItemAndChildren ( AbstractTree . TreeItem item , AbstractTree . IItemCallback callback ) { }

Fix:
target . add ( component ) ;