Program: 58471
Project: 58471
Buggy source:
private void renderOverviewRelations(GL gl){
  if (setsToCompare == null || setsToCompare.size() == 0)   return;
  float alpha=0.3f;
  ContentSelectionManager contentSelectionManager=useCase.getContentSelectionManager();
  ContentVirtualArray contentVALeft=setsToCompare.get(0).getContentVA(ContentVAType.CONTENT);
  for (  Integer contentID : contentVALeft) {
    for (    SelectionType type : contentSelectionManager.getSelectionTypes(contentID)) {
      float[] typeColor=type.getColor();
      typeColor[3]=alpha;
      gl.glColor4fv(typeColor,0);
      if (type == SelectionType.MOUSE_OVER || type == SelectionType.SELECTION) {
        gl.glLineWidth(5);
        break;
      }
 else {
        gl.glLineWidth(1);
      }
    }
    Vec2f leftPos=leftHeatMapWrapper.getLeftLinkPositionFromContentID(contentID);
    if (leftPos == null)     continue;
    Vec2f rightPos=rightHeatMapWrapper.getLeftLinkPositionFromContentID(contentID);
    if (rightPos == null)     continue;
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.POLYLINE_SELECTION,contentID));
    ArrayList<Vec3f> points=new ArrayList<Vec3f>();
    points.add(new Vec3f(leftPos.x() + heatMapLayoutLeft.getOverviewGroupWidth() + heatMapLayoutLeft.getOverviewHeatmapWidth()+ heatMapLayoutLeft.getOverviewSliderWidth(),viewFrustum.getHeight() - leftPos.y(),0));
    Tree<ClusterNode> tree;
    int nodeID;
    ClusterNode node;
    ArrayList<ClusterNode> pathToRoot;
    tree=setsToCompare.get(0).getContentTree();
    nodeID=tree.getNodeIDsFromLeafID(contentID).get(0);
    node=tree.getNodeByNumber(nodeID);
    pathToRoot=node.getParentPath(tree.getRoot());
    pathToRoot.remove(pathToRoot.size() - 1);
    for (    ClusterNode pathNode : pathToRoot) {
      Vec3f nodePos=pathNode.getPos();
      points.add(nodePos);
    }
    tree=setsToCompare.get(1).getContentTree();
    nodeID=tree.getNodeIDsFromLeafID(contentID).get(0);
    node=tree.getNodeByNumber(nodeID);
    pathToRoot=node.getParentPath(tree.getRoot());
    pathToRoot.remove(pathToRoot.size() - 1);
    for (    ClusterNode pathNode : pathToRoot) {
      Vec3f nodePos=pathNode.getPos();
      points.add(nodePos);
      break;
    }
    points.add(new Vec3f(rightPos.x(),viewFrustum.getHeight() - rightPos.y(),0));
    NURBSCurve curve=new NURBSCurve(points,30);
    points=curve.getCurvePoints();
    gl.glBegin(GL.GL_LINE_STRIP);
    for (int i=0; i < points.size(); i++)     gl.glVertex3f(points.get(i).x(),points.get(i).y(),0);
    gl.glEnd();
    gl.glPopName();
  }
}

Fixed version (ground truth):
private void renderOverviewRelations(GL gl){
  if (setsToCompare == null || setsToCompare.size() == 0)   return;
  float alpha=0.3f;
  ContentSelectionManager contentSelectionManager=useCase.getContentSelectionManager();
  ContentVirtualArray contentVALeft=setsToCompare.get(0).getContentVA(ContentVAType.CONTENT);
  for (  Integer contentID : contentVALeft) {
    for (    SelectionType type : contentSelectionManager.getSelectionTypes(contentID)) {
      float[] typeColor=type.getColor();
      typeColor[3]=alpha;
      gl.glColor4fv(typeColor,0);
      if (type == SelectionType.MOUSE_OVER || type == SelectionType.SELECTION) {
        gl.glLineWidth(5);
        break;
      }
 else {
        gl.glLineWidth(1);
      }
    }
    Vec2f leftPos=leftHeatMapWrapper.getRightOverviewLinkPositionFromContentID(contentID);
    if (leftPos == null)     continue;
    Vec2f rightPos=rightHeatMapWrapper.getLeftOverviewLinkPositionFromContentID(contentID);
    if (rightPos == null)     continue;
    gl.glPushName(pickingManager.getPickingID(iUniqueID,EPickingType.POLYLINE_SELECTION,contentID));
    ArrayList<Vec3f> points=new ArrayList<Vec3f>();
    points.add(new Vec3f(leftPos.x(),leftPos.y(),0));
    Tree<ClusterNode> tree;
    int nodeID;
    ClusterNode node;
    ArrayList<ClusterNode> pathToRoot;
    tree=setsToCompare.get(0).getContentTree();
    nodeID=tree.getNodeIDsFromLeafID(contentID).get(0);
    node=tree.getNodeByNumber(nodeID);
    pathToRoot=node.getParentPath(tree.getRoot());
    pathToRoot.remove(pathToRoot.size() - 1);
    for (    ClusterNode pathNode : pathToRoot) {
      Vec3f nodePos=pathNode.getPos();
      points.add(nodePos);
    }
    tree=setsToCompare.get(1).getContentTree();
    nodeID=tree.getNodeIDsFromLeafID(contentID).get(0);
    node=tree.getNodeByNumber(nodeID);
    pathToRoot=node.getParentPath(tree.getRoot());
    pathToRoot.remove(pathToRoot.size() - 1);
    for (    ClusterNode pathNode : pathToRoot) {
      Vec3f nodePos=pathNode.getPos();
      points.add(nodePos);
      break;
    }
    points.add(new Vec3f(rightPos.x(),rightPos.y(),0));
    NURBSCurve curve=new NURBSCurve(points,30);
    points=curve.getCurvePoints();
    gl.glBegin(GL.GL_LINE_STRIP);
    for (int i=0; i < points.size(); i++)     gl.glVertex3f(points.get(i).x(),points.get(i).y(),0);
    gl.glEnd();
    gl.glPopName();
  }
}