Buggy code:
public abstract class Tree extends AbstractTree implements TreeModelListener { public static final String JUNCTION_IMAGE_NAME = "junctionImage" ; public static final String NODE_IMAGE_NAME = "nodeImage" ; private static final ResourceReference BLANK = new StaticResourceReference ( Tree . class , "blank.gif" ) ; private static final ResourceReference MINUS = new StaticResourceReference ( Tree . class , "minus.gif" ) ; private static final ResourceReference PLUS = new StaticResourceReference ( Tree . class , "plus.gif" ) ; private boolean optimizeItemRemoval = true ; private final Tree . TreePathsModel treePathsModel ; private final Tree . TreePathsListView treePathsListView ; private final class SelectedPathReplacementModel extends Model { private final DefaultMutableTreeNode node ; public SelectedPathReplacementModel ( DefaultMutableTreeNode node ) { } public Object getObject ( final Component component ) { } } private final class SpacerList extends Loop { public SpacerList ( String id , int size ) { } protected void populateItem ( final Loop . LoopItem loopItem ) { } } private final class TreePathsListView extends ListView { public TreePathsListView ( String name ) { } public boolean getOptimizeItemRemoval ( ) { } protected ListItem newItem ( final int index ) { } protected void populateItem ( ListItem listItem ) { } } private final class TreePathsModel extends AbstractReadOnlyDetachableModel { boolean dirty = true ; private List paths = new ArrayList ( ) ; void add ( int index , DefaultMutableTreeNode node ) { } void remove ( DefaultMutableTreeNode node ) { } int indexOf ( DefaultMutableTreeNode node ) { } protected void onAttach ( ) { } protected void onDetach ( ) { } protected Object onGetObject ( Component component ) { } public IModel getNestedModel ( ) { } } private final class NodePanel extends Panel { public NodePanel ( final String id , final DefaultMutableTreeNode node ) { } } public Tree ( final String id , final TreeModel model ) { } public Tree ( String id , TreeState treeState ) { } public boolean getOptimizeItemRemoval ( ) { } public void setOptimizeItemRemoval ( boolean optimizeItemRemoval ) { } public void treeNodesChanged ( TreeModelEvent e ) { } public void treeNodesInserted ( TreeModelEvent e ) { } public void treeNodesRemoved ( TreeModelEvent e ) { } public void treeStructureChanged ( TreeModelEvent e ) { } protected void internalOnBeginRequest ( ) { } protected Tree . NodePanel newNodePanel ( String panelId , DefaultMutableTreeNode node ) { } protected final Tree . TreePathsListView createTreePathsListView ( ) { } protected boolean equals ( final TreePath path , final TreePath selectedPath ) { } protected Image getJunctionImage ( final DefaultMutableTreeNode node ) { } protected Image getNodeImage ( final DefaultMutableTreeNode node ) { <START_BUG> return new Image ( Tree . JUNCTION_IMAGE_NAME , Tree . BLANK ) ; <END_BUG> } protected String getNodeLabel ( final DefaultMutableTreeNode node ) { } protected void junctionLinkClicked ( final DefaultMutableTreeNode node ) { } protected void nodeLinkClicked ( final DefaultMutableTreeNode node ) { } private final Link createJunctionLink ( final DefaultMutableTreeNode node ) { } private final Link createNodeLink ( final DefaultMutableTreeNode node ) { } private String getCssClassForRow ( ) { } private String getCssClassForSelectedRow ( ) { } }

Fix:
return new Image ( Tree . NODE_IMAGE_NAME , Tree . BLANK ) ;