Buggy code:
public class KeyPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private static final ResourceBundle resourceBundle = ResourceBundle . getBundle ( KeyPreferencePage . class . getName ( ) ) ; private static final String COMMAND_CONFLICT = Util . getString ( KeyPreferencePage . resourceBundle , "commandConflict" ) ; private static final String COMMAND_UNDEFINED = Util . getString ( KeyPreferencePage . 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_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 ; KeySequence 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 ActiveKeyConfiguration 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 ( ) { } 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 , KeySequence 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 , KeySequence keySequence ) { } private void selectTableKeySequence ( String scopeId , String keyConfigurationId ) { } private void clear ( SortedMap tree , KeySequence keySequence , String scope , String keyConfiguration ) { } private void set ( SortedMap tree , KeyBinding binding , boolean consolidate ) { } private SortedSet solve ( SortedMap tree ) { } private KeyPreferencePage . CommandRecord getSelectedCommandRecord ( ) { } private KeyPreferencePage . KeySequenceRecord getSelectedKeySequenceRecord ( ) { } private KeySequence getKeySequence ( ) { KeySequence keySequence = null ; String name = comboKeySequence . getText ( ) ; keySequence = ( ( KeySequence ) ( keySequencesByName . get ( name ) ) ) ; if ( keySequence == null ) <START_BUG> keySequence = KeySequence . parse ( name ) ; <END_BUG> return keySequence ; } private void setKeySequence ( KeySequence keySequence ) { } private String getScopeId ( ) { } private void setScopeId ( String scopeId ) { } private String getKeyConfigurationId ( ) { } private void setKeyConfigurationId ( String keyConfigurationId ) { } private String bracket ( String string ) { } }

Fix:
keySequence = KeySequence . parseKeySequence ( name ) ;