Program: 58325
Project: 58325
Buggy source:
@Override public void display(GL gl){
  doSlerpActions();
  canvasWidth=viewFrustum.getWidth();
  canvasHeight=viewFrustum.getHeight();
  gl.glGetIntegerv(GL.GL_VIEWPORT,viewport,0);
  pixelDimensions[0]=viewport[2];
  pixelDimensions[1]=viewport[3];
  if (layoutHotSpotInitSwitch == false) {
    layoutHotSpot[0]=canvasWidth / 2;
    layoutHotSpot[1]=canvasHeight / 2;
    layoutHotSpotInitSwitch=true;
  }
  defaultLayoutHotSpot[0]=canvasWidth / 2;
  defaultLayoutHotSpot[1]=canvasHeight / 2;
  Transform heatmapTransform=new Transform();
  heatmapTransform.setTranslation(new Vec3f((float)layoutHotSpot[0],(float)layoutHotSpot[1],0));
  heatmapTransform.setScale(new Vec3f((float)(canvasWidth - layoutHotSpot[0]) / canvasWidth,(float)(canvasHeight - layoutHotSpot[1]) / canvasHeight,1));
  remoteElementHeatMap.setTransform(heatmapTransform);
  Transform hyperbolicTransform=new Transform();
  hyperbolicTransform.setScale(new Vec3f(layoutHotSpot[0] / canvasWidth,1 * fAspectRatio,1));
  hyperbolicTransform.setTranslation(new Vec3f(0,0,0));
  remoteElementHyperbolic.setTransform(hyperbolicTransform);
  Transform parCoordsTransform=new Transform();
  parCoordsTransform.setTranslation(new Vec3f((float)layoutHotSpot[0],(float)0,0));
  parCoordsTransform.setScale(new Vec3f((float)(canvasWidth - layoutHotSpot[0]) / 8,(float)layoutHotSpot[1] / 8,1));
  remoteElementParCoords.setTransform(parCoordsTransform);
  renderRemoteLevelElement(gl,remoteElementHyperbolic);
  renderRemoteLevelElement(gl,remoteElementHeatMap);
  renderRemoteLevelElement(gl,remoteElementParCoords);
  if (selectedInput == inputType.EYETRACKER_SIMULATED) {
    int[] mousePositionInt=new int[2];
    mousePositionInt[0]=this.glMouseListener.mousePositionForEyeTracker[0];
    mousePositionInt[1]=this.glMouseListener.mousePositionForEyeTracker[1];
    this.eyeTracker.setRawEyeTrackerPosition(mousePositionInt);
    eyeTracker.cutWindowOffset(upperLeftScreenPos.x,upperLeftScreenPos.y);
    eyeTracker.checkForFixedCoordinate();
  }
  if (selectedInput == inputType.EYETRACKER_ONLY) {
    eyeTracker.receiveData();
    System.out.println(upperLeftScreenPos.x);
    eyeTracker.cutWindowOffset(upperLeftScreenPos.x,upperLeftScreenPos.y);
    eyeTracker.checkForFixedCoordinate();
  }
  if (selectedInput == inputType.EYETRACKER_ONLY || selectedInput == inputType.EYETRACKER_SIMULATED) {
    if (eyeTracker.getFixedCoordinate() != null) {
      if (eyeTracker.getFixedCoordinate()[0] != 0) {
        if (eyeTracker.getFixedCoordinate()[0] < (pixelDimensions[0] * (layoutHotSpot[0] / canvasWidth))) {
          this.focusViewEvent(remoteViewType.HYPERBOLIC);
        }
 else {
          if ((pixelDimensions[1] - eyeTracker.getFixedCoordinate()[1]) < (pixelDimensions[1] * (layoutHotSpot[1] / canvasHeight))) {
            this.focusViewEvent(remoteViewType.PARCOORDS);
          }
 else {
            this.focusViewEvent(remoteViewType.HEATMAP);
          }
        }
      }
    }
    this.evaluateUserSelection();
  }
  contextMenu.render(gl,this);
}

Fixed version (ground truth):
@Override public void display(GL gl){
  doSlerpActions();
  canvasWidth=viewFrustum.getWidth();
  canvasHeight=viewFrustum.getHeight();
  gl.glGetIntegerv(GL.GL_VIEWPORT,viewport,0);
  pixelDimensions[0]=viewport[2];
  pixelDimensions[1]=viewport[3];
  if (layoutHotSpotInitSwitch == false) {
    layoutHotSpot[0]=canvasWidth / 2;
    layoutHotSpot[1]=canvasHeight / 2;
    layoutHotSpotInitSwitch=true;
  }
  defaultLayoutHotSpot[0]=canvasWidth / 2;
  defaultLayoutHotSpot[1]=canvasHeight / 2;
  Transform heatmapTransform=new Transform();
  heatmapTransform.setTranslation(new Vec3f((float)layoutHotSpot[0],(float)layoutHotSpot[1],0));
  heatmapTransform.setScale(new Vec3f((float)(canvasWidth - layoutHotSpot[0]) / canvasWidth,(float)(canvasHeight - layoutHotSpot[1]) / canvasHeight,1));
  remoteElementHeatMap.setTransform(heatmapTransform);
  Transform hyperbolicTransform=new Transform();
  hyperbolicTransform.setScale(new Vec3f(layoutHotSpot[0] / canvasWidth,1 * fAspectRatio,1));
  hyperbolicTransform.setTranslation(new Vec3f(0,0,0));
  remoteElementHyperbolic.setTransform(hyperbolicTransform);
  Transform parCoordsTransform=new Transform();
  parCoordsTransform.setTranslation(new Vec3f((float)layoutHotSpot[0],(float)0,0));
  parCoordsTransform.setScale(new Vec3f((float)(canvasWidth - layoutHotSpot[0]) / 8,(float)layoutHotSpot[1] / 8,1));
  remoteElementParCoords.setTransform(parCoordsTransform);
  renderRemoteLevelElement(gl,remoteElementHyperbolic);
  renderRemoteLevelElement(gl,remoteElementHeatMap);
  renderRemoteLevelElement(gl,remoteElementParCoords);
  if (selectedInput == inputType.EYETRACKER_SIMULATED) {
    int[] mousePositionInt=new int[2];
    mousePositionInt[0]=this.glMouseListener.mousePositionForEyeTracker[0];
    mousePositionInt[1]=this.glMouseListener.mousePositionForEyeTracker[1];
    this.eyeTracker.setRawEyeTrackerPosition(mousePositionInt);
    eyeTracker.cutWindowOffset(upperLeftScreenPos.x,upperLeftScreenPos.y);
    eyeTracker.checkForFixedCoordinate();
  }
  if (selectedInput == inputType.EYETRACKER_ONLY) {
    eyeTracker.receiveData();
    eyeTracker.cutWindowOffset(upperLeftScreenPos.x,upperLeftScreenPos.y);
    eyeTracker.checkForFixedCoordinate();
  }
  if (selectedInput == inputType.EYETRACKER_ONLY || selectedInput == inputType.EYETRACKER_SIMULATED) {
    if (eyeTracker.getFixedCoordinate() != null) {
      if (eyeTracker.getFixedCoordinate()[0] != 0) {
        if (eyeTracker.getFixedCoordinate()[0] < (pixelDimensions[0] * (layoutHotSpot[0] / canvasWidth))) {
          this.focusViewEvent(remoteViewType.HYPERBOLIC);
        }
 else {
          if ((pixelDimensions[1] - eyeTracker.getFixedCoordinate()[1]) < (pixelDimensions[1] * (layoutHotSpot[1] / canvasHeight))) {
            this.focusViewEvent(remoteViewType.PARCOORDS);
          }
 else {
            this.focusViewEvent(remoteViewType.HEATMAP);
          }
        }
      }
    }
    this.evaluateUserSelection();
  }
  contextMenu.render(gl,this);
}