Program: 57198
Project: 57198
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);
  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));
}

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 List<Double> minus=new ArrayList<Double>();
  final List<Double> plus=new ArrayList<Double>();
  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) {
      minus.add(a[0]);
      if (syncedEnd > arcLength) {
        final double minusToPlus=arcLength + arcOffset;
        minus.add(minusToPlus);
        plus.add(minusToPlus);
        if (syncedEnd > MathUtils.TWO_PI) {
          final double plusToMinus=MathUtils.TWO_PI + arcOffset;
          plus.add(plusToMinus);
          minus.add(plusToMinus);
          minus.add(a[1]);
        }
 else {
          plus.add(a[1]);
        }
      }
 else {
        minus.add(a[1]);
      }
    }
 else {
      plus.add(a[0]);
      if (syncedEnd > MathUtils.TWO_PI) {
        final double plusToMinus=MathUtils.TWO_PI + arcOffset;
        plus.add(plusToMinus);
        minus.add(plusToMinus);
        if (syncedEnd > MathUtils.TWO_PI + arcLength) {
          final double minusToPlus=MathUtils.TWO_PI + arcLength + arcOffset;
          minus.add(minusToPlus);
          plus.add(minusToPlus);
          plus.add(a[1]);
        }
 else {
          minus.add(a[1]);
        }
      }
 else {
        plus.add(a[1]);
      }
    }
  }
  return new Split(createSplitPart(plus),createSplitPart(minus));
}