Buggy code:
public class ConfirmFileSelectionDialog extends MessageDialog { private Map < String , Object > filesNotYetGenerated ; private Collection < String > filesToBeGenerated ; private CheckboxTableViewer tv ; private String relativeDir ; private ImageRegistry registry ; private static final String IMG_CHECKBOX_SELECTED = "icons//checkbox_selected.gif" ; private static final String IMG_CHECKBOX_UNSELECTED = "icons//checkbox_unselected.gif" ; public ConfirmFileSelectionDialog ( Shell parentShell , Map < String , Object > filesNotGenerated , String pRelativeDir ) { } @ Override protected Control createCustomArea ( Composite parent ) { Composite root = new Composite ( parent , SWT . NONE ) ; root . setLayout ( new GridLayout ( 2 , false ) ) ; tv = CheckboxTableViewer . newCheckList ( root , NONE ) ; final Table cTable = tv . getTable ( ) ; cTable . setLinesVisible ( true ) ; GridData gd_cTable = new GridData ( SWT . FILL , SWT . TOP , true , true ) ; cTable . setLayoutData ( gd_cTable ) ; TableViewerColumn filenameCol = new TableViewerColumn ( tv , SWT . LEAD ) ; filenameCol . getColumn ( ) . setWidth ( 400 ) ; filenameCol . getColumn ( ) . setText ( "Filename" ) ; filenameCol . setLabelProvider ( new ColumnLabelProvider ( ) { @ Override public String getText ( Object element ) { String absName = element . toString ( ) ; int pos = absName . indexOf ( relativeDir ) ; return element . toString ( ) . substring ( pos ) ; } @ Override public String getToolTipText ( Object element ) { return "This<seq2seq4repair_space>content<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>generated:<seq2seq4repair_space>\n-----------------------------------\n" + ( filesNotYetGenerated . get ( element ) ) ; } } ) ; ColumnViewerToolTipSupport . enableFor ( tv , NO_RECREATE ) ; tv . setContentProvider ( ArrayContentProvider . getInstance ( ) ) ; tv . setInput ( filesNotYetGenerated . keySet ( ) ) ; tv . addCheckStateListener ( new ICheckStateListener ( ) { @ Override public void checkStateChanged ( CheckStateChangedEvent event ) { if ( event . getChecked ( ) ) { filesToBeGenerated . add ( ( ( String ) ( event . getElement ( ) ) ) ) ; } else { filesToBeGenerated . remove ( event . getElement ( ) ) ; } } } ) ; Composite selectComposite = new Composite ( root , SWT . NONE ) ; selectComposite . setLayout ( new GridLayout ( 1 , false ) ) ; Button selectAll = new Button ( selectComposite , SWT . PUSH ) ; selectAll . setImage ( getLocalImage ( ConfirmFileSelectionDialog . IMG_CHECKBOX_SELECTED ) ) ; selectAll . setToolTipText ( "Select<seq2seq4repair_space>all" ) ; selectAll . addSelectionListener ( new SelectionAdapter ( ) { @ Override public void widgetSelected ( SelectionEvent e ) { tv . setAllChecked ( true ) ; filesToBeGenerated . addAll ( filesNotYetGenerated . keySet ( ) ) ; } } ) ; Button deselectAll = new Button ( selectComposite , SWT . PUSH ) ; deselectAll . setImage ( getLocalImage ( ConfirmFileSelectionDialog . IMG_CHECKBOX_UNSELECTED ) ) ; <START_BUG> selectAll . setToolTipText ( "Unselect<seq2seq4repair_space>all" ) ; <END_BUG> deselectAll . addSelectionListener ( new SelectionAdapter ( ) { @ Override public void widgetSelected ( SelectionEvent e ) { tv . setAllChecked ( false ) ; filesToBeGenerated . clear ( ) ; } } ) ; return root ; } private Image getLocalImage ( String key ) { } public Collection < String > getFilesToBeGenerated ( ) { } No newline ; at end ; of file ; }

Fix:
deselectAll . setToolTipText ( "Unselect<seq2seq4repair_space>all" ) ;