Program: 58275
Project: 58275
Buggy source:
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
  iMouseOverObjectID=-1;
switch (pickingType) {
case REMOTE_VIEW_DRAG:
switch (pickingMode) {
case CLICKED:
      if (!dragAndDrop.isDragActionRunning()) {
        dragAndDrop.startDragAction(iExternalID);
      }
    iMouseOverObjectID=iExternalID;
  compactPoolLevel();
break;
}
break;
case REMOTE_VIEW_REMOVE:
switch (pickingMode) {
case CLICKED:
RemoteLevelElement element=RemoteElementManager.get().getItem(iExternalID);
AGLView glView=element.getGLView();
removeView(glView);
element.setGLView(null);
containedGLViews.remove(glView);
if (element.getRemoteLevel() == poolLevel) {
compactPoolLevel();
}
setDisplayListDirty();
break;
}
break;
case REMOTE_VIEW_LOCK:
switch (pickingMode) {
case CLICKED:
RemoteLevelElement element=RemoteElementManager.get().getItem(iExternalID);
element.lock(!element.isLocked());
break;
}
break;
case REMOTE_LEVEL_ELEMENT:
switch (pickingMode) {
case MOUSE_OVER:
case DRAGGED:
iMouseOverObjectID=iExternalID;
break;
case CLICKED:
if (dragAndDrop.isDragActionRunning()) {
break;
}
for (RemoteLevelElement element : poolLevel.getAllElements()) {
if (element.getID() == iExternalID) {
loadViewToFocusLevel(iExternalID);
break;
}
}
break;
}
break;
case REMOTE_VIEW_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
if (iActiveViewID == iExternalID) {
break;
}
iActiveViewID=iExternalID;
setDisplayListDirty();
break;
case CLICKED:
break;
case RIGHT_CLICKED:
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
break;
}
break;
case CONTEXT_MENU_SELECTION:
System.out.println("String_Node_Str");
break;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
switch (pickingType) {
case REMOTE_VIEW_DRAG:
switch (pickingMode) {
case CLICKED:
      if (!dragAndDrop.isDragActionRunning()) {
        dragAndDrop.startDragAction(iExternalID);
      }
    iMouseOverObjectID=iExternalID;
  compactPoolLevel();
break;
}
break;
case REMOTE_VIEW_REMOVE:
switch (pickingMode) {
case CLICKED:
RemoteLevelElement element=RemoteElementManager.get().getItem(iExternalID);
AGLView glView=element.getGLView();
removeView(glView);
element.setGLView(null);
containedGLViews.remove(glView);
if (element.getRemoteLevel() == poolLevel) {
compactPoolLevel();
}
setDisplayListDirty();
break;
}
break;
case REMOTE_VIEW_LOCK:
switch (pickingMode) {
case CLICKED:
RemoteLevelElement element=RemoteElementManager.get().getItem(iExternalID);
element.lock(!element.isLocked());
break;
}
break;
case REMOTE_LEVEL_ELEMENT:
switch (pickingMode) {
case MOUSE_OVER:
case DRAGGED:
iMouseOverObjectID=iExternalID;
break;
case CLICKED:
if (dragAndDrop.isDragActionRunning()) {
break;
}
for (RemoteLevelElement element : poolLevel.getAllElements()) {
if (element.getID() == iExternalID) {
loadViewToFocusLevel(iExternalID);
break;
}
}
break;
}
break;
case REMOTE_VIEW_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
if (iActiveViewID == iExternalID) {
break;
}
iActiveViewID=iExternalID;
setDisplayListDirty();
break;
case CLICKED:
break;
case RIGHT_CLICKED:
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
break;
}
break;
case CONTEXT_MENU_SELECTION:
System.out.println("String_Node_Str");
break;
}
}