Buggy code:
public final class WorkbenchKeyboard { public final class KeyDownFilter implements Listener { private transient boolean enabled = true ; public final void handleEvent ( final Event event ) { } public final boolean isEnabled ( ) { } public final void setEnabled ( final boolean enabled ) { } } private static final boolean DEBUG = Policy . DEBUG_KEY_BINDINGS ; private static final boolean DEBUG_VERBOSE = Policy . DEBUG_KEY_BINDINGS_VERBOSE ; private static final int DELAY = 1000 ; static KeySequence outOfOrderKeys ; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle . getBundle ( WorkbenchKeyboard . class . getName ( ) ) ; public static List generatePossibleKeyStrokes ( Event event ) { } private static boolean isOutOfOrderKey ( List keyStrokes ) { } private IBindingService bindingService = null ; private KeyAssistDialog keyAssistDialog = null ; private final WorkbenchKeyboard . KeyDownFilter keyDownFilter = new WorkbenchKeyboard . KeyDownFilter ( ) ; private final OutOfOrderListener outOfOrderListener = new OutOfOrderListener ( this ) ; private final OutOfOrderVerifyListener outOfOrderVerifyListener = new OutOfOrderVerifyListener ( outOfOrderListener ) ; private long startTime = Long . MAX_VALUE ; private final KeyBindingState state ; private final IWindowListener windowListener = new IWindowListener ( ) { public void windowActivated ( IWorkbenchWindow window ) { } public void windowClosed ( IWorkbenchWindow window ) { } public void windowDeactivated ( IWorkbenchWindow window ) { } public void windowOpened ( IWorkbenchWindow window ) { } } ; private final IWorkbench workbench ; public WorkbenchKeyboard ( Workbench associatedWorkbench ) { } private void checkActiveWindow ( IWorkbenchWindow window ) { } private void closeMultiKeyAssistShell ( ) { } final boolean executeCommand ( final Binding binding , final Event trigger ) throws CommandException { } private void filterKeySequenceBindings ( Event event ) { } public WorkbenchKeyboard . KeyDownFilter getKeyDownFilter ( ) { } private Binding getPerfectMatch ( KeySequence keySequence ) { } final KeySequence getBuffer ( ) { } private void incrementState ( KeySequence sequence ) { } private boolean isPartialMatch ( KeySequence keySequence ) { } private boolean isPerfectMatch ( KeySequence keySequence ) { } final void logException ( final CommandException e , final ParameterizedCommand command ) { } public final void openMultiKeyAssistShell ( ) { } public final void openKeyAssistShell ( final Collection bindings ) { } public boolean press ( List potentialKeyStrokes , Event event ) { if ( ( WorkbenchKeyboard . DEBUG ) && ( WorkbenchKeyboard . DEBUG_VERBOSE ) ) { Tracing . printTrace ( "KEYS" , ( ( "WorkbenchKeyboard.press(potentialKeyStrokes<seq2seq4repair_space>=<seq2seq4repair_space>" + potentialKeyStrokes ) + ')' ) ) ; } <START_BUG> if ( "gtk" . equals ( SWT . getPlatform ( ) ) ) { <END_BUG> final Widget widget = event . widget ; final ContextService contextService = ( ( ContextService ) ( workbench . getService ( IContextService . class ) ) ) ; if ( ( widget instanceof Control ) && ( ! ( widget . isDisposed ( ) ) ) ) { final Shell shell = ( ( Control ) ( widget ) ) . getShell ( ) ; contextService . updateShellKludge ( shell ) ; } else { contextService . updateShellKludge ( ) ; } final HandlerService handlerService = ( ( HandlerService ) ( workbench . getService ( IHandlerService . class ) ) ) ; if ( ( widget instanceof Control ) && ( ! ( widget . isDisposed ( ) ) ) ) { final Shell shell = ( ( Control ) ( widget ) ) . getShell ( ) ; handlerService . updateShellKludge ( shell ) ; } else { handlerService . updateShellKludge ( ) ; } } KeySequence errorSequence = null ; Collection errorMatch = null ; KeySequence sequenceBeforeKeyStroke = state . getCurrentSequence ( ) ; for ( Iterator iterator = potentialKeyStrokes . iterator ( ) ; iterator . hasNext ( ) ; ) { KeySequence sequenceAfterKeyStroke = KeySequence . getInstance ( sequenceBeforeKeyStroke , ( ( KeyStroke ) ( iterator . next ( ) ) ) ) ; if ( isPartialMatch ( sequenceAfterKeyStroke ) ) { incrementState ( sequenceAfterKeyStroke ) ; return true ; } else if ( isPerfectMatch ( sequenceAfterKeyStroke ) ) { final Binding binding = getPerfectMatch ( sequenceAfterKeyStroke ) ; try { return ( executeCommand ( binding , event ) ) || ( ! ( sequenceBeforeKeyStroke . isEmpty ( ) ) ) ; } catch ( final CommandException e ) { logException ( e , binding . getParameterizedCommand ( ) ) ; return true ; } } else if ( ( ( ( keyAssistDialog ) != null ) && ( ( keyAssistDialog . getShell ( ) ) != null ) ) && ( ( ( ( ( ( ( ( event . keyCode ) == ( SWT . ARROW_DOWN ) ) || ( ( event . keyCode ) == ( SWT . ARROW_UP ) ) ) || ( ( event . keyCode ) == ( SWT . ARROW_LEFT ) ) ) || ( ( event . keyCode ) == ( SWT . ARROW_RIGHT ) ) ) || ( ( event . keyCode ) == ( SWT . CR ) ) ) || ( ( event . keyCode ) == ( SWT . PAGE_UP ) ) ) || ( ( event . keyCode ) == ( SWT . PAGE_DOWN ) ) ) ) { return false ; } else { Collection match = ( ( InternalPolicy . currentConflicts ) == null ) ? null : ( ( Collection ) ( currentConflicts . get ( sequenceAfterKeyStroke ) ) ) ; if ( match != null ) { errorSequence = sequenceAfterKeyStroke ; errorMatch = match ; } } } resetState ( true ) ; if ( ( sequenceBeforeKeyStroke . isEmpty ( ) ) && ( errorSequence != null ) ) { openKeyAssistShell ( errorMatch ) ; } return ! ( sequenceBeforeKeyStroke . isEmpty ( ) ) ; } void processKeyEvent ( List keyStrokes , Event event ) { } private final void resetState ( final boolean clearRememberedState ) { } }

Fix:
if ( Util . isGtk ( ) ) {