Program: 30102
Project: 30102
Buggy source:
/** 
 * Find the two, one or zero points that is at the intersection of the three sphere shells. If the three spheres intersect in more than two points or one sphere contains another, the result of this method not specified.
 * @hops 57-70
 */
public static Point[] getIntersections(Sphere s1,Sphere s2,Sphere s3){
  double x1=s1.center.x();
  double y1=s1.center.y();
  double z1=s1.center.z();
  double c1Sq=s1.center.dot(s1.center);
  double c2Sq=s2.center.dot(s2.center);
  double r1=s1.radius, r1Sq=r1 * r1;
  Vector v12=s2.center.vectorTo(s1.center);
  Vector v23=s3.center.vectorTo(s2.center);
  double c12=c1Sq - c2Sq;
  double c23=c2Sq - s3.center.dot(s3.center);
  double r2Sq=s2.radius * s2.radius;
  double r12=r2Sq - r1Sq + c12;
  double r23=s3.radius * s3.radius - r2Sq + c23;
  double Dyz=v12.y() * v23.z() - v23.y() * v12.z(), DyzSq=Dyz * Dyz;
  double Dry=r12 * v23.y() - r23 * v12.y(), DrySq=Dry * Dry;
  double Dzx=v12.z() * v23.x() - v23.z() * v12.x(), DzxSq=Dzx * Dzx;
  double Dxr=v12.x() * r23 - v23.x() * r12, DxrSq=Dxr * Dxr;
  double Dxy=v12.x() * v23.y() - v23.x() * v12.y(), DxySq=Dxy * Dxy;
  double k2=(DyzSq + DzxSq) / DxySq + 1;
  double k1=(Dyz * Dry + Dzx * Dxr) / DxySq - 4 * (x1 * Dyz + y1 * Dzx) / Dxy - z1;
  double k0=(DrySq + DxrSq) / (4 * DxySq) + c1Sq - r1Sq - 2 * (x1 * Dry + y1 * Dxr) / Dxy;
  double d=k1 * k1 - 4 * k2 * k0;
  if (d < -WB_Epsilon.EPSILON)   return new Point[]{};
  if (d < WB_Epsilon.EPSILON) {
    double zi=-k1 / (2 * k2);
    return new Point[]{new Point((2 * zi * Dyz + Dry) / (2 * Dxy),(2 * zi * Dzx + Dxr) / (2 * Dxy),zi)};
  }
  double dRt=Math.sqrt(d);
  double zi0=(-k1 - dRt) / (2 * k2);
  double zi1=(-k1 + dRt) / (2 * k2);
  return new Point[]{new Point((2 * zi0 * Dyz + Dry) / (2 * Dxy),(2 * zi0 * Dzx + Dxr) / (2 * Dxy),zi0),new Point((2 * zi1 * Dyz + Dry) / (2 * Dxy),(2 * zi1 * Dzx + Dxr) / (2 * Dxy),zi1)};
}

Fixed version (ground truth):
/** 
 * Find the two, one or zero points that is at the intersection of the three sphere shells. If the three spheres intersect in more than two points or one sphere contains another, the result of this method not specified.
 */
public static Point[] getIntersections(Sphere s1,Sphere s2,Sphere s3){
  double x1=s1.center.x();
  double y1=s1.center.y();
  double z1=s1.center.z();
  double c1Sq=s1.center.dot(s1.center);
  double c2Sq=s2.center.dot(s2.center);
  double r1=s1.radius, r1Sq=r1 * r1;
  Vector v12=s2.center.vectorTo(s1.center);
  Vector v23=s3.center.vectorTo(s2.center);
  double c12=c1Sq - c2Sq;
  double c23=c2Sq - s3.center.dot(s3.center);
  double r2Sq=s2.radius * s2.radius;
  double r12=r2Sq - r1Sq + c12;
  double r23=s3.radius * s3.radius - r2Sq + c23;
  double Dyz=v12.y() * v23.z() - v23.y() * v12.z(), DyzSq=Dyz * Dyz;
  double Dry=r12 * v23.y() - r23 * v12.y(), DrySq=Dry * Dry;
  double Dzx=v12.z() * v23.x() - v23.z() * v12.x(), DzxSq=Dzx * Dzx;
  double Dxr=v12.x() * r23 - v23.x() * r12, DxrSq=Dxr * Dxr;
  double Dxy=v12.x() * v23.y() - v23.x() * v12.y(), DxySq=Dxy * Dxy;
  double k2=(DyzSq + DzxSq) / DxySq + 1;
  double k1=(Dyz * Dry + Dzx * Dxr) / DxySq - 4 * (x1 * Dyz + y1 * Dzx) / Dxy - z1;
  double k0=(DrySq + DxrSq) / (4 * DxySq) + c1Sq - r1Sq - 2 * (x1 * Dry + y1 * Dxr) / Dxy;
  double d=k1 * k1 - 4 * k2 * k0;
  if (d < -WB_Epsilon.EPSILON)   return new Point[]{};
  if (d < WB_Epsilon.EPSILON) {
    double zi=-k1 / (2 * k2);
    return new Point[]{new Point((2 * zi * Dyz + Dry) / (2 * Dxy),(2 * zi * Dzx + Dxr) / (2 * Dxy),zi)};
  }
  double dRt=Math.sqrt(d);
  double zi0=(-k1 - dRt) / (2 * k2);
  double zi1=(-k1 + dRt) / (2 * k2);
  return new Point[]{new Point((2 * zi0 * Dyz + Dry) / (2 * Dxy),(2 * zi0 * Dzx + Dxr) / (2 * Dxy),zi0),new Point((2 * zi1 * Dyz + Dry) / (2 * Dxy),(2 * zi1 * Dzx + Dxr) / (2 * Dxy),zi1)};
}