Buggy code:
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_CHANGE = ImageFactory . getImage ( "change" ) ; 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 , 192 , 192 ) ; private static final RGB RGB_MINUS = new RGB ( 192 , 192 , 192 ) ; private static final char SPACE = '<seq2seq4repair_space>' ; private static final String ZERO_LENGTH_STRING = "" ; private final class CommandRecord { String commandId ; Sequence keySequence ; String scopeId ; String keyConfigurationId ; Set customSet ; Set defaultSet ; boolean customConflict = false ; String customCommandId = null ; boolean defaultConflict = false ; String defaultCommandId = null ; void calculate ( ) { } } private final class KeySequenceRecord { String scopeId ; String keyConfigurationId ; Set customSet ; Set defaultSet ; boolean customConflict = false ; String customCommandId = null ; boolean defaultConflict = false ; String defaultCommandId = null ; void calculate ( ) { } } private class TreeViewerCommandsContentProvider implements ITreeContentProvider { public void dispose ( ) { } public Object [ ] getChildren ( Object parentElement ) { } public Object [ ] getElements ( Object inputElement ) { } public Object getParent ( Object element ) { } public boolean hasChildren ( Object element ) { } public void inputChanged ( Viewer viewer , Object oldInput , Object newInput ) { } } private class TreeViewerCommandsLabelProvider extends LabelProvider { public String getText ( Object element ) { } } private Label labelActiveKeyConfiguration ; private Combo comboActiveKeyConfiguration ; private Label labelCommands ; private TreeViewer treeViewerCommands ; private Label labelKeySequencesForCommand ; private Table tableKeySequencesForCommand ; private Label labelKeySequence ; private Combo comboKeySequence ; private Label labelScope ; private Combo comboScope ; private Label labelKeyConfiguration ; private Combo comboKeyConfiguration ; private Button buttonChange ; private Label labelCommandsForKeySequence ; private Table tableCommandsForKeySequence ; private IWorkbench workbench ; private State state ; private List categories ; private SortedMap categoriesById ; private SortedMap categoriesByName ; private List commands ; private SortedMap commandsById ; private SortedMap commandsByName ; private List scopes ; private SortedMap scopesById ; private SortedMap scopesByName ; private List coreActiveKeyConfigurations ; private List coreKeyBindings ; private List coreKeyConfigurations ; private List localActiveKeyConfigurations ; private List localKeyBindings ; private List localKeyConfigurations ; private List preferenceActiveKeyConfigurations ; private List preferenceKeyBindings ; private List preferenceKeyConfigurations ; private ActiveConfiguration activeKeyConfiguration ; private List activeKeyConfigurations ; private List keyConfigurations ; private SortedMap keyConfigurationsById ; private SortedMap keyConfigurationsByName ; private SortedMap tree ; private List commandRecords = new ArrayList ( ) ; private List keySequenceRecords = new ArrayList ( ) ; private SortedMap keySequencesByName ; public void init ( IWorkbench workbench ) { } public boolean performOk ( ) { copyFromUI ( ) ; PreferenceRegistry preferenceRegistry = PreferenceRegistry . getInstance ( ) ; preferenceRegistry . setActiveKeyConfigurations ( preferenceActiveKeyConfigurations ) ; preferenceRegistry . setKeyBindings ( preferenceKeyBindings ) ; preferenceRegistry . setKeyConfigurations ( preferenceKeyConfigurations ) ; try { preferenceRegistry . save ( ) ; } catch ( IOException eIO ) { } <START_BUG> Manager . getInstance ( ) . getKeyMachine ( ) . setKeyConfiguration ( ( ( activeKeyConfiguration ) != null ? activeKeyConfiguration . getValue ( ) : KeyPreferencePage . ZERO_LENGTH_STRING ) ) ; <END_BUG> Manager . getInstance ( ) . update ( ) ; if ( ( workbench ) instanceof Workbench ) ( ( Workbench ) ( this . workbench ) ) . updateKeys ( ) ; return super . performOk ( ) ; } public void setVisible ( boolean visible ) { } protected Control createContents ( Composite parent ) { } protected IPreferenceStore doGetPreferenceStore ( ) { } protected void performDefaults ( ) { } private void copyFromUI ( ) { } private void copyToUI ( ) { } private Control createUI ( Composite parent ) { } private void selectedComboActiveKeyConfiguration ( ) { } private void doubleClickedTreeViewerCommands ( ) { } private void selectedTreeViewerCommands ( ) { } private void doubleClickedTableKeySequencesForCommand ( ) { } private void selectedTableKeySequencesForCommand ( ) { } private void modifiedComboKeySequence ( ) { } private void selectedComboKeySequence ( ) { } private void selectedComboScope ( ) { } private void selectedComboKeyConfiguration ( ) { } private void selectedButtonChange ( ) { } private void doubleClickedTableCommandsForKeySequence ( ) { } private void selectedTableCommandsForKeySequence ( ) { } private void update ( ) { } private void buildCommandRecords ( SortedMap tree , String commandId , List commandRecords ) { } private void buildKeySequenceRecords ( SortedMap tree , Sequence keySequence , List keySequenceRecords ) { } private void buildPluginSets ( Map pluginMap , Set customSet , Set defaultSet ) { } private void buildTableCommand ( ) { } private void buildTableKeySequence ( ) { } private void selectTableCommand ( String scopeId , String keyConfigurationId , Sequence keySequence ) { } private void selectTableKeySequence ( String scopeId , String keyConfigurationId ) { } private void clear ( SortedMap tree , Sequence keySequence , String scope , String keyConfiguration ) { } private void set ( SortedMap tree , Binding binding , boolean consolidate ) { } private SortedSet solve ( SortedMap tree ) { } private KeyPreferencePage . CommandRecord getSelectedCommandRecord ( ) { } private KeyPreferencePage . KeySequenceRecord getSelectedKeySequenceRecord ( ) { } private Sequence getKeySequence ( ) { } private void setKeySequence ( Sequence keySequence ) { } private String getScopeId ( ) { } private void setScopeId ( String scopeId ) { } private String getKeyConfigurationId ( ) { } private void setKeyConfigurationId ( String keyConfigurationId ) { } private String bracket ( String string ) { } }

Fix:
Manager . getInstance ( ) . getKeyMachine ( ) . setConfiguration ( ( ( activeKeyConfiguration ) != null ? activeKeyConfiguration . getValue ( ) : KeyPreferencePage . ZERO_LENGTH_STRING ) ) ;