Program: 134286
Project: 134286
Buggy source:
public static IvBezierPath3D createSpiraledBezierPath(double distCenter,double heightDistInf,double spirals,double[] endPos,double fontSize,double heightFontInf,boolean staged){
  ArrayList<IvBezierPoint3D> bezierPoints=new ArrayList<IvBezierPoint3D>();
  for (double height=0; height <= endPos[1]; height+=endPos[1] / spirals) {
    double height0=height;
    double height1=height + (endPos[1] / spirals) * 0.25;
    double height2=height + (endPos[1] / spirals) * 0.5;
    double height3=height + (endPos[1] / spirals) * 0.75;
    double x0=height0 / endPos[1] * endPos[0];
    double x1=height1 / endPos[1] * endPos[0];
    double x2=height2 / endPos[1] * endPos[0];
    double x3=height3 / endPos[1] * endPos[0];
    double z0=height0 / endPos[1] * endPos[2];
    double z1=height1 / endPos[1] * endPos[2];
    double z2=height2 / endPos[1] * endPos[2];
    double z3=height3 / endPos[1] * endPos[2];
    double distance0=distCenter * (1.0 + (staged ? height : height0) * heightDistInf);
    double distance1=distCenter * (1.0 + (staged ? height : height1) * heightDistInf);
    double distance2=distCenter * (1.0 + (staged ? height : height2) * heightDistInf);
    double distance3=distCenter * (1.0 + (staged ? height : height3) * heightDistInf);
    bezierPoints.add(new IvBezierPoint3D(new double[]{distance0 + x0,height0,-distance0 + z0},new double[]{-0.5 * distance0,0.0,-0.5 * distance0},0xffffffff,0.0,fontSize + height0 / endPos[1] * heightFontInf));
    if (height1 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance1 + x1,height1,-distance1 + z1},new double[]{-0.5 * distance1,0.0,0.5 * distance1},0xffffffff,0.0,fontSize + height1 / endPos[1] * heightFontInf));
    }
    if (height2 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance2 + x2,height2,distance2 + z2},new double[]{0.5 * distance2,0.0,0.5 * distance2},0xffffffff,0.0,fontSize + height2 / endPos[1] * heightFontInf));
    }
    if (height3 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{distance3 + x3,height3,distance3 + z3},new double[]{0.5 * distance3,0.0,-0.5 * distance3},0xffffffff,0.0,fontSize + height3 / endPos[1] * heightFontInf));
    }
  }
  return new IvBezierPath3D(bezierPoints);
}

Fixed version (ground truth):
public static IvBezierPath3D createSpiraledBezierPath(double distCenter,double heightDistInf,double spirals,double[] endPos,double fontSize,double heightFontInf,boolean staged){
  ArrayList<IvBezierPoint3D> bezierPoints=new ArrayList<>();
  for (double height=0; height <= endPos[1]; height+=endPos[1] / spirals) {
    double height0=height;
    double height1=height + (endPos[1] / spirals) * 0.25;
    double height2=height + (endPos[1] / spirals) * 0.5;
    double height3=height + (endPos[1] / spirals) * 0.75;
    double x0=height0 / endPos[1] * endPos[0];
    double x1=height1 / endPos[1] * endPos[0];
    double x2=height2 / endPos[1] * endPos[0];
    double x3=height3 / endPos[1] * endPos[0];
    double z0=height0 / endPos[1] * endPos[2];
    double z1=height1 / endPos[1] * endPos[2];
    double z2=height2 / endPos[1] * endPos[2];
    double z3=height3 / endPos[1] * endPos[2];
    double distance0=distCenter * (1.0 + (staged ? height : height0) * heightDistInf);
    double distance1=distCenter * (1.0 + (staged ? height : height1) * heightDistInf);
    double distance2=distCenter * (1.0 + (staged ? height : height2) * heightDistInf);
    double distance3=distCenter * (1.0 + (staged ? height : height3) * heightDistInf);
    bezierPoints.add(new IvBezierPoint3D(new double[]{distance0 + x0,height0,-distance0 + z0},new double[]{-0.5 * distance0,0.0,-0.5 * distance0},0xffffffff,0.0,fontSize + height0 / endPos[1] * heightFontInf));
    if (height1 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance1 + x1,height1,-distance1 + z1},new double[]{-0.5 * distance1,0.0,0.5 * distance1},0xffffffff,0.0,fontSize + height1 / endPos[1] * heightFontInf));
    }
    if (height2 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance2 + x2,height2,distance2 + z2},new double[]{0.5 * distance2,0.0,0.5 * distance2},0xffffffff,0.0,fontSize + height2 / endPos[1] * heightFontInf));
    }
    if (height3 <= endPos[1]) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{distance3 + x3,height3,distance3 + z3},new double[]{0.5 * distance3,0.0,-0.5 * distance3},0xffffffff,0.0,fontSize + height3 / endPos[1] * heightFontInf));
    }
  }
  return new IvBezierPath3D(bezierPoints);
}