Buggy code:
public class KeysPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private static final ResourceBundle resourceBundle = ResourceBundle . getBundle ( KeysPreferencePage . class . getName ( ) ) ; private static final String COMMAND_CONFLICT = Util . translateString ( KeysPreferencePage . resourceBundle , "commandConflict" ) ; private static final String COMMAND_NOTHING = Util . translateString ( KeysPreferencePage . resourceBundle , "commandNothing" ) ; private static final String COMMAND_UNDEFINED = Util . translateString ( KeysPreferencePage . resourceBundle , "commandUndefined" ) ; private static final int DIFFERENCE_ADD = 0 ; private static final int DIFFERENCE_CHANGE = 1 ; private static final int DIFFERENCE_MINUS = 2 ; private static final int DIFFERENCE_NONE = 3 ; private static final Image IMAGE_BLANK = ImageFactory . getImage ( "blank" ) ; private static final Image IMAGE_CHANGE = ImageFactory . getImage ( "change" ) ; private static final Image IMAGE_CLEAR = ImageFactory . getImage ( "clear" ) ; private static final Image IMAGE_EXCLAMATION = ImageFactory . getImage ( "exclamation" ) ; private static final Image IMAGE_MINUS = ImageFactory . getImage ( "minus" ) ; private static final Image IMAGE_PLUS = ImageFactory . getImage ( "plus" ) ; private static final RGB RGB_CONFLICT = new RGB ( 255 , 0 , 0 ) ; private static final RGB RGB_CONFLICT_MINUS = new RGB ( 255 , 160 , 160 ) ; private static final RGB RGB_MINUS = new RGB ( 160 , 160 , 160 ) ; private static final char SPACE = '<seq2seq4repair_space>' ; private final class CommandSetPair { Set customSet ; Set defaultSet ; } private final class CommandRecord { String commandId ; KeySequence keySequence ; String contextId ; String keyConfigurationId ; Set customSet ; Set defaultSet ; boolean customConflict = false ; String customCommand = null ; boolean defaultConflict = false ; String defaultCommand = null ; void calculate ( ) { } } private final class KeySequenceRecord { String scope ; String configuration ; Set customSet ; Set defaultSet ; boolean customConflict = false ; String customCommand = null ; boolean defaultConflict = false ; String defaultCommand = null ; void calculate ( ) { } } private Button buttonAdd ; private Button buttonClear ; private Button buttonRemove ; private Button buttonRestore ; private Map categoryDefinitionsById ; private Map categoryIdsByUniqueName ; private Map categoryUniqueNamesById ; private Combo comboCategory ; private Combo comboCommand ; private Combo comboContext ; private Combo comboKeyConfiguration ; private Map commandDefinitionsById ; private Map commandIdsByUniqueName ; private Map commandUniqueNamesById ; private CommandManager commandManager ; private Map contextDefinitionsById ; private Map contextIdsByUniqueName ; private Map contextUniqueNamesById ; private ContextManager contextManager ; private Map keyConfigurationDefinitionsById ; private Map keyConfigurationIdsByUniqueName ; private Map keyConfigurationUniqueNamesById ; private Label labelCategory ; private Label labelCommand ; private Label labelCommandGroup ; private Label labelCommandsForKeySequence ; private Label labelContext ; private Label labelContextExtends ; private Label labelDescription ; private Label labelKeyConfiguration ; private Label labelKeyConfigurationExtends ; private Label labelKeySequence ; private Label labelKeySequencesForCommand ; private Table tableCommandsForKeySequence ; private Table tableKeySequencesForCommand ; private Text textDescription ; private KeySequenceText textKeySequence ; private SortedMap tree ; private IWorkbench workbench ; private List commandRecords = new ArrayList ( ) ; private List keySequenceRecords = new ArrayList ( ) ; public void init ( IWorkbench workbench ) { } public boolean performOk ( ) { List preferenceActiveKeyConfigurationDefinitions = new ArrayList ( ) ; preferenceActiveKeyConfigurationDefinitions . add ( new ActiveKeyConfigurationDefinition ( getKeyConfigurationId ( ) , null ) ) ; PreferenceCommandRegistry preferenceCommandRegistry = ( ( PreferenceCommandRegistry ) ( commandManager . getPreferenceCommandRegistry ( ) ) ) ; preferenceCommandRegistry . setActiveKeyConfigurationDefinitions ( preferenceActiveKeyConfigurationDefinitions ) ; List preferenceKeyBindingDefinitions = new ArrayList ( ) ; KeyBindingNode . getKeyBindingDefinitions ( tree , KeySequence . getInstance ( ) , 0 , preferenceKeyBindingDefinitions ) ; preferenceCommandRegistry . setKeyBindingDefinitions ( preferenceKeyBindingDefinitions ) ; try { preferenceCommandRegistry . save ( ) ; } catch ( IOException eIO ) { } if ( ( workbench ) instanceof Workbench ) <START_BUG> ( ( Workbench ) ( workbench ) ) . updateActiveKeyBindingService ( ) ; <END_BUG> return super . performOk ( ) ; } public void setVisible ( boolean visible ) { } protected Control createContents ( Composite parent ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } protected void performDefaults ( ) { } private void doubleClickedTableCommandsForKeySequence ( ) { } private void doubleClickedTableKeySequencesForCommand ( ) { } private String getCategoryId ( ) { } private String getCommandId ( ) { } private String getContextId ( ) { } private String getKeyConfigurationId ( ) { } private KeySequence getKeySequence ( ) { } private void modifiedTextKeySequence ( ) { } private void selectedButtonAdd ( ) { } private void selectedButtonClear ( ) { } private void selectedButtonRemove ( ) { } private void selectedButtonRestore ( ) { } private void selectedComboCategory ( ) { } private void selectedComboCommand ( ) { } private void selectedComboContext ( ) { } private void selectedComboKeyConfiguration ( ) { } private void selectedTableCommandsForKeySequence ( ) { } private void selectedTableKeySequencesForCommand ( ) { } private void setCategoryId ( String categoryId ) { } private void setCommandId ( String commandId ) { } private void setContextId ( String contextId ) { } private void setKeyConfigurationId ( String keyConfigurationId ) { } private void setKeySequence ( KeySequence keySequence ) { } }

Fix:
( ( Workbench ) ( workbench ) ) . updateCommandAndContextController ( ) ;