Buggy code:
final class Persistence { 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 ) ; static final String TAG_ACTIVE_KEY_CONFIGURATION = "activeKeyConfiguration" ; static final String TAG_ACTIVITY_BINDING = "contextBinding" ; static final String TAG_ACTIVITY_ID = "activityId" ; 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_DESCRIPTION = "description" ; static final String TAG_IMAGE_BINDING = "imageBinding" ; static final String TAG_IMAGE_STYLE = "imageStyle" ; static final String TAG_IMAGE_URI = "imageUri" ; static final String TAG_KEY_SEQUENCE_BINDING = "keyBinding" ; 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_ID = "id" ; 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_PLUGIN_ID = "pluginId" ; static IActiveKeyConfigurationDefinition readActiveKeyConfigurationDefinition ( IMemento memento , String pluginIdOverride ) { } static List readActiveKeyConfigurationDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static IActivityBindingDefinition readActivityBindingDefinition ( IMemento memento , String pluginIdOverride ) { } static List readActivityBindingDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static ICategoryDefinition readCategoryDefinition ( IMemento memento , String pluginIdOverride ) { } static List readCategoryDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static ICommandDefinition readCommandDefinition ( IMemento memento , String pluginIdOverride ) { } static List readCommandDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static IImageBindingDefinition readImageBindingDefinition ( IMemento memento , String pluginIdOverride ) { } static List readImageBindingDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static IKeyConfigurationDefinition readKeyConfigurationDefinition ( IMemento memento , String pluginIdOverride ) { } static List readKeyConfigurationDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static IKeySequenceBindingDefinition readKeySequenceBindingDefinition ( IMemento memento , String pluginIdOverride ) { if ( memento == null ) throw new NullPointerException ( ) ; String activityId = memento . getString ( Persistence . TAG_ACTIVITY_ID ) ; if ( activityId == null ) <START_BUG> activityId = memento . getString ( "context" ) ; <END_BUG> if ( activityId == null ) activityId = memento . getString ( "scope" ) ; if ( "org.eclipse.ui.globalScope" . equals ( activityId ) ) activityId = null ; String commandId = memento . getString ( Persistence . TAG_COMMAND_ID ) ; if ( commandId == null ) commandId = memento . getString ( "command" ) ; String keyConfigurationId = memento . getString ( Persistence . TAG_KEY_CONFIGURATION_ID ) ; if ( keyConfigurationId == null ) keyConfigurationId = memento . getString ( "configuration" ) ; if ( "org.eclipse.ui.defaultAcceleratorConfiguration" . equals ( keyConfigurationId ) ) keyConfigurationId = null ; 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 pluginId = ( pluginIdOverride != null ) ? pluginIdOverride : memento . getString ( Persistence . TAG_PLUGIN_ID ) ; if ( ( pluginIdOverride == null ) && ( pluginId == null ) ) pluginId = memento . getString ( "plugin" ) ; return new KeySequenceBindingDefinition ( activityId , commandId , keyConfigurationId , keySequence , locale , platform , pluginId ) ; } static List readKeySequenceBindingDefinitions ( IMemento memento , String name , String pluginIdOverride ) { } static void writeActiveKeyConfigurationDefinition ( IMemento memento , IActiveKeyConfigurationDefinition activeKeyConfigurationDefinition ) { } static void writeActiveKeyConfigurationDefinitions ( IMemento memento , String name , List activeKeyConfigurationDefinitions ) { } static void writeActivityBindingDefinition ( IMemento memento , IActivityBindingDefinition activityBindingDefinition ) { } static void writeActivityBindingDefinitions ( IMemento memento , String name , List activityBindingDefinitions ) { } static void writeCategoryDefinition ( IMemento memento , ICategoryDefinition categoryDefinition ) { } static void writeCategoryDefinitions ( IMemento memento , String name , List categoryDefinitions ) { } static void writeCommandDefinition ( IMemento memento , ICommandDefinition commandDefinition ) { } static void writeCommandDefinitions ( IMemento memento , String name , List commandDefinitions ) { } static void writeImageBindingDefinition ( IMemento memento , IImageBindingDefinition imageBindingDefinition ) { } static void writeImageBindingDefinitions ( IMemento memento , String name , List imageBindingDefinitions ) { } static void writeKeyConfigurationDefinition ( IMemento memento , IKeyConfigurationDefinition keyConfigurationDefinition ) { } static void writeKeyConfigurationDefinitions ( IMemento memento , String name , List keyConfigurationDefinitions ) { } static void writeKeySequenceBindingDefinition ( IMemento memento , IKeySequenceBindingDefinition keySequenceBindingDefinition ) { } static void writeKeySequenceBindingDefinitions ( IMemento memento , String name , List keySequenceBindingDefinitions ) { } private static final String ALT = "Alt" ; private static final String COMMAND = "Command" ; private static final String CTRL = "Ctrl" ; private static final String MODIFIER_SEPARATOR = "+" ; private static final String SHIFT = "Shift" ; private static final String STROKE_SEPARATOR = "<seq2seq4repair_space>" ; private static Map stringToValueMap = new TreeMap ( ) ; private static KeySequence deprecatedSequenceToKeySequence ( int [ ] sequence ) { } private static KeyStroke deprecatedStrokeToKeyStroke ( int stroke ) { } private static int [ ] parseDeprecatedSequence ( String string ) { } private static int parseDeprecatedStroke ( String string ) { }

Fix:
activityId = memento . getString ( "contextId" ) ;