Buggy code:
public class PartSite implements IWorkbenchPartSite { private IWorkbenchPartReference partReference ; private IWorkbenchPart part ; private IWorkbenchPage page ; private PartPane pane ; private IConfigurationElement configElement ; private String extensionID ; private String pluginID ; private String extensionName ; private ISelectionProvider selectionProvider ; private SubActionBars actionBars ; private KeyBindingService keyBindingService ; private ArrayList menuExtenders ; public PartSite ( IWorkbenchPartReference ref , IWorkbenchPart part , IWorkbenchPage page ) { } public void dispose ( ) { } public IActionBars getActionBars ( ) { } public IConfigurationElement getConfigurationElement ( ) { } public String getId ( ) { } public IWorkbenchPage getPage ( ) { } public PartPane getPane ( ) { } public IWorkbenchPart getPart ( ) { } public IWorkbenchPartReference getPartReference ( ) { } public String getPluginId ( ) { } public String getRegisteredName ( ) { } public ISelectionProvider getSelectionProvider ( ) { } public Shell getShell ( ) { } public IWorkbenchWindow getWorkbenchWindow ( ) { } public void registerContextMenu ( String menuID , MenuManager menuMgr , ISelectionProvider selProvider ) { } public void registerContextMenu ( MenuManager menuMgr , ISelectionProvider selProvider ) { } public String [ ] getContextMenuIds ( ) { } public void setActionBars ( SubActionBars bars ) { } public void setConfigurationElement ( IConfigurationElement configElement ) { } public void setPane ( PartPane pane ) { } public void setPart ( IWorkbenchPart newPart ) { } public void setSelectionProvider ( ISelectionProvider provider ) { } public IKeyBindingService getKeyBindingService ( ) { if ( ( keyBindingService ) == null ) { <START_BUG> keyBindingService = new KeyBindingService ( workbenchPartSiteCommandSupport . getMutableCommandHandlerService ( ) , workbenchPartSiteContextSupport . getMutableContextActivationService ( ) ) ; <END_BUG> if ( ( this ) instanceof EditorSite ) { EditorActionBuilder . ExternalContributor contributor = ( ( EditorActionBuilder . ExternalContributor ) ( ( ( EditorSite ) ( this ) ) . getExtensionActionBarContributor ( ) ) ) ; if ( contributor != null ) { ActionDescriptor [ ] actionDescriptors = contributor . getExtendedActions ( ) ; if ( actionDescriptors != null ) { for ( int i = 0 ; i < ( actionDescriptors . length ) ; i ++ ) { ActionDescriptor actionDescriptor = actionDescriptors [ i ] ; if ( actionDescriptor != null ) { IAction action = actionDescriptors [ i ] . getAction ( ) ; if ( ( action != null ) && ( ( action . getActionDefinitionId ( ) ) != null ) ) keyBindingService . registerAction ( action ) ; } } } } } } return keyBindingService ; } protected String getInitialScopeId ( ) { } public void schedule ( Job job , long delay ) { } private IWorkbenchPartSiteCommandSupport workbenchPartSiteCommandSupport ; private IWorkbenchPartSiteContextSupport workbenchPartSiteContextSupport ; public IWorkbenchPartSiteCommandSupport getWorkbenchPartSiteCommandSupport ( ) { } public IWorkbenchPartSiteContextSupport getWorkbenchPartSiteContextSupport ( ) { } public Object getAdapter ( Class adapter ) { } private IWorkbenchSiteProgressService getSiteProgressService ( ) { } }

Fix:
keyBindingService = new KeyBindingService ( getId ( ) , workbenchPartSiteCommandSupport . getMutableCommandHandlerService ( ) , workbenchPartSiteContextSupport . getMutableContextActivationService ( ) ) ;