Program: 58966
Project: 58966
Buggy source:
/** 
 * Renders the gates and updates their values
 * @param gl
 */
private void handleGateDragging(GL gl){
  Point currentPoint=pickingTriggerMouseAdapter.getPickedPoint();
  float[] fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float height=fArTargetWorldCoordinates[1];
  Pair<Float,Float> gate=hashGates.get(iDraggedGateNumber).get(0);
  float fTop=gate.getSecond();
  float fBottom=gate.getFirst();
  if (bIsGateDraggingFirstTime) {
    fGateTopSpacing=fTop - height;
    fGateBottomSpacing=height - fBottom;
    bIsGateDraggingFirstTime=false;
  }
  float fTipUpperLimit=renderStyle.getAxisHeight();
  float fTipLowerLimit=fBottom + 2 * renderStyle.getGateTipHeight();
  float fBottomLowerLimit=renderStyle.getGateMinimumValue() - renderStyle.getGateTipHeight();
  float fBottomUpperLimit=fTop - 2 * renderStyle.getGateTipHeight();
  if (draggedObject == EPickingType.LOWER_GATE_TIP_SELECTION) {
    gate.setSecond(height);
  }
 else   if (draggedObject == EPickingType.LOWER_GATE_BOTTOM_SELECTION) {
    gate.setFirst(height);
  }
 else   if (draggedObject == EPickingType.LOWER_GATE_BODY_SELECTION) {
    gate.setSecond(height + fGateTopSpacing);
    gate.setFirst(height - fGateBottomSpacing);
  }
  if (fTop > fTipUpperLimit)   gate.setSecond(fTipUpperLimit);
  if (fTop < fTipLowerLimit)   gate.setSecond(fTipLowerLimit);
  if (fBottom > fBottomUpperLimit)   gate.setFirst(fBottomUpperLimit);
  if (fBottom < fBottomLowerLimit)   gate.setFirst(fBottomLowerLimit);
  bIsDisplayListDirtyLocal=true;
  bIsDisplayListDirtyRemote=true;
  if (pickingTriggerMouseAdapter.wasMouseReleased()) {
    bIsDraggingActive=false;
  }
}

Fixed version (ground truth):
/** 
 * Renders the gates and updates their values
 * @param gl
 */
private void handleGateDragging(GL gl){
  Point currentPoint=pickingTriggerMouseAdapter.getPickedPoint();
  float[] fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  float height=fArTargetWorldCoordinates[1];
  Pair<Float,Float> gate=hashGates.get(iDraggedGateNumber).get(0);
  float fTop=gate.getSecond();
  float fBottom=gate.getFirst();
  if (bIsGateDraggingFirstTime) {
    fGateTopSpacing=fTop - height;
    fGateBottomSpacing=height - fBottom;
    bIsGateDraggingFirstTime=false;
  }
  float fTipUpperLimit=renderStyle.getAxisHeight();
  float fTipLowerLimit=fBottom + 2 * renderStyle.getGateTipHeight();
  float fBottomLowerLimit=renderStyle.getGateMinimumValue() - renderStyle.getGateTipHeight();
  float fBottomUpperLimit=fTop - 2 * renderStyle.getGateTipHeight();
  if (draggedObject == EPickingType.LOWER_GATE_TIP_SELECTION) {
    gate.setSecond(height);
  }
 else   if (draggedObject == EPickingType.LOWER_GATE_BOTTOM_SELECTION) {
    gate.setFirst(height);
  }
 else   if (draggedObject == EPickingType.LOWER_GATE_BODY_SELECTION) {
    gate.setSecond(height + fGateTopSpacing);
    gate.setFirst(height - fGateBottomSpacing);
  }
  if (fTop > fTipUpperLimit)   gate.setSecond(fTipUpperLimit);
  if (fTop < fTipLowerLimit)   gate.setSecond(fTipLowerLimit);
  if (fBottom > fBottomUpperLimit)   gate.setFirst(fBottomUpperLimit);
  if (fBottom < fBottomLowerLimit)   gate.setFirst(fBottomLowerLimit);
  bIsDisplayListDirtyLocal=true;
  bIsDisplayListDirtyRemote=true;
  if (pickingTriggerMouseAdapter.wasMouseReleased()) {
    bIsDraggingActive=false;
    System.out.println("String_Node_Str");
  }
}