Program: 57922
Project: 57922
Buggy source:
/** 
 * Handles the picking events and triggers selection events
 * @param pickingMode for example mouse-over or clicked
 * @param externalID the id specified when calling {@link PickingIDManager#getPickingID(ABookmarkContainer,int)}Internal to the specific BookmarkContainer
 */
void handleEvents(PickingType ePickingType,PickingMode pickingMode,Integer externalID,final Pick pick){
  SelectionType selectionType;
switch (ePickingType) {
case BOOKMARK_ELEMENT:
switch (pickingMode) {
case CLICKED:
      selectionType=SelectionType.SELECTION;
    break;
case MOUSE_OVER:
  selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
BookmarkContextMenuItemContainer bookmarkContextMenuItemContainer=new BookmarkContextMenuItemContainer();
bookmarkContextMenuItemContainer.tableID(internalIDType,externalID);
ContextMenu contextMenu=manager.getContextMenu();
contextMenu.addItemContanier(bookmarkContextMenuItemContainer);
if (manager.isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),manager.getParentGLCanvas().getWidth(),manager.getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(manager);
}
break;
default :
return;
}
if (selectionType == SelectionType.SELECTION) {
}
selectionManager.clearSelection(selectionType);
selectionManager.addToType(selectionType,externalID);
ISelectionDelta selectionDelta=selectionManager.getDelta();
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainID(manager.getDataDomain().getDataDomainID());
event.setSelectionDelta((SelectionDelta)selectionDelta);
GeneralManager.get().getEventPublisher().triggerEvent(event);
break;
case BOOKMARK_CONTAINER_HEADING:
break;
}
}

Fixed version (ground truth):
/** 
 * Handles the picking events and triggers selection events
 * @param pickingMode for example mouse-over or clicked
 * @param externalID the id specified when calling {@link PickingIDManager#getPickingID(ABookmarkContainer,int)}Internal to the specific BookmarkContainer
 */
void handleEvents(PickingType ePickingType,PickingMode pickingMode,Integer externalID,final Pick pick){
  SelectionType selectionType;
  System.out.println(pickingMode);
switch (ePickingType) {
case BOOKMARK_ELEMENT:
switch (pickingMode) {
case CLICKED:
      selectionType=SelectionType.SELECTION;
    break;
case MOUSE_OVER:
  selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
@Override public void run(){
final Shell shell=manager.getParentComposite().getShell();
final Menu menu=new Menu(shell,SWT.POP_UP);
Point point=manager.getParentComposite().toDisplay(0,0);
System.out.println(point);
menu.setLocation(point.x + pick.getPickedPoint().x,point.y + pick.getPickedPoint().y);
MenuItem item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
item=new MenuItem(menu,SWT.PUSH);
item.setText("String_Node_Str");
shell.setMenu(menu);
menu.setVisible(true);
}
}
);
break;
default :
return;
}
if (selectionType == SelectionType.SELECTION) {
}
selectionManager.clearSelection(selectionType);
selectionManager.addToType(selectionType,externalID);
ISelectionDelta selectionDelta=selectionManager.getDelta();
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainID(manager.getDataDomain().getDataDomainID());
event.setSelectionDelta((SelectionDelta)selectionDelta);
GeneralManager.get().getEventPublisher().triggerEvent(event);
break;
case BOOKMARK_CONTAINER_HEADING:
break;
}
}