Buggy code:
public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private Button showTextOnPerspectiveBar ; private Button showTraditionalStyleTabs ; private Button enableAnimations ; private Button editorTopButton ; private Button editorBottomButton ; private Button viewTopButton ; private Button viewBottomButton ; private Button perspLeftButton ; private Button perspTopLeftButton ; private Button perspTopRightButton ; int editorAlignment ; int viewAlignment ; String perspBarLocation ; static final String EDITORS_TITLE = WorkbenchMessages . getString ( "ViewsPreference.editors" ) ; private static final String EDITORS_TOP_TITLE = WorkbenchMessages . getString ( "ViewsPreference.editors.top" ) ; private static final String EDITORS_BOTTOM_TITLE = WorkbenchMessages . getString ( "ViewsPreference.editors.bottom" ) ; private static final String VIEWS_TITLE = WorkbenchMessages . getString ( "ViewsPreference.views" ) ; private static final String VIEWS_TOP_TITLE = WorkbenchMessages . getString ( "ViewsPreference.views.top" ) ; private static final String VIEWS_BOTTOM_TITLE = WorkbenchMessages . getString ( "ViewsPreference.views.bottom" ) ; private static final String PERSP_TITLE = WorkbenchMessages . getString ( "ViewsPreference.perspectiveBar" ) ; private static final String PERSP_LEFT_TITLE = WorkbenchMessages . getString ( "ViewsPreference.perspectiveBar.left" ) ; private static final String PERSP_TOP_LEFT_TITLE = WorkbenchMessages . getString ( "ViewsPreference.perspectiveBar.topLeft" ) ; private static final String PERSP_TOP_RIGHT_TITLE = WorkbenchMessages . getString ( "ViewsPreference.perspectiveBar.topRight" ) ; private static final String R21PRESENTATION_ID = "org.eclipse.ui.internal.r21presentationFactory" ; private static final String R30PRESENTATION_ID = "org.eclipse.ui.presentations.default" ; private Combo themeCombo ; private Combo presentationCombo ; private IConfigurationElement [ ] presentationFactories ; private String currentPresentationFactoryId ; private Group createButtonGroup ( Composite composite , String title ) { } protected Control createContents ( Composite parent ) { } private void createPresentationCombo ( Composite parent ) { } private void attachControls ( Control leftControl , Control rightControl ) { } private void createEditorTabButtonGroup ( Composite composite ) { } private void createViewTabButtonGroup ( Composite composite ) { } private void createPerspBarTabButtonGroup ( Composite composite ) { } private void refreshPresentationCombo ( ) { } private void refreshPresentationFactories ( ) { } private void updatePresentationPreferences ( ) { } private void setR30Preferences ( ) { } private void setR21Preferences ( ) { } private void refreshThemeCombo ( ) { } protected void createShowTextOnPerspectiveBarPref ( Composite composite ) { } protected void createShowTraditionalStyleTabsPref ( Composite composite ) { } protected void createEnableAnimationsPref ( Composite composite ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } public void init ( org . eclipse . ui . IWorkbench workbench ) { } protected void performDefaults ( ) { IPreferenceStore store = getPreferenceStore ( ) ; IPreferenceStore apiStore = PrefUtil . getAPIPreferenceStore ( ) ; showTextOnPerspectiveBar . setSelection ( apiStore . getDefaultBoolean ( SHOW_TEXT_ON_PERSPECTIVE_BAR ) ) ; showTraditionalStyleTabs . setSelection ( apiStore . getDefaultBoolean ( SHOW_TRADITIONAL_STYLE_TABS ) ) ; enableAnimations . setSelection ( apiStore . getDefaultBoolean ( ENABLE_ANIMATIONS ) ) ; int editorTopValue = store . getDefaultInt ( EDITOR_TAB_POSITION ) ; editorTopButton . setSelection ( ( editorTopValue == ( SWT . TOP ) ) ) ; editorBottomButton . setSelection ( ( editorTopValue == ( SWT . BOTTOM ) ) ) ; editorAlignment = editorTopValue ; int viewTopValue = store . getDefaultInt ( VIEW_TAB_POSITION ) ; viewTopButton . setSelection ( ( viewTopValue == ( SWT . TOP ) ) ) ; viewBottomButton . setSelection ( ( viewTopValue == ( SWT . BOTTOM ) ) ) ; viewAlignment = viewTopValue ; <START_BUG> perspBarLocation = store . getDefaultString ( DOCK_PERSPECTIVE_BAR ) ; <END_BUG> perspLeftButton . setSelection ( LEFT . equals ( perspBarLocation ) ) ; perspTopLeftButton . setSelection ( TOP_LEFT . equals ( perspBarLocation ) ) ; perspTopRightButton . setSelection ( TOP_RIGHT . equals ( perspBarLocation ) ) ; WorkbenchPlugin . getDefault ( ) . savePluginPreferences ( ) ; super . performDefaults ( ) ; } public boolean performOk ( ) { } }

Fix:
perspBarLocation = apiStore . getDefaultString ( DOCK_PERSPECTIVE_BAR ) ;