Program: 58469
Project: 58469
Buggy source:
private void renderDetailRelations(GL gl){
  if (setsToCompare == null || setsToCompare.size() == 0)   return;
  float alpha=0.3f;
  ContentSelectionManager contentSelectionManager=useCase.getContentSelectionManager();
  gl.glColor3f(0,1,0);
  for (  ContentVirtualArray contentVA : leftHeatMapWrapper.getContentVAsOfHeatMaps()) {
    for (    Integer contentID : contentVA) {
      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.getRightLinkPositionFromContentID(contentID,contentVA);
      if (leftPos == null)       continue;
      Vec2f rightPos=null;
      for (      ContentVirtualArray rightVA : rightHeatMapWrapper.getContentVAsOfHeatMaps()) {
        rightPos=rightHeatMapWrapper.getRightLinkPositionFromContentID(contentID,rightVA);
        if (rightPos != null)         break;
      }
      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(),viewFrustum.getHeight() - leftPos.y(),0));
      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 renderDetailRelations(GL gl){
  if (setsToCompare == null || setsToCompare.size() == 0)   return;
  float alpha=0.3f;
  ContentSelectionManager contentSelectionManager=useCase.getContentSelectionManager();
  gl.glColor3f(0,1,0);
  for (  ContentVirtualArray contentVA : leftHeatMapWrapper.getContentVAsOfHeatMaps()) {
    for (    Integer contentID : contentVA) {
      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.getRightDetailLinkPositionFromContentID(contentID);
      if (leftPos == null)       continue;
      Vec2f rightPos=null;
      for (      ContentVirtualArray rightVA : rightHeatMapWrapper.getContentVAsOfHeatMaps()) {
        rightPos=rightHeatMapWrapper.getLeftDetailLinkPositionFromContentID(contentID);
        if (rightPos != null)         break;
      }
      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));
      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();
    }
  }
}