Program: 59122
Project: 59122
Buggy source:
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
switch (pickingType) {
case VIEW_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
      iMouseOverViewID=iExternalID;
    generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setDataAboutView(iExternalID);
  break;
case CLICKED:
generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setDataAboutView(iExternalID);
if (poolLayer.containsElement(iExternalID)) {
loadViewToUnderInteractionLayer(iExternalID);
}
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.VIEW_SELECTION);
break;
case BUCKET_LOCK_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_lock=iExternalID;
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_LOCK_ICON_SELECTION);
break;
case BUCKET_MOVE_IN_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
loadViewToUnderInteractionLayer(iExternalID);
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=iExternalID;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_IN_ICON_SELECTION);
break;
case BUCKET_MOVE_OUT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,poolLayer);
arSlerpActions.add(slerpActionTransition);
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=iExternalID;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_OUT_ICON_SELECTION);
break;
case BUCKET_MOVE_LEFT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
int iDestinationPosIndex=stackLayer.getPositionIndexByElementId(iExternalID);
if (iDestinationPosIndex == 3) iDestinationPosIndex=0;
 else iDestinationPosIndex++;
if (stackLayer.getElementIdByPositionIndex(iDestinationPosIndex) == -1) {
SlerpAction slerpAction=new SlerpAction(iExternalID,stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(-1));
arSlerpActions.add(slerpAction);
}
 else {
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,transitionLayer);
arSlerpActions.add(slerpActionTransition);
SlerpAction slerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(iDestinationPosIndex),stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(iExternalID));
arSlerpActions.add(slerpAction);
SlerpAction slerpActionTransitionReverse=new SlerpAction(iExternalID,transitionLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpActionTransitionReverse);
}
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=iExternalID;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_LEFT_ICON_SELECTION);
break;
case BUCKET_MOVE_RIGHT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
int iDestinationPosIndex=stackLayer.getPositionIndexByElementId(iExternalID);
if (iDestinationPosIndex == 0) iDestinationPosIndex=3;
 else iDestinationPosIndex--;
if (stackLayer.getElementIdByPositionIndex(iDestinationPosIndex) == -1) {
SlerpAction slerpAction=new SlerpAction(iExternalID,stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(-1));
arSlerpActions.add(slerpAction);
}
 else {
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,transitionLayer);
arSlerpActions.add(slerpActionTransition);
SlerpAction slerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(iDestinationPosIndex),stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(iExternalID));
arSlerpActions.add(slerpAction);
SlerpAction slerpActionTransitionReverse=new SlerpAction(iExternalID,transitionLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpActionTransitionReverse);
}
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=iExternalID;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
break;
}
}

Fixed version (ground truth):
protected void handleEvents(EPickingType pickingType,EPickingMode pickingMode,int iExternalID,Pick pick){
switch (pickingType) {
case VIEW_SELECTION:
switch (pickingMode) {
case MOUSE_OVER:
      iMouseOverViewID=iExternalID;
    generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setDataAboutView(iExternalID);
  break;
case CLICKED:
generalManager.getSingelton().getViewGLCanvasManager().getInfoAreaManager().setDataAboutView(iExternalID);
if (poolLayer.containsElement(iExternalID)) {
loadViewToUnderInteractionLayer(iExternalID);
}
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.VIEW_SELECTION);
break;
case BUCKET_LOCK_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_lock=iExternalID;
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_LOCK_ICON_SELECTION);
break;
case BUCKET_MOVE_IN_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
loadViewToUnderInteractionLayer(iExternalID);
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=iExternalID;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_IN_ICON_SELECTION);
break;
case BUCKET_MOVE_OUT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,poolLayer);
arSlerpActions.add(slerpActionTransition);
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=iExternalID;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_OUT_ICON_SELECTION);
break;
case BUCKET_MOVE_LEFT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
int iDestinationPosIndex=stackLayer.getPositionIndexByElementId(iExternalID);
if (iDestinationPosIndex == 3) iDestinationPosIndex=0;
 else iDestinationPosIndex++;
if (stackLayer.getElementIdByPositionIndex(iDestinationPosIndex) == -1) {
SlerpAction slerpAction=new SlerpAction(iExternalID,stackLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpAction);
}
 else {
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,transitionLayer);
arSlerpActions.add(slerpActionTransition);
SlerpAction slerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(iDestinationPosIndex),stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(iExternalID));
arSlerpActions.add(slerpAction);
SlerpAction slerpActionTransitionReverse=new SlerpAction(iExternalID,transitionLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpActionTransitionReverse);
}
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=iExternalID;
iNavigationMouseOverViewID_right=-1;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_LEFT_ICON_SELECTION);
break;
case BUCKET_MOVE_RIGHT_ICON_SELECTION:
switch (pickingMode) {
case CLICKED:
if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE) break;
arSlerpActions.clear();
glConnectionLineRenderer.enableRendering(false);
int iDestinationPosIndex=stackLayer.getPositionIndexByElementId(iExternalID);
if (iDestinationPosIndex == 0) iDestinationPosIndex=3;
 else iDestinationPosIndex--;
if (stackLayer.getElementIdByPositionIndex(iDestinationPosIndex) == -1) {
SlerpAction slerpAction=new SlerpAction(iExternalID,stackLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpAction);
}
 else {
SlerpAction slerpActionTransition=new SlerpAction(iExternalID,stackLayer,transitionLayer);
arSlerpActions.add(slerpActionTransition);
SlerpAction slerpAction=new SlerpAction(stackLayer.getElementIdByPositionIndex(iDestinationPosIndex),stackLayer,stackLayer,stackLayer.getPositionIndexByElementId(iExternalID));
arSlerpActions.add(slerpAction);
SlerpAction slerpActionTransitionReverse=new SlerpAction(iExternalID,transitionLayer,stackLayer,iDestinationPosIndex);
arSlerpActions.add(slerpActionTransitionReverse);
}
bEnableNavigationOverlay=false;
break;
case MOUSE_OVER:
iNavigationMouseOverViewID_left=-1;
iNavigationMouseOverViewID_right=iExternalID;
iNavigationMouseOverViewID_out=-1;
iNavigationMouseOverViewID_in=-1;
iNavigationMouseOverViewID_lock=-1;
break;
}
pickingManager.flushHits(iUniqueId,EPickingType.BUCKET_MOVE_RIGHT_ICON_SELECTION);
break;
}
}