Program: 134285
Project: 134285
Buggy source:
public static IvBezierPath3D createSpiraledSphere(double radius,double spirals,double fontSize){
  ArrayList<IvBezierPoint3D> bezierPoints=new ArrayList<IvBezierPoint3D>();
  double centerYShift=-radius * 0.5;
  for (double height=0; height <= radius; height+=radius / spirals) {
    double height0=height;
    double height1=height + (radius / spirals) * 0.25;
    double height2=height + (radius / spirals) * 0.5;
    double height3=height + (radius / spirals) * 0.75;
    double distance0=MathHelper.cos((float)(height0 / radius - 0.5) * 3.1415926f);
    double distance1=MathHelper.cos((float)(height1 / radius - 0.5) * 3.1415926f);
    double distance2=MathHelper.cos((float)(height2 / radius - 0.5) * 3.1415926f);
    double distance3=MathHelper.cos((float)(height3 / radius - 0.5) * 3.1415926f);
    bezierPoints.add(new IvBezierPoint3D(new double[]{distance0,height0 + centerYShift,-distance0},new double[]{-0.5 * distance0,0.0,-0.5 * distance0},0xffffffff,0.0,fontSize));
    if (height1 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance1,height1 + centerYShift,-distance1},new double[]{-0.5 * distance1,0.0,0.5 * distance1},0xffffffff,0.0,fontSize));
    }
    if (height2 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance2,height2 + centerYShift,distance2},new double[]{0.5 * distance2,0.0,0.5 * distance2},0xffffffff,0.0,fontSize));
    }
    if (height3 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{distance3,height3 + centerYShift,distance3},new double[]{0.5 * distance3,0.0,-0.5 * distance3},0xffffffff,0.0,fontSize));
    }
  }
  return new IvBezierPath3D(bezierPoints);
}

Fixed version (ground truth):
public static IvBezierPath3D createSpiraledSphere(double radius,double spirals,double fontSize){
  ArrayList<IvBezierPoint3D> bezierPoints=new ArrayList<>();
  double centerYShift=-radius * 0.5;
  for (double height=0; height <= radius; height+=radius / spirals) {
    double height0=height;
    double height1=height + (radius / spirals) * 0.25;
    double height2=height + (radius / spirals) * 0.5;
    double height3=height + (radius / spirals) * 0.75;
    double distance0=MathHelper.cos((float)(height0 / radius - 0.5) * 3.1415926f);
    double distance1=MathHelper.cos((float)(height1 / radius - 0.5) * 3.1415926f);
    double distance2=MathHelper.cos((float)(height2 / radius - 0.5) * 3.1415926f);
    double distance3=MathHelper.cos((float)(height3 / radius - 0.5) * 3.1415926f);
    bezierPoints.add(new IvBezierPoint3D(new double[]{distance0,height0 + centerYShift,-distance0},new double[]{-0.5 * distance0,0.0,-0.5 * distance0},0xffffffff,0.0,fontSize));
    if (height1 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance1,height1 + centerYShift,-distance1},new double[]{-0.5 * distance1,0.0,0.5 * distance1},0xffffffff,0.0,fontSize));
    }
    if (height2 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{-distance2,height2 + centerYShift,distance2},new double[]{0.5 * distance2,0.0,0.5 * distance2},0xffffffff,0.0,fontSize));
    }
    if (height3 <= radius) {
      bezierPoints.add(new IvBezierPoint3D(new double[]{distance3,height3 + centerYShift,distance3},new double[]{0.5 * distance3,0.0,-0.5 * distance3},0xffffffff,0.0,fontSize));
    }
  }
  return new IvBezierPath3D(bezierPoints);
}