Buggy code:
final class Persistence { private static Map stringToValueMap = new TreeMap ( ) ; private static final String ALT = "Alt" ; private static final String COMMAND = "Command" ; private static final String CTRL = "Ctrl" ; private static final String MODIFIER_SEPARATOR = "+" ; static final String PACKAGE_BASE = "commands" ; static final String PACKAGE_PREFIX = "org.eclipse.ui" ; static final String PACKAGE_FULL = ( ( Persistence . PACKAGE_PREFIX ) + '.' ) + ( Persistence . PACKAGE_BASE ) ; private static final String SHIFT = "Shift" ; static final String TAG_ACTIVE_KEY_CONFIGURATION = "activeKeyConfiguration" ; static final String TAG_CATEGORY = "category" ; static final String TAG_CATEGORY_ID = "categoryId" ; static final String TAG_COMMAND = "command" ; static final String TAG_COMMAND_ID = "commandId" ; static final String TAG_CONTEXT_ID = "contextId" ; static final String TAG_DESCRIPTION = "description" ; static final String TAG_HANDLER = "handlerSubmission" ; static final String TAG_ID = "id" ; static final String TAG_KEY_CONFIGURATION = "keyConfiguration" ; static final String TAG_KEY_CONFIGURATION_ID = "keyConfigurationId" ; static final String TAG_KEY_SEQUENCE = "keySequence" ; static final String TAG_KEY_SEQUENCE_BINDING = "keyBinding" ; static final String TAG_LOCALE = "locale" ; static final String TAG_NAME = "name" ; static final String TAG_PARENT_ID = "parentId" ; static final String TAG_PLATFORM = "platform" ; static final String TAG_SOURCE_ID = "sourceId" ; private static KeySequence deprecatedSequenceToKeySequence ( int [ ] sequence ) { } private static KeyStroke deprecatedStrokeToKeyStroke ( int stroke ) { } private static int [ ] parseDeprecatedSequence ( String string ) { } private static int parseDeprecatedStroke ( String string ) { } static ActiveKeyConfigurationDefinition readActiveKeyConfigurationDefinition ( IMemento memento , String sourceIdOverride ) { } static List readActiveKeyConfigurationDefinitions ( IMemento memento , String name , String sourceIdOverride ) { } static CategoryDefinition readCategoryDefinition ( IMemento memento , String sourceIdOverride ) { } static List readCategoryDefinitions ( IMemento memento , String name , String sourceIdOverride ) { } static CommandDefinition readCommandDefinition ( IMemento memento , String sourceIdOverride ) { } static List readCommandDefinitions ( IMemento memento , String name , String sourceIdOverride ) { } private static int [ ] readDeprecatedSequence ( IMemento memento ) { } private static int readDeprecatedStroke ( IMemento memento ) { } static IHandler readHandlerSubmissionDefinition ( IConfigurationElement configurationElement ) { } static KeyConfigurationDefinition readKeyConfigurationDefinition ( IMemento memento , String sourceIdOverride ) { } static List readKeyConfigurationDefinitions ( IMemento memento , String name , String sourceIdOverride ) { } static KeySequenceBindingDefinition readKeySequenceBindingDefinition ( IMemento memento , String sourceIdOverride ) { if ( memento == null ) throw new NullPointerException ( ) ; String contextId = memento . getString ( Persistence . TAG_CONTEXT_ID ) ; if ( contextId == null ) contextId = memento . getString ( "scope" ) ; if ( "org.eclipse.ui.globalScope" . equals ( contextId ) ) contextId = null ; String commandId = memento . getString ( Persistence . TAG_COMMAND_ID ) ; if ( commandId == null ) commandId = memento . getString ( "command" ) ; if ( commandId == null ) commandId = memento . getString ( "id" ) ; String keyConfigurationId = memento . getString ( Persistence . TAG_KEY_CONFIGURATION_ID ) ; if ( keyConfigurationId == null ) keyConfigurationId = memento . getString ( "configuration" ) ; KeySequence keySequence = null ; String keySequenceAsString = memento . getString ( Persistence . TAG_KEY_SEQUENCE ) ; if ( keySequenceAsString != null ) try { keySequence = KeySequence . getInstance ( keySequenceAsString ) ; } catch ( ParseException eParse ) { } else { IMemento mementoSequence = memento . getChild ( "sequence" ) ; if ( mementoSequence != null ) keySequence = Persistence . deprecatedSequenceToKeySequence ( Persistence . readDeprecatedSequence ( mementoSequence ) ) ; else { String string = memento . getString ( "string" ) ; if ( string != null ) keySequence = Persistence . deprecatedSequenceToKeySequence ( Persistence . parseDeprecatedSequence ( string ) ) ; } } String locale = memento . getString ( Persistence . TAG_LOCALE ) ; String platform = memento . getString ( Persistence . TAG_PLATFORM ) ; String sourceId = ( sourceIdOverride != null ) ? sourceIdOverride : memento . getString ( Persistence . TAG_SOURCE_ID ) ; if ( ( sourceIdOverride == null ) && ( sourceId == null ) ) sourceId = memento . getString ( "plugin" ) ; if ( contextId == null ) { <START_BUG> contextId = "org.eclipse.ui.contexts.window" ; <END_BUG> } return new KeySequenceBindingDefinition ( contextId , commandId , keyConfigurationId , keySequence , locale , platform , sourceId ) ; } static List readKeySequenceBindingDefinitions ( IMemento memento , String name , String sourceIdOverride ) { } static void writeActiveKeyConfigurationDefinition ( IMemento memento , ActiveKeyConfigurationDefinition activeKeyConfigurationDefinition ) { } static void writeActiveKeyConfigurationDefinitions ( IMemento memento , String name , List activeKeyConfigurationDefinitions ) { } static void writeCategoryDefinition ( IMemento memento , CategoryDefinition categoryDefinition ) { } static void writeCategoryDefinitions ( IMemento memento , String name , List categoryDefinitions ) { } static void writeCommandDefinition ( IMemento memento , CommandDefinition commandDefinition ) { } static void writeCommandDefinitions ( IMemento memento , String name , List commandDefinitions ) { } static void writeKeyConfigurationDefinition ( IMemento memento , KeyConfigurationDefinition keyConfigurationDefinition ) { } static void writeKeyConfigurationDefinitions ( IMemento memento , String name , List keyConfigurationDefinitions ) { } static void writeKeySequenceBindingDefinition ( IMemento memento , KeySequenceBindingDefinition keySequenceBindingDefinition ) { } static void writeKeySequenceBindingDefinitions ( IMemento memento , String name , List keySequenceBindingDefinitions ) { } private Persistence ( ) { } }

Fix:
contextId = KeySequenceBinding . DEFAULT_CONTEXT_ID ;