Buggy code:
public class WorkbenchPreferenceDialog extends FilteredPreferenceDialog { private static final int LOAD_ID = ( IDialogConstants . CLIENT_ID ) + 1 ; private static final int SAVE_ID = ( IDialogConstants . CLIENT_ID ) + 2 ; static final String FILE_PATH_SETTING = "PreferenceImportExportFileSelectionPage.filePath" ; private static WorkbenchPreferenceDialog instance = null ; private static String MODE_ICON = "org.eclipse.ui.internal.dialogs.MODE_ICON" ; private static boolean groupedMode = false ; private Composite toolBarComposite ; private ToolBar toolBar ; private FilteredTree filteredTree ; private PreferencePageHistory history ; private WorkbenchPreferenceGroup currentGroup ; private CTabItem tab ; private static String lastGroupId = null ; private Object pageData ; public static final WorkbenchPreferenceDialog createDialogOn ( final String preferencePageId , String [ ] filteredIds ) { } public static final WorkbenchPreferenceDialog createDialogOn ( final String preferencePageId ) { } public WorkbenchPreferenceDialog ( Shell parentShell , PreferenceManager manager ) { } protected void buttonPressed ( int buttonId ) { } public final boolean close ( ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected void loadPressed ( ) { } private IPath getFilePath ( boolean export ) { } private void setFileNameSetting ( String currentFileName ) { } private String getFileNameSetting ( boolean export ) { } protected void savePressed ( ) { } private boolean importPreferences ( IPath path ) { } public final IPreferencePage getCurrentPage ( ) { } protected Control createDialogArea ( Composite parent ) { } private void createToolBar ( Composite composite ) { <START_BUG> toolBar = new ToolBar ( composite , ( ( ( SWT . HORIZONTAL ) | ( SWT . CENTER ) ) | ( SWT . FLAT ) ) ) ; <END_BUG> toolBar . setBackground ( composite . getDisplay ( ) . getSystemColor ( COLOR_LIST_BACKGROUND ) ) ; WorkbenchPreferenceGroup [ ] groups = WorkbenchPreferenceDialog . getGroups ( ) ; for ( int i = 0 ; i < ( groups . length ) ; i ++ ) { final WorkbenchPreferenceGroup group = groups [ i ] ; ToolItem newItem = new ToolItem ( toolBar , SWT . RADIO ) ; newItem . setText ( group . getName ( ) ) ; newItem . setImage ( group . getImage ( ) ) ; newItem . setData ( group ) ; newItem . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { groupSelected ( group ) ; } } ) ; } GridData data = new GridData ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . FILL_HORIZONTAL ) ) ) ; data . horizontalAlignment = GridData . HORIZONTAL_ALIGN_BEGINNING ; data . horizontalIndent = IDialogConstants . HORIZONTAL_MARGIN ; data . verticalIndent = IDialogConstants . VERTICAL_MARGIN ; toolBar . setLayoutData ( data ) ; } private void createDialogContents ( Composite parent ) { } protected void selectSavedItem ( ) { } private void selectAndRevealInToolBar ( WorkbenchPreferenceGroup group ) { } private void groupSelected ( final WorkbenchPreferenceGroup group ) { } private void selectGroupInToolBar ( final WorkbenchPreferenceGroup group ) { } public Composite createPageContainer ( Composite parent ) { } private Control getContainerToolBar ( Composite composite ) { } private void createModeSwitch ( ToolBarManager historyManager ) { } private void setContentAndLabelProviders ( TreeViewer treeViewer ) { } protected boolean showPage ( IPreferenceNode node ) { } public void updateTitle ( ) { } public void updateMessage ( ) { } protected TreeViewer createTreeViewer ( Composite parent ) { } public static boolean showingGroups ( ) { } public static boolean canShowGroups ( ) { } protected static WorkbenchPreferenceGroup [ ] getGroups ( ) { } protected Control createTreeAreaContents ( Composite parent ) { } protected Sash createSash ( Composite composite , Control rightControl ) { } public void setSearchResults ( String [ ] filteredIds ) { } protected void highlightHits ( String text ) { } protected IPreferenceNode findNodeMatching ( String nodeId ) { } public final void setCurrentPageId ( final String preferencePageId ) { } protected void createPageControl ( IPreferencePage page , Composite parent ) { } public void setPageData ( Object pageData ) { } protected void createPage ( IPreferenceNode node ) { } }

Fix:
toolBar = new ToolBar ( composite , ( ( SWT . RIGHT ) | ( SWT . FLAT ) ) ) ;