Buggy code:
public class CyclePartAction extends PageEventAction { private String commandBackward = null ; private String commandForward = null ; protected boolean forward ; private Object selection ; public CyclePartAction ( IWorkbenchWindow window , boolean forward ) { } public void activate ( IWorkbenchPage page , Object selectedItem ) { } protected void addItems ( Table table , WorkbenchPage page ) { } private void addKeyListener ( final Table table , final Shell dialog ) { table . addKeyListener ( new KeyListener ( ) { private boolean firstKey = true ; private boolean quickReleaseMode = false ; public void keyPressed ( KeyEvent e ) { int keyCode = e . keyCode ; char character = e . character ; int accelerator = SWTKeySupport . convertEventToUnmodifiedAccelerator ( e ) ; KeyStroke keyStroke = SWTKeySupport . convertAcceleratorToKeyStroke ( accelerator ) ; boolean acceleratorForward = false ; boolean acceleratorBackward = false ; <START_BUG> ICommandManager commandManager = PlatformUI . getWorkbench ( ) . getCommandManager ( ) ; <END_BUG> if ( ( commandForward ) != null ) { ICommand command = commandManager . getCommand ( commandForward ) ; if ( command . isDefined ( ) ) { List keySequenceBindings = command . getKeySequenceBindings ( ) ; Iterator iterator = keySequenceBindings . iterator ( ) ; while ( iterator . hasNext ( ) ) { IKeySequenceBinding keySequenceBinding = ( ( IKeySequenceBinding ) ( iterator . next ( ) ) ) ; List keyStrokes = keySequenceBinding . getKeySequence ( ) . getKeyStrokes ( ) ; if ( ( ! ( keyStrokes . isEmpty ( ) ) ) && ( keyStrokes . get ( ( ( keyStrokes . size ( ) ) - 1 ) ) . equals ( keyStroke ) ) ) { acceleratorForward = true ; break ; } } } } if ( ( commandBackward ) != null ) { ICommand command = commandManager . getCommand ( commandBackward ) ; if ( command . isDefined ( ) ) { List keySequenceBindings = command . getKeySequenceBindings ( ) ; Iterator iterator = keySequenceBindings . iterator ( ) ; while ( iterator . hasNext ( ) ) { IKeySequenceBinding keySequenceBinding = ( ( IKeySequenceBinding ) ( iterator . next ( ) ) ) ; List keyStrokes = keySequenceBinding . getKeySequence ( ) . getKeyStrokes ( ) ; if ( ( ! ( keyStrokes . isEmpty ( ) ) ) && ( keyStrokes . get ( ( ( keyStrokes . size ( ) ) - 1 ) ) . equals ( keyStroke ) ) ) { acceleratorBackward = true ; break ; } } } } if ( ( character == ( SWT . CR ) ) || ( character == ( SWT . LF ) ) ) ok ( dialog , table ) ; else if ( acceleratorForward ) { if ( ( firstKey ) && ( ( e . stateMask ) != 0 ) ) quickReleaseMode = true ; int index = table . getSelectionIndex ( ) ; table . setSelection ( ( ( index + 1 ) % ( table . getItemCount ( ) ) ) ) ; } else if ( acceleratorBackward ) { if ( ( firstKey ) && ( ( e . stateMask ) != 0 ) ) quickReleaseMode = true ; int index = table . getSelectionIndex ( ) ; table . setSelection ( ( index >= 1 ? index - 1 : ( table . getItemCount ( ) ) - 1 ) ) ; } else if ( ( ( ( ( ( ( ( keyCode != ( SWT . ALT ) ) && ( keyCode != ( SWT . COMMAND ) ) ) && ( keyCode != ( SWT . CTRL ) ) ) && ( keyCode != ( SWT . SHIFT ) ) ) && ( keyCode != ( SWT . ARROW_DOWN ) ) ) && ( keyCode != ( SWT . ARROW_UP ) ) ) && ( keyCode != ( SWT . ARROW_LEFT ) ) ) && ( keyCode != ( SWT . ARROW_RIGHT ) ) ) cancel ( dialog ) ; firstKey = false ; } public void keyReleased ( KeyEvent e ) { int keyCode = e . keyCode ; int stateMask = e . stateMask ; final IPreferenceStore store = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; final boolean stickyCycle = store . getBoolean ( STICKY_CYCLE ) ; if ( ( ( ! stickyCycle ) && ( ( firstKey ) || ( quickReleaseMode ) ) ) && ( keyCode == stateMask ) ) ok ( dialog , table ) ; } } ) ; } private void addMouseListener ( final Table table , final Shell dialog ) { } private final void addTraverseListener ( final Table table ) { } private void cancel ( Shell dialog ) { } public String getBackwardActionDefinitionId ( ) { } public String getForwardActionDefinitionId ( ) { } protected String getTableHeader ( ) { } private void ok ( Shell dialog , final Table table ) { } private void openDialog ( WorkbenchPage page ) { } public void pageActivated ( IWorkbenchPage page ) { } public void pageClosed ( IWorkbenchPage page ) { } public void partClosed ( IWorkbenchPart part ) { } public void partOpened ( IWorkbenchPart part ) { } public void runWithEvent ( Event e ) { } public void setBackwardActionDefinitionId ( String actionDefinitionId ) { } public void setForwardActionDefinitionId ( String actionDefinitionId ) { } protected void setText ( ) { } protected void updateState ( ) { } }

Fix:
ICommandManager commandManager = PlatformUI . getWorkbench ( ) . getCommandSupport ( ) . getCommandManager ( ) ;