Buggy code:
public abstract class FilteredItemsSelectionDialog extends SelectionStatusDialog { private static final String DIALOG_BOUNDS_SETTINGS = "DialogBoundsSettings" ; private static final String SHOW_STATUS_LINE = "ShowStatusLine" ; private static final String HISTORY_SETTINGS = "History" ; private static final String DIALOG_HEIGHT = "DIALOG_HEIGHT" ; private static final String DIALOG_WIDTH = "DIALOG_WIDTH" ; public static final int NONE = 0 ; public static final int CARET_BEGINNING = 1 ; public static final int FULL_SELECTION = 2 ; private Text pattern ; private TableViewer list ; private FilteredItemsSelectionDialog . DetailsContentViewer details ; private ILabelProvider detailsLabelProvider ; private FilteredItemsSelectionDialog . ItemsListLabelProvider itemsListLabelProvider ; private MenuManager menuManager ; private boolean multi ; private ToolBar toolBar ; private ToolItem toolItem ; private Label progressLabel ; private FilteredItemsSelectionDialog . ToggleStatusLineAction toggleStatusLineAction ; private FilteredItemsSelectionDialog . RemoveHistoryItemAction removeHistoryItemAction ; private ActionContributionItem removeHistoryActionContributionItem ; private IStatus status ; private FilteredItemsSelectionDialog . RefreshCacheJob refreshCacheJob ; private FilteredItemsSelectionDialog . RefreshProgressMessageJob refreshProgressMessageJob = new FilteredItemsSelectionDialog . RefreshProgressMessageJob ( ) ; private Object [ ] currentSelection ; private FilteredItemsSelectionDialog . ContentProvider contentProvider ; private FilteredItemsSelectionDialog . FilterHistoryJob filterHistoryJob ; private FilteredItemsSelectionDialog . FilterJob filterJob ; private FilteredItemsSelectionDialog . ItemsFilter filter ; private List lastCompletedResult ; private FilteredItemsSelectionDialog . ItemsFilter lastCompletedFilter ; private String initialPatternText ; private int selectionMode ; private FilteredItemsSelectionDialog . ItemsListSeparator itemsListSeparator ; private static final String EMPTY_STRING = "" ; private boolean refreshWithLastSelection = false ; private IHandlerActivation showViewHandler ; public FilteredItemsSelectionDialog ( Shell shell , boolean multi ) { } public FilteredItemsSelectionDialog ( Shell shell ) { } protected void addListFilter ( ViewerFilter filter ) { } public void setListLabelProvider ( ILabelProvider listLabelProvider ) { } private ILabelDecorator getListSelectionLabelDecorator ( ) { } public void setListSelectionLabelDecorator ( ILabelDecorator listSelectionLabelDecorator ) { } private FilteredItemsSelectionDialog . ItemsListLabelProvider getItemsListLabelProvider ( ) { } public void setDetailsLabelProvider ( ILabelProvider detailsLabelProvider ) { } private ILabelProvider getDetailsLabelProvider ( ) { } public void create ( ) { } protected void restoreDialog ( IDialogSettings settings ) { } public boolean close ( ) { } protected void storeDialog ( IDialogSettings settings ) { } private Label createHeader ( Composite parent ) { } private Label createLabels ( Composite parent ) { } private void createViewMenu ( Composite parent ) { toolBar = new ToolBar ( parent , SWT . FLAT ) ; toolItem = new ToolItem ( toolBar , SWT . PUSH , 0 ) ; GridData data = new GridData ( ) ; data . horizontalAlignment = GridData . END ; toolBar . setLayoutData ( data ) ; toolBar . addMouseListener ( new MouseAdapter ( ) { public void mouseDown ( MouseEvent e ) { showViewMenu ( ) ; } } ) ; toolItem . setImage ( WorkbenchImages . getImage ( IMG_LCL_VIEW_MENU ) ) ; toolItem . setToolTipText ( FilteredItemsSelectionDialog_menu ) ; toolItem . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { showViewMenu ( ) ; } } ) ; menuManager = new MenuManager ( ) ; fillViewMenu ( menuManager ) ; IHandlerService service = ( ( IHandlerService ) ( PlatformUI . getWorkbench ( ) . getService ( IHandlerService . class ) ) ) ; IHandler handler = new AbstractHandler ( ) { public Object execute ( ExecutionEvent event ) { showViewMenu ( ) ; return null ; } } ; <START_BUG> showViewHandler = service . activateHandler ( WINDOW_SHOWVIEWMENU , handler , new org . eclipse . ui . ActiveShellExpression ( getShell ( ) ) ) ; <END_BUG> } protected void fillViewMenu ( IMenuManager menuManager ) { } private void showViewMenu ( ) { } protected void fillContextMenu ( IMenuManager menuManager ) { } private void createPopupMenu ( ) { } protected abstract Control createExtendedContentArea ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } protected void handleDoubleClick ( ) { } private void refreshDetails ( ) { } protected void handleSelected ( StructuredSelection selection ) { } protected IDialogSettings getDialogBoundsSettings ( ) { } protected abstract IDialogSettings getDialogSettings ( ) { } public void refresh ( ) { } public void updateProgressLabel ( ) { } public void reloadCache ( boolean checkDuplicates , IProgressMonitor monitor ) { } public void scheduleRefresh ( ) { } public void scheduleProgressMessageRefresh ( ) { } protected void computeResult ( ) { } protected void updateStatus ( IStatus status ) { } protected void okPressed ( ) { } public void setInitialPattern ( String text ) { } public void setInitialPattern ( String text , int selectionMode ) { } protected String getInitialPattern ( ) { } protected StructuredSelection getSelectedItems ( ) { } protected abstract IStatus validateItem ( Object item ) { } protected abstract FilteredItemsSelectionDialog . ItemsFilter createFilter ( ) { } protected void applyFilter ( ) { } protected abstract Comparator getItemsComparator ( ) { } protected abstract void fillContentProvider ( FilteredItemsSelectionDialog . AbstractContentProvider contentProvider , FilteredItemsSelectionDialog . ItemsFilter itemsFilter , IProgressMonitor progressMonitor ) throws CoreException { } private void removeSelectedItems ( List items ) { } protected Object removeHistoryItem ( Object item ) { } protected void accessedHistoryItem ( Object item ) { } private Comparator getHistoryComparator ( ) { } protected FilteredItemsSelectionDialog . SelectionHistory getSelectionHistory ( ) { } protected void setSelectionHistory ( FilteredItemsSelectionDialog . SelectionHistory selectionHistory ) { } public boolean isHistoryElement ( Object item ) { } public boolean isDuplicateElement ( Object item ) { } public void setSeparatorLabel ( String separatorLabel ) { } public abstract String getElementName ( Object item ) { } private class ToggleStatusLineAction extends Action { public ToggleStatusLineAction ( ) { } public void run ( ) { } } private class RefreshJob extends UIJob { public RefreshJob ( ) { } public IStatus runInUIThread ( IProgressMonitor monitor ) { } } private class RefreshProgressMessageJob extends UIJob { private FilteredItemsSelectionDialog . GranualProgressMonitor progressMonitor ; public RefreshProgressMessageJob ( ) { } public IStatus runInUIThread ( IProgressMonitor monitor ) { } public void scheduleProgressRefresh ( FilteredItemsSelectionDialog . GranualProgressMonitor progressMonitor ) { } }

Fix:
showViewHandler = service . activateHandler ( WINDOW_SHOW_VIEW_MENU , handler , new org . eclipse . ui . ActiveShellExpression ( getShell ( ) ) ) ;