Buggy code:
public void addPageListener ( IPageListener l ) { } public void addPerspectiveListener ( org . eclipse . ui . IPerspectiveListener l ) { } void addPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page ) { } protected void addShortcutBar ( int style ) { } protected void addToolBar ( int style ) { } private boolean busyClose ( ) { } protected IWorkbenchPage busyOpenPage ( String perspID , IAdaptable input ) throws WorkbenchException { } public int open ( ) { } protected boolean canHandleShellCloseEvent ( ) { } public boolean close ( ) { } protected boolean isClosing ( ) { } protected boolean isToolBarLocked ( ) { } private void closeAllPages ( ) { } public void closeAllPages ( boolean save ) { } protected boolean closePage ( IWorkbenchPage in , boolean save ) { } private void showEmptyWindowMessage ( ) { } protected void configureShell ( Shell shell ) { } private void createShortcutBar ( Shell shell ) { } protected Control createToolBarControl ( Shell shell ) { } protected ToolBarManager createToolBarManager ( int style ) { } protected MenuManager createMenuManager ( ) { final MenuManager result = super . createMenuManager ( ) ; result . setOverrides ( new IContributionManagerOverrides ( ) { private CommandManager commandManager = CommandManager . getInstance ( ) ; public Integer getAccelerator ( IContributionItem contributionItem ) { if ( ! ( contributionItem instanceof ActionContributionItem ) ) return null ; ActionContributionItem actionContributionItem = ( ( ActionContributionItem ) ( contributionItem ) ) ; String commandId = actionContributionItem . getAction ( ) . getActionDefinitionId ( ) ; if ( commandId == null ) { int accelerator = actionContributionItem . getAction ( ) . getAccelerator ( ) ; if ( accelerator != 0 ) { KeyStroke keyStroke = KeySupport . convertAcceleratorToKeyStroke ( accelerator ) ; KeySequence keySequence = KeySequence . getInstance ( keyStroke ) ; Map matchesByKeySequence = commandManager . getMatchesByKeySequence ( ) ; if ( ( matchesByKeySequence . get ( keySequence ) ) == null ) return null ; } } else if ( "carbon" . equals ( SWT . getPlatform ( ) ) ) { Map keyBindingsByCommandId = commandManager . getKeyBindingsByCommandId ( ) ; SortedSet keyBindings = ( ( SortedSet ) ( keyBindingsByCommandId . get ( commandId ) ) ) ; if ( keyBindings != null ) { IKeyBinding keyBinding = ( ( IKeyBinding ) ( keyBindings . first ( ) ) ) ; if ( keyBinding != null ) { KeySequence keySequence = keyBinding . getKeySequence ( ) ; List keyStrokes = keySequence . getKeyStrokes ( ) ; if ( ( keyStrokes . size ( ) ) == 1 ) { KeyStroke keyStroke = ( ( KeyStroke ) ( keyStrokes . get ( 0 ) ) ) ; return new Integer ( KeySupport . convertKeyStrokeToAccelerator ( keyStroke ) ) ; } } } } return new Integer ( 0 ) ; } public String getAcceleratorText ( IContributionItem contributionItem ) { if ( ! ( contributionItem instanceof ActionContributionItem ) ) return null ; ActionContributionItem actionContributionItem = ( ( ActionContributionItem ) ( contributionItem ) ) ; String commandId = actionContributionItem . getAction ( ) . getActionDefinitionId ( ) ; if ( commandId == null ) { int accelerator = actionContributionItem . getAction ( ) . getAccelerator ( ) ; if ( accelerator != 0 ) { KeyStroke keyStroke = KeySupport . convertAcceleratorToKeyStroke ( accelerator ) ; KeySequence keySequence = KeySequence . getInstance ( keyStroke ) ; Map matchesByKeySequence = commandManager . getMatchesByKeySequence ( ) ; if ( ( matchesByKeySequence . get ( keySequence ) ) == null ) return null ; } } else if ( "carbon" . equals ( SWT . getPlatform ( ) ) ) { Map keyBindingsByCommandId = commandManager . getKeyBindingsByCommandId ( ) ; SortedSet keyBindings = ( ( SortedSet ) ( keyBindingsByCommandId . get ( commandId ) ) ) ; if ( keyBindings != null ) { IKeyBinding keyBinding = ( ( IKeyBinding ) ( keyBindings . first ( ) ) ) ; if ( keyBinding != null ) <START_BUG> return KeySupport . formatCarbon ( keyBinding . getKeySequence ( ) ) ; <END_BUG> } } else { String acceleratorText = commandManager . getKeyTextForCommand ( commandId ) ; if ( acceleratorText != null ) return acceleratorText ; } return "" ; } public String getText ( IContributionItem contributionItem ) { if ( ! ( contributionItem instanceof MenuManager ) ) return null ; MenuManager menuManager = ( ( MenuManager ) ( contributionItem ) ) ; IContributionManager parent = menuManager . getParent ( ) ; if ( parent != result ) { if ( parent instanceof SubMenuManager ) { parent = ( ( SubMenuManager ) ( parent ) ) . getParent ( ) ; if ( parent != result ) return null ; } else return null ; } String text = menuManager . getMenuText ( ) ; int index = text . indexOf ( '&' ) ; if ( ( index < 0 ) || ( index == ( ( text . length ( ) ) - 1 ) ) ) return text ; char altChar = Character . toUpperCase ( text . charAt ( ( index + 1 ) ) ) ; KeySequence mode = commandManager . getMode ( ) ; List keyStrokes = new ArrayList ( mode . getKeyStrokes ( ) ) ; keyStrokes . add ( KeySupport . convertAcceleratorToKeyStroke ( ( ( SWT . ALT ) | altChar ) ) ) ; KeySequence childMode = KeySequence . getInstance ( keyStrokes ) ; Map matchesByKeySequence = commandManager . getMatchesByKeySequence ( ) ; Match match = ( ( Match ) ( matchesByKeySequence . get ( childMode ) ) ) ; if ( ( match == null ) || ( ( match . getCommandId ( ) ) == null ) ) return text ; if ( index == 0 ) return text . substring ( 1 ) ; return ( text . substring ( 0 , index ) ) + ( text . substring ( ( index + 1 ) ) ) ; }

Fix:
return KeySupport . formatOSX ( keyBinding . getKeySequence ( ) ) ;