Source:
<code>private void loadMenuAndToolbarStructure() { customizeActionBars = new CustomizeActionBars(configurer, context); window.fillActionBars(customizeActionBars, ActionBarAdvisor.FILL_PROXY | ActionBarAdvisor.FILL_MENU_BAR | ActionBarAdvisor.FILL_COOL_BAR); window.fill(customizeActionBars.menuRenderer, customizeActionBars.mainMenu, customizeActionBars.menuManager); for (ActionSet actionSet : actionSets) { ActionSetDescriptor descriptor = actionSet.descriptor; PluginActionSet pluginActionSet = buildMenusAndToolbarsFor( customizeActionBars, descriptor); if (pluginActionSet != null) { pluginActionSet.dispose(); } } MenuManager menuManager = customizeActionBars.menuManager; IContributionItem[] items = menuManager.getItems(); <START> for (int src = 0; src < items.length; src++) { <END> IContributionItem item = items[src]; if (item instanceof ActionSetContributionItem) { ActionSetContributionItem asci = (ActionSetContributionItem) item; menuManager.add(asci.getInnerItem()); } } customizeActionBars.menuManager.setVisible(true); makeAllContributionsVisible(customizeActionBars.menuManager); customizeActionBars.menuRenderer.reconcileManagerToModel(customizeActionBars.menuManager, customizeActionBars.mainMenu); IPresentationEngine engine = context.get(IPresentationEngine.class); engine.createGui(customizeActionBars.mainMenu, customizeActionBars.windowModel.getWidget(), customizeActionBars.windowModel.getContext()); MTrimBar topTrim = customizeActionBars.coolBarManager.getTopTrim(); topTrim.setToBeRendered(true); engine.createGui(topTrim, customizeActionBars.windowModel.getWidget(), customizeActionBars.windowModel.getContext()); customizeActionBars.menuManager.updateAll(true); customizeActionBars.coolBarManager.update(true); shortcuts = new Category(""); toolBarItems = createTrimBarEntries(topTrim); menuItems = createMenuStructure(customizeActionBars.mainMenu); }</code><technical_language>Enhanced for loop</technical_language>

Target:
private void loadMenuAndToolbarStructure() { customizeActionBars = new CustomizeActionBars(configurer, context); window.fillActionBars(customizeActionBars, ActionBarAdvisor.FILL_PROXY | ActionBarAdvisor.FILL_MENU_BAR | ActionBarAdvisor.FILL_COOL_BAR); window.fill(customizeActionBars.menuRenderer, customizeActionBars.mainMenu, customizeActionBars.menuManager); for (ActionSet actionSet : actionSets) { ActionSetDescriptor descriptor = actionSet.descriptor; PluginActionSet pluginActionSet = buildMenusAndToolbarsFor( customizeActionBars, descriptor); if (pluginActionSet != null) { pluginActionSet.dispose(); } } MenuManager menuManager = customizeActionBars.menuManager; IContributionItem[] items = menuManager.getItems(); for (IContributionItem item : items) { if (item instanceof ActionSetContributionItem) { ActionSetContributionItem asci = (ActionSetContributionItem) item; menuManager.add(asci.getInnerItem()); } } customizeActionBars.menuManager.setVisible(true); makeAllContributionsVisible(customizeActionBars.menuManager); customizeActionBars.menuRenderer.reconcileManagerToModel(customizeActionBars.menuManager, customizeActionBars.mainMenu); IPresentationEngine engine = context.get(IPresentationEngine.class); engine.createGui(customizeActionBars.mainMenu, customizeActionBars.windowModel.getWidget(), customizeActionBars.windowModel.getContext()); MTrimBar topTrim = customizeActionBars.coolBarManager.getTopTrim(); topTrim.setToBeRendered(true); engine.createGui(topTrim, customizeActionBars.windowModel.getWidget(), customizeActionBars.windowModel.getContext()); customizeActionBars.menuManager.updateAll(true); customizeActionBars.coolBarManager.update(true); shortcuts = new Category(""); toolBarItems = createTrimBarEntries(topTrim); menuItems = createMenuStructure(customizeActionBars.mainMenu); }