Program: 58136
Project: 58136
Buggy source:
@Override protected void handlePickingEvents(final EPickingType pickingType,final EPickingMode pickingMode,final int pickingID,final Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW || bIsDraggingActive || bWasAxisMoved) {
    return;
  }
  SelectionType selectionType;
switch (pickingType) {
case PCS_VIEW_SELECTION:
    break;
case POLYLINE_SELECTION:
switch (pickingMode) {
case CLICKED:
    selectionType=SelectionType.SELECTION;
  if (bAngularBrushingSelectPolyline) {
    bAngularBrushingSelectPolyline=false;
    bIsAngularBrushingActive=true;
    iSelectedLineID=pickingID;
    linePick=pick;
    bIsAngularBrushingFirstTime=true;
  }
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
if (!dataDomain.getDataDomainType().equals("String_Node_Str")) break;
ContentContextMenuItemContainer contentContextMenuItemContainer=new ContentContextMenuItemContainer();
contentContextMenuItemContainer.setDataDomain(dataDomain);
contentContextMenuItemContainer.setID(contentIDType,pickingID);
contextMenu.addItemContanier(contentContextMenuItemContainer);
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
break;
default :
return;
}
if (contentSelectionManager.checkStatus(selectionType,pickingID)) {
break;
}
connectedElementRepresentationManager.clear(contentSelectionManager.getIDType(),selectionType);
contentSelectionManager.clearSelection(selectionType);
contentSelectionManager.addToType(selectionType,pickingID);
contentSelectionManager.addConnectionID(generalManager.getIDManager().createID(EManagedObjectType.CONNECTION),pickingID);
if (!bAngularBrushingSelectPolyline) {
ISelectionDelta selectionDelta=contentSelectionManager.getDelta();
handleConnectedElementReps(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainType(dataDomain.getDataDomainType());
event.setSelectionDelta((SelectionDelta)selectionDelta);
event.setInfo(getShortInfoLocal());
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
break;
case X_AXIS_SELECTION:
break;
case Y_AXIS_SELECTION:
switch (pickingMode) {
case CLICKED:
selectionType=SelectionType.SELECTION;
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
StorageContextMenuItemContainer experimentContextMenuItemContainer=new StorageContextMenuItemContainer();
experimentContextMenuItemContainer.setDataDomain(dataDomain);
experimentContextMenuItemContainer.setID(storageIDType,pickingID);
contextMenu.addItemContanier(experimentContextMenuItemContainer);
default :
return;
}
storageSelectionManager.clearSelection(selectionType);
storageSelectionManager.addToType(selectionType,pickingID);
storageSelectionManager.addConnectionID(generalManager.getIDManager().createID(EManagedObjectType.CONNECTION),pickingID);
connectedElementRepresentationManager.clear(storageSelectionManager.getIDType(),selectionType);
ISelectionDelta selectionDelta=storageSelectionManager.getDelta();
handleConnectedElementReps(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainType(dataDomain.getDataDomainType());
event.setSelectionDelta((SelectionDelta)selectionDelta);
eventPublisher.triggerEvent(event);
setDisplayListDirty();
break;
case GATE_TIP_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_TIP_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
draggedObject=EPickingType.GATE_TIP_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case GATE_BOTTOM_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_BOTTOM_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
draggedObject=EPickingType.GATE_BOTTOM_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case GATE_BODY_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_BODY_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
bIsGateDraggingFirstTime=true;
draggedObject=EPickingType.GATE_BODY_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case PC_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
break;
}
break;
case REMOVE_AXIS:
switch (pickingMode) {
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_DELETE;
iChangeDropOnAxisNumber=pickingID;
break;
case CLICKED:
if (storageVA.containsElement(storageVA.get(pickingID)) == 1) {
removeGate(storageVA.get(pickingID));
}
Integer storageID=storageVA.get(pickingID);
storageSelectionManager.remove(pickingID);
StorageVADelta vaDelta=new StorageVADelta(StorageVAType.STORAGE,storageIDType);
vaDelta.add(VADeltaItem.remove(pickingID));
sendStorageFilterEvent(vaDelta,"String_Node_Str" + dataDomain.getStorageLabel(storageID));
setDisplayListDirty();
resetAxisSpacing();
break;
}
break;
case MOVE_AXIS:
switch (pickingMode) {
case CLICKED:
bWasAxisMoved=true;
bWasAxisDraggedFirstTime=true;
iMovedAxisPosition=pickingID;
setDisplayListDirty();
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_MOVE;
iChangeDropOnAxisNumber=pickingID;
setDisplayListDirty();
break;
}
break;
case DUPLICATE_AXIS:
switch (pickingMode) {
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_DUPLICATE;
iChangeDropOnAxisNumber=pickingID;
break;
case CLICKED:
if (pickingID >= 0) {
StorageVADelta vaDelta=new StorageVADelta(StorageVAType.STORAGE,storageIDType);
vaDelta.add(VADeltaItem.copy(pickingID));
sendStorageFilterEvent(vaDelta,"String_Node_Str" + dataDomain.getStorageLabel(storageVA.get(pickingID)));
setDisplayListDirty();
resetAxisSpacing();
break;
}
}
break;
case ADD_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
AGate gate;
if (set.isSetHomogeneous()) {
gate=new Gate(++iGateCounter,pickingID,(float)set.getRawForNormalized(0),(float)set.getRawForNormalized(0.5f),set,renderStyle);
}
 else {
gate=new NominalGate(++iGateCounter,pickingID,0,0.5f,set,renderStyle);
}
hashGates.put(this.iGateCounter,gate);
hashIsGateBlocking.put(this.iGateCounter,new ArrayList<Integer>());
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case ADD_MASTER_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
Gate gate=new Gate(++iGateCounter,-1,(float)set.getRawForNormalized(0),(float)set.getRawForNormalized(0.5f),set,renderStyle);
gate.setMasterGate(true);
hashMasterGates.put(iGateCounter,gate);
hashIsGateBlocking.put(iGateCounter,new ArrayList<Integer>());
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case REMOVE_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
if (hashGates.remove(pickingID) == null) hashMasterGates.remove(pickingID);
hashIsGateBlocking.remove(pickingID);
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case ANGULAR_UPPER:
switch (pickingMode) {
case CLICKED:
bIsAngularDraggingActive=true;
case DRAGGED:
bIsAngularDraggingActive=true;
}
break;
case ANGULAR_LOWER:
switch (pickingMode) {
case CLICKED:
bIsAngularDraggingActive=true;
case DRAGGED:
bIsAngularDraggingActive=true;
}
break;
case REMOVE_NAN:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
if (hashExcludeNAN.containsKey(pickingID)) {
hashExcludeNAN.remove(pickingID);
}
 else {
hashExcludeNAN.put(pickingID,null);
}
setDisplayListDirty();
break;
}
break;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(final EPickingType pickingType,final EPickingMode pickingMode,final int pickingID,final Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW || bIsDraggingActive || bWasAxisMoved) {
    return;
  }
  SelectionType selectionType;
switch (pickingType) {
case PCS_VIEW_SELECTION:
    break;
case POLYLINE_SELECTION:
switch (pickingMode) {
case CLICKED:
    selectionType=SelectionType.SELECTION;
  if (bAngularBrushingSelectPolyline) {
    bAngularBrushingSelectPolyline=false;
    bIsAngularBrushingActive=true;
    iSelectedLineID=pickingID;
    linePick=pick;
    bIsAngularBrushingFirstTime=true;
  }
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
if (!dataDomain.getDataDomainType().equals("String_Node_Str")) break;
ContentContextMenuItemContainer contentContextMenuItemContainer=new ContentContextMenuItemContainer();
contentContextMenuItemContainer.setDataDomain(dataDomain);
contentContextMenuItemContainer.setID(contentIDType,pickingID);
contextMenu.addItemContanier(contentContextMenuItemContainer);
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
break;
default :
return;
}
if (contentSelectionManager.checkStatus(selectionType,pickingID)) {
break;
}
connectedElementRepresentationManager.clear(contentSelectionManager.getIDType(),selectionType);
contentSelectionManager.clearSelection(selectionType);
contentSelectionManager.addToType(selectionType,pickingID);
contentSelectionManager.addConnectionID(generalManager.getIDManager().createID(EManagedObjectType.CONNECTION),pickingID);
if (!bAngularBrushingSelectPolyline) {
ISelectionDelta selectionDelta=contentSelectionManager.getDelta();
handleConnectedElementReps(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainType(dataDomain.getDataDomainType());
event.setSelectionDelta((SelectionDelta)selectionDelta);
event.setInfo(getShortInfoLocal());
eventPublisher.triggerEvent(event);
}
setDisplayListDirty();
break;
case X_AXIS_SELECTION:
break;
case Y_AXIS_SELECTION:
switch (pickingMode) {
case CLICKED:
selectionType=SelectionType.SELECTION;
break;
case MOUSE_OVER:
selectionType=SelectionType.MOUSE_OVER;
break;
case RIGHT_CLICKED:
selectionType=SelectionType.SELECTION;
if (!isRenderedRemote()) {
contextMenu.setLocation(pick.getPickedPoint(),getParentGLCanvas().getWidth(),getParentGLCanvas().getHeight());
contextMenu.setMasterGLView(this);
}
StorageContextMenuItemContainer experimentContextMenuItemContainer=new StorageContextMenuItemContainer();
experimentContextMenuItemContainer.setDataDomain(dataDomain);
experimentContextMenuItemContainer.setID(storageIDType,pickingID);
contextMenu.addItemContanier(experimentContextMenuItemContainer);
default :
return;
}
storageSelectionManager.clearSelection(selectionType);
storageSelectionManager.addToType(selectionType,pickingID);
storageSelectionManager.addConnectionID(generalManager.getIDManager().createID(EManagedObjectType.CONNECTION),pickingID);
connectedElementRepresentationManager.clear(storageSelectionManager.getIDType(),selectionType);
ISelectionDelta selectionDelta=storageSelectionManager.getDelta();
handleConnectedElementReps(selectionDelta);
SelectionUpdateEvent event=new SelectionUpdateEvent();
event.setSender(this);
event.setDataDomainType(dataDomain.getDataDomainType());
event.setSelectionDelta((SelectionDelta)selectionDelta);
eventPublisher.triggerEvent(event);
setDisplayListDirty();
break;
case GATE_TIP_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_TIP_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
draggedObject=EPickingType.GATE_TIP_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case GATE_BOTTOM_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_BOTTOM_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
draggedObject=EPickingType.GATE_BOTTOM_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case GATE_BODY_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
iDraggedGateNumber=pickingID;
draggedObject=EPickingType.GATE_BODY_SELECTION;
setDisplayListDirty();
break;
case CLICKED:
bIsDraggingActive=true;
bIsGateDraggingFirstTime=true;
draggedObject=EPickingType.GATE_BODY_SELECTION;
iDraggedGateNumber=pickingID;
break;
}
break;
case PC_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
break;
}
break;
case REMOVE_AXIS:
switch (pickingMode) {
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_DELETE;
iChangeDropOnAxisNumber=pickingID;
break;
case CLICKED:
if (storageVA.containsElement(storageVA.get(pickingID)) == 1) {
removeGate(storageVA.get(pickingID));
}
Integer storageID=storageVA.get(pickingID);
storageSelectionManager.remove(pickingID);
StorageVADelta vaDelta=new StorageVADelta(StorageVAType.STORAGE,storageIDType);
vaDelta.add(VADeltaItem.remove(pickingID));
triggerStorageFilterEvent(vaDelta,"String_Node_Str" + dataDomain.getStorageLabel(storageID));
setDisplayListDirty();
resetAxisSpacing();
break;
}
break;
case MOVE_AXIS:
switch (pickingMode) {
case CLICKED:
bWasAxisMoved=true;
bWasAxisDraggedFirstTime=true;
iMovedAxisPosition=pickingID;
setDisplayListDirty();
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_MOVE;
iChangeDropOnAxisNumber=pickingID;
setDisplayListDirty();
break;
}
break;
case DUPLICATE_AXIS:
switch (pickingMode) {
case MOUSE_OVER:
dropTexture=EIconTextures.DROP_DUPLICATE;
iChangeDropOnAxisNumber=pickingID;
break;
case CLICKED:
if (pickingID >= 0) {
StorageVADelta vaDelta=new StorageVADelta(StorageVAType.STORAGE,storageIDType);
vaDelta.add(VADeltaItem.copy(pickingID));
triggerStorageFilterEvent(vaDelta,"String_Node_Str" + dataDomain.getStorageLabel(storageVA.get(pickingID)));
setDisplayListDirty();
resetAxisSpacing();
break;
}
}
break;
case ADD_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
AGate gate;
if (set.isSetHomogeneous()) {
gate=new Gate(++iGateCounter,pickingID,(float)set.getRawForNormalized(0),(float)set.getRawForNormalized(0.5f),set,renderStyle);
}
 else {
gate=new NominalGate(++iGateCounter,pickingID,0,0.5f,set,renderStyle);
}
hashGates.put(this.iGateCounter,gate);
hashIsGateBlocking.put(this.iGateCounter,new ArrayList<Integer>());
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case ADD_MASTER_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
Gate gate=new Gate(++iGateCounter,-1,(float)set.getRawForNormalized(0),(float)set.getRawForNormalized(0.5f),set,renderStyle);
gate.setMasterGate(true);
hashMasterGates.put(iGateCounter,gate);
hashIsGateBlocking.put(iGateCounter,new ArrayList<Integer>());
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case REMOVE_GATE:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
if (hashGates.remove(pickingID) == null) hashMasterGates.remove(pickingID);
hashIsGateBlocking.remove(pickingID);
handleUnselection();
triggerSelectionUpdate();
setDisplayListDirty();
break;
}
break;
case ANGULAR_UPPER:
switch (pickingMode) {
case CLICKED:
bIsAngularDraggingActive=true;
case DRAGGED:
bIsAngularDraggingActive=true;
}
break;
case ANGULAR_LOWER:
switch (pickingMode) {
case CLICKED:
bIsAngularDraggingActive=true;
case DRAGGED:
bIsAngularDraggingActive=true;
}
break;
case REMOVE_NAN:
switch (pickingMode) {
case CLICKED:
hasFilterChanged=true;
if (hashExcludeNAN.containsKey(pickingID)) {
hashExcludeNAN.remove(pickingID);
}
 else {
hashExcludeNAN.put(pickingID,null);
}
setDisplayListDirty();
break;
}
break;
}
}