Program: 148415
Project: 148415
Buggy source:
private void hookContextMenu(){
  MenuManager menuMgr=new MenuManager();
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new PhysicalDeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new LogicalDeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new NewItemAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new SubmitItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new CompareItemWithEachOtherAction(getSite().getShell(),getResultsViewer()));
      java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
      for (      IAvailableModel model : availablemodels) {
        model.menuAboutToShow(manager,DataClusterBrowserMainPage.this);
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(resultsViewer.getControl());
  resultsViewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,resultsViewer);
}

Fixed version (ground truth):
private void hookContextMenu(){
  MenuManager menuMgr=new MenuManager();
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditTaskIdAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new PhysicalDeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new LogicalDeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new NewItemAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new SubmitItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new CompareItemWithEachOtherAction(getSite().getShell(),getResultsViewer()));
      java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels();
      for (      IAvailableModel model : availablemodels) {
        model.menuAboutToShow(manager,DataClusterBrowserMainPage.this);
      }
    }
  }
);
  Menu menu=menuMgr.createContextMenu(resultsViewer.getControl());
  resultsViewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,resultsViewer);
}