Buggy code:
final class MenuPersistence extends RegistryPersistence { private static final int INDEX_ACTION_SETS = 0 ; private static final int INDEX_GROUPS = 1 ; private static final int INDEX_ITEMS = 2 ; private static final int INDEX_MENUS = 3 ; private static final int INDEX_WIDGETS = 4 ; private static final void readActionSetsFromRegistry ( final IConfigurationElement [ ] configurationElements , final int configurationElementCount , final SMenuManager menuService ) { } private static final SBar readBarFromRegistry ( final IConfigurationElement parentElement , final List warningsToLog , final String id ) { } private static final IDynamicMenu readDynamicMenuFromRegistry ( final IConfigurationElement parentElement , final String id , final List warningsToLog ) { } private static final void readGroupsFromRegistry ( final IConfigurationElement [ ] configurationElements , final int configurationElementCount , final SMenuManager menuService ) { } private static final void readItemsFromRegistry ( final IConfigurationElement [ ] configurationElements , final int configurationElementCount , final SMenuManager menuService , final ICommandService commandService ) { } private static final SLayout readLayoutFromRegistry ( final IConfigurationElement parentElement , final String id , final List warningsToLog ) { } private static final SLocation [ ] readLocationElementsFromRegistry ( final IConfigurationElement parentElement , final String id , final List warningsToLog ) { } private static final LocationElement readMenuLocationFromRegistry ( final IConfigurationElement parentElement , final List warningsToLog , final String id ) { } private static final void readMenusFromRegistry ( final IConfigurationElement [ ] configurationElements , final int configurationElementCount , final SMenuManager menuService ) { } private static final SOrder readOrderingFromRegistry ( final IConfigurationElement parentElement , final String id , final List warningsToLog ) { } private static final SPart readPartFromRegistry ( final IConfigurationElement parentElement , final List warningsToLog , final String id ) { } private static final SPopup readPopupFromRegistry ( final IConfigurationElement parentElement , final List warningsToLog , final String id ) { } private static final SReference [ ] readReferencesFromRegistry ( final IConfigurationElement parentElement , final String id , final List warningsToLog ) { } private static final void readWidgetsFromRegistry ( final IConfigurationElement [ ] configurationElements , final int configurationElementCount , final SMenuManager menuService ) { } private final ICommandService commandService ; private final SMenuManager sMenuManager ; private final IMenuService menuService ; MenuPersistence ( final SMenuManager mm , final IMenuService ms , final ICommandService commandService ) { } public final void dispose ( ) { } protected final boolean isChangeImportant ( final IRegistryChangeEvent event ) { } protected final void read ( ) { } public static void readTrimAdditions ( IMenuService menuService ) { } public static void readAdditions ( IMenuService menuService ) { final IExtensionRegistry registry = Platform . getExtensionRegistry ( ) ; final IConfigurationElement [ ] menusExtensionPoint = registry . getConfigurationElementsFor ( COMMON_MENU_ADDITIONS ) ; for ( int i = 0 ; i < ( menusExtensionPoint . length ) ; i ++ ) { if ( PL_MENU_ADDITION . equals ( menusExtensionPoint [ i ] . getName ( ) ) ) { String locationURI = menusExtensionPoint [ i ] . getAttribute ( TAG_LOCATION_URI ) ; MenuLocationURI uri = new MenuLocationURI ( locationURI ) ; if ( uri != null ) { <START_BUG> menuService . addCacheForURI ( new MenuAdditionCacheEntry ( menusExtensionPoint [ i ] , menuService ) ) ; <END_BUG> } } } } }

Fix:
menuService . addMenuCache ( new MenuAdditionCacheEntry ( menusExtensionPoint [ i ] , menuService ) ) ;