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 ) { } 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 ) { Composite dialogArea = ( ( Composite ) ( super . createDialogArea ( parent ) ) ) ; Composite content = new Composite ( dialogArea , SWT . NONE ) ; GridData gd = new GridData ( GridData . FILL_BOTH ) ; content . setLayoutData ( gd ) ; GridLayout layout = new GridLayout ( ) ; layout . numColumns = 1 ; layout . marginWidth = 0 ; layout . marginHeight = 0 ; content . setLayout ( layout ) ; final Label headerLabel = createHeader ( content ) ; <START_BUG> pattern = new Text ( content , ( ( ( ( SWT . SINGLE ) | ( SWT . BORDER ) ) | ( SWT . SEARCH ) ) | ( SWT . CANCEL ) ) ) ; <END_BUG> pattern . getAccessible ( ) . addAccessibleListener ( new AccessibleAdapter ( ) { public void getName ( AccessibleEvent e ) { e . result = LegacyActionTools . removeMnemonics ( headerLabel . getText ( ) ) ; } } ) ; gd = new GridData ( GridData . FILL_HORIZONTAL ) ; pattern . setLayoutData ( gd ) ; final Label listLabel = createLabels ( content ) ; list = new TableViewer ( content , ( ( ( ( multi ? SWT . MULTI : SWT . SINGLE ) | ( SWT . BORDER ) ) | ( SWT . V_SCROLL ) ) | ( SWT . VIRTUAL ) ) ) ; list . getTable ( ) . getAccessible ( ) . addAccessibleListener ( new AccessibleAdapter ( ) { public void getName ( AccessibleEvent e ) { e . result = LegacyActionTools . removeMnemonics ( listLabel . getText ( ) ) ; } } ) ; list . setContentProvider ( contentProvider ) ; list . setLabelProvider ( getItemsListLabelProvider ( ) ) ; list . setInput ( new Object [ 0 ] ) ; list . setItemCount ( contentProvider . getNumberOfElements ( ) ) ; gd = new GridData ( GridData . FILL_BOTH ) ; list . getTable ( ) . setLayoutData ( gd ) ; createPopupMenu ( ) ; pattern . addModifyListener ( new ModifyListener ( ) { public void modifyText ( ModifyEvent e ) { applyFilter ( ) ; } } ) ; pattern . addKeyListener ( new KeyAdapter ( ) { public void keyPressed ( KeyEvent e ) { if ( ( e . keyCode ) == ( SWT . ARROW_DOWN ) ) { if ( ( list . getTable ( ) . getItemCount ( ) ) > 0 ) { list . getTable ( ) . setFocus ( ) ; } } } } ) ; list . addSelectionChangedListener ( new ISelectionChangedListener ( ) { public void selectionChanged ( SelectionChangedEvent event ) { StructuredSelection selection = ( ( StructuredSelection ) ( event . getSelection ( ) ) ) ; handleSelected ( selection ) ; } } ) ; list . addDoubleClickListener ( new IDoubleClickListener ( ) { public void doubleClick ( DoubleClickEvent event ) { handleDoubleClick ( ) ; } } ) ; list . getTable ( ) . addKeyListener ( new KeyAdapter ( ) { public void keyPressed ( KeyEvent e ) { if ( ( e . keyCode ) == ( SWT . DEL ) ) { List selectedElements = ( ( StructuredSelection ) ( list . getSelection ( ) ) ) . toList ( ) ; Object item = null ; boolean isSelectedHistory = true ; for ( Iterator it = selectedElements . iterator ( ) ; it . hasNext ( ) ;

Fix:
pattern = new Text ( content , ( ( ( ( SWT . SINGLE ) | ( SWT . BORDER ) ) | ( SWT . SEARCH ) ) | ( SWT . ICON_CANCEL ) ) ) ;