Buggy code:
class NewWizardNewPage implements ISelectionChangedListener { private static final String DIALOG_SETTING_SECTION_NAME = "NewWizardSelectionPage." ; private static final int SIZING_LISTS_HEIGHT = 200 ; private static final int SIZING_VIEWER_WIDTH = 300 ; private static final String STORE_EXPANDED_CATEGORIES_ID = ( NewWizardNewPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_EXPANDED_CATEGORIES_ID" ; private static final String STORE_SELECTED_ID = ( NewWizardNewPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_SELECTED_ID" ; private NewWizardSelectionPage page ; private FilteredTree filteredTree ; private WizardPatternFilter filteredTreeFilter ; private Hashtable selectedWizards = new Hashtable ( ) ; private IDialogSettings settings ; private Button showAllCheck ; private IWizardCategory wizardCategories ; private IWizardDescriptor [ ] primaryWizards ; private CLabel descImageCanvas ; private Map imageTable = new HashMap ( ) ; private IWizardDescriptor selectedElement ; private WizardActivityFilter filter = new WizardActivityFilter ( ) ; private boolean needShowAll ; private boolean projectsOnly ; private ViewerFilter projectFilter = new WizardTagFilter ( new String [ ] { WorkbenchWizardElement . TAG_PROJECT } ) ; public NewWizardNewPage ( NewWizardSelectionPage mainPage , IWizardCategory wizardCategories , IWizardDescriptor [ ] primaryWizards , boolean projectsOnly ) { } private boolean allActivityEnabled ( IWizardCategory category ) { } private void trimPrimaryWizards ( ) { } private boolean allPrimary ( IWizardCategory category ) { } private boolean isPrimary ( IWizardDescriptor wizard ) { } public void activate ( ) { } protected Control createControl ( Composite parent ) { } protected FilteredTree createFilteredTree ( Composite parent ) { Composite composite = new Composite ( parent , SWT . NONE ) ; GridLayout layout = new GridLayout ( ) ; layout . marginHeight = 0 ; layout . marginWidth = 0 ; composite . setLayout ( layout ) ; GridData data = new GridData ( SWT . FILL , SWT . FILL , true , true ) ; data . widthHint = NewWizardNewPage . SIZING_VIEWER_WIDTH ; data . horizontalSpan = 2 ; data . grabExcessHorizontalSpace = true ; data . grabExcessVerticalSpace = true ; boolean needsHint = DialogUtil . inRegularFontMode ( parent ) ; if ( needsHint ) { data . heightHint = NewWizardNewPage . SIZING_LISTS_HEIGHT ; } composite . setLayoutData ( data ) ; filteredTreeFilter = new WizardPatternFilter ( ) ; FilteredTree filterTree = new FilteredTree ( composite , ( ( ( ( SWT . SINGLE ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) | ( SWT . BORDER ) ) , filteredTreeFilter ) ; final TreeViewer treeViewer = filterTree . getViewer ( ) ; treeViewer . setContentProvider ( new WizardContentProvider ( ) ) ; treeViewer . setLabelProvider ( new WorkbenchLabelProvider ( ) ) ; <START_BUG> treeViewer . setSorter ( INSTANCE ) ; <END_BUG> treeViewer . addSelectionChangedListener ( this ) ; ArrayList inputArray = new ArrayList ( ) ; for ( int i = 0 ; i < ( primaryWizards . length ) ; i ++ ) { inputArray . add ( primaryWizards [ i ] ) ; } boolean expandTop = false ; if ( ( wizardCategories ) != null ) { if ( ( wizardCategories . getParent ( ) ) == null ) { IWizardCategory [ ] children = wizardCategories . getCategories ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { inputArray . add ( children [ i ] ) ; } } else { expandTop = true ; inputArray . add ( wizardCategories ) ; } } if ( expandTop ) { treeViewer . setAutoExpandLevel ( 2 ) ; } AdaptableList input = new AdaptableList ( inputArray ) ; treeViewer . setInput ( input ) ; filterTree . setBackground ( parent . getDisplay ( ) . getSystemColor ( COLOR_WIDGET_BACKGROUND ) ) ; treeViewer . getTree ( ) . setFont ( parent . getFont ( ) ) ; treeViewer . addDoubleClickListener ( new IDoubleClickListener ( ) { public void doubleClick ( DoubleClickEvent event ) { IStructuredSelection s = ( ( IStructuredSelection ) ( event . getSelection ( ) ) ) ; selectionChanged ( new SelectionChangedEvent ( event . getViewer ( ) , s ) ) ; Object element = s . getFirstElement ( ) ; if ( treeViewer . isExpandable ( element ) ) { treeViewer . setExpandedState ( element , ( ! ( treeViewer . getExpandedState ( element ) ) ) ) ; } else if ( element instanceof WorkbenchWizardElement ) { page . advanceToNextPageOrFinish ( ) ; } } } ) ; treeViewer . addFilter ( filter ) ; if ( projectsOnly ) { treeViewer . addFilter ( projectFilter ) ; } Dialog . applyDialogFont ( filterTree ) ; return filterTree ; } private void createOptionsButtons ( Composite parent ) { } private void createImage ( Composite parent ) { } protected void expandPreviouslyExpandedCategories ( ) { } protected Object getSingleSelection ( IStructuredSelection selection ) { } protected void restoreWidgetValues ( ) { } public void saveWidgetValues ( ) { } public void selectionChanged ( SelectionChangedEvent selectionEvent ) { } protected void selectPreviouslySelected ( ) { } public void setDialogSettings ( IDialogSettings settings ) { } protected void storeExpandedCategories ( ) { } protected void storeSelectedCategoryAndWizard ( ) { } private void updateDescription ( IWizardDescriptor selectedObject ) { } private boolean hasImage ( IWizardDescriptor selectedObject ) { } private void updateWizardSelection ( IWizardDescriptor selectedObject ) { } }

Fix:
treeViewer . setComparator ( INSTANCE ) ;