Program: 57207
Project: 57207
Buggy source:
/** 
 * Split the instance in two parts by an arc.
 * @param arc splitting arc
 * @return an object containing both the part of the instanceon the plus side of the arc and the part of the instance on the minus side of the arc
 */
public Split split(final Arc arc){
  final BSPTree<Sphere1D> minus=new BSPTree<Sphere1D>();
  minus.setAttribute(Boolean.FALSE);
  boolean minusIgnored=false;
  final BSPTree<Sphere1D> plus=new BSPTree<Sphere1D>();
  plus.setAttribute(Boolean.FALSE);
  boolean plusIgnored=false;
  final double reference=FastMath.PI + arc.getInf();
  final double arcLength=arc.getSup() - arc.getInf();
  for (  final double[] a : this) {
    final double syncedStart=MathUtils.normalizeAngle(a[0],reference) - arc.getInf();
    final double arcOffset=a[0] - syncedStart;
    final double syncedEnd=a[1] - arcOffset;
    if (syncedStart < arcLength) {
      minusIgnored=addArcStart(minus,a[0],minusIgnored);
      if (syncedEnd > arcLength) {
        final double minusToPlus=arcLength + arcOffset;
        minusIgnored=addArcEnd(minus,minusToPlus,minusIgnored);
        plusIgnored=addArcStart(plus,minusToPlus,plusIgnored);
        if (syncedEnd > MathUtils.TWO_PI) {
          final double plusToMinus=MathUtils.TWO_PI + arcOffset;
          plusIgnored=addArcEnd(plus,plusToMinus,plusIgnored);
          minusIgnored=addArcStart(minus,plusToMinus,minusIgnored);
          minusIgnored=addArcEnd(minus,a[1],minusIgnored);
        }
 else {
          plusIgnored=addArcEnd(plus,a[1],plusIgnored);
        }
      }
 else {
        minusIgnored=addArcEnd(minus,a[1],minusIgnored);
      }
    }
 else {
      plusIgnored=addArcStart(plus,a[0],plusIgnored);
      if (syncedEnd > MathUtils.TWO_PI) {
        final double plusToMinus=MathUtils.TWO_PI + arcOffset;
        plusIgnored=addArcEnd(plus,plusToMinus,plusIgnored);
        minusIgnored=addArcStart(minus,plusToMinus,minusIgnored);
        if (syncedEnd > MathUtils.TWO_PI + arcLength) {
          final double minusToPlus=MathUtils.TWO_PI + arcLength + arcOffset;
          minusIgnored=addArcEnd(minus,minusToPlus,minusIgnored);
          plusIgnored=addArcStart(plus,minusToPlus,plusIgnored);
          plusIgnored=addArcEnd(plus,a[1],plusIgnored);
        }
 else {
          minusIgnored=addArcEnd(minus,a[1],minusIgnored);
        }
      }
 else {
        plusIgnored=addArcEnd(plus,a[1],plusIgnored);
      }
    }
  }
  return new Split(createSplitPart(plus,plusIgnored),createSplitPart(minus,minusIgnored));
}

Fixed version (ground truth):
/** 
 * Split the instance in two parts by an arc.
 * @param arc splitting arc
 * @return an object containing both the part of the instanceon the plus side of the arc and the part of the instance on the minus side of the arc
 */
public Split split(final Arc arc){
  final BSPTree<Sphere1D> minus=new BSPTree<Sphere1D>();
  minus.setAttribute(Boolean.FALSE);
  final BSPTree<Sphere1D> plus=new BSPTree<Sphere1D>();
  plus.setAttribute(Boolean.FALSE);
  final double reference=FastMath.PI + arc.getInf();
  final double arcLength=arc.getSup() - arc.getInf();
  for (  final double[] a : this) {
    final double syncedStart=MathUtils.normalizeAngle(a[0],reference) - arc.getInf();
    final double arcOffset=a[0] - syncedStart;
    final double syncedEnd=a[1] - arcOffset;
    if (syncedStart < arcLength) {
      addArcLimit(minus,a[0],true);
      if (syncedEnd > arcLength) {
        final double minusToPlus=arcLength + arcOffset;
        addArcLimit(minus,minusToPlus,false);
        addArcLimit(plus,minusToPlus,true);
        if (syncedEnd > MathUtils.TWO_PI) {
          final double plusToMinus=MathUtils.TWO_PI + arcOffset;
          addArcLimit(plus,plusToMinus,false);
          addArcLimit(minus,plusToMinus,true);
          addArcLimit(minus,a[1],false);
        }
 else {
          addArcLimit(plus,a[1],false);
        }
      }
 else {
        addArcLimit(minus,a[1],false);
      }
    }
 else {
      addArcLimit(plus,a[0],true);
      if (syncedEnd > MathUtils.TWO_PI) {
        final double plusToMinus=MathUtils.TWO_PI + arcOffset;
        addArcLimit(plus,plusToMinus,false);
        addArcLimit(minus,plusToMinus,true);
        if (syncedEnd > MathUtils.TWO_PI + arcLength) {
          final double minusToPlus=MathUtils.TWO_PI + arcLength + arcOffset;
          addArcLimit(minus,minusToPlus,false);
          addArcLimit(plus,minusToPlus,true);
          addArcLimit(plus,a[1],false);
        }
 else {
          addArcLimit(minus,a[1],false);
        }
      }
 else {
        addArcLimit(plus,a[1],false);
      }
    }
  }
  return new Split(createSplitPart(plus),createSplitPart(minus));
}