Program: 55092
Project: 55092
Buggy source:
@Override public NumberSequenceIterator[] split(int numPartitions){
  if (numPartitions < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (numPartitions == 1) {
    return new NumberSequenceIterator[]{new NumberSequenceIterator(current,to)};
  }
  long elementsPerSplit;
  if (to - current >= 0) {
    elementsPerSplit=(to - current) / numPartitions;
  }
 else {
    final long halfDiff;
    if (current == Long.MIN_VALUE) {
      halfDiff=(Long.MAX_VALUE / 2 + 1) + to / 2;
    }
 else {
      long posFrom=-current;
      if (posFrom > to) {
        halfDiff=to + ((posFrom - to) / 2);
      }
 else {
        halfDiff=posFrom + ((to - posFrom) / 2);
      }
    }
    elementsPerSplit=halfDiff / numPartitions * 2;
  }
  if (elementsPerSplit < Long.MAX_VALUE) {
    long numWithExtra=-(elementsPerSplit * numPartitions) + to - current;
    if (numWithExtra > numPartitions) {
      elementsPerSplit++;
      numWithExtra-=numPartitions;
      if (numWithExtra > numPartitions) {
        throw new RuntimeException("String_Node_Str");
      }
    }
    NumberSequenceIterator[] iters=new NumberSequenceIterator[numPartitions];
    long curr=current;
    int i=0;
    for (; i < numWithExtra; i++) {
      long next=curr + elementsPerSplit + 1;
      iters[i]=new NumberSequenceIterator(curr,next);
      curr=next;
    }
    for (; i < numPartitions; i++) {
      long next=curr + elementsPerSplit;
      iters[i]=new NumberSequenceIterator(curr,next);
      curr=next;
    }
    return iters;
  }
 else {
    if (numPartitions != 2) {
      throw new RuntimeException("String_Node_Str");
    }
    return new NumberSequenceIterator[]{new NumberSequenceIterator(current,current + elementsPerSplit),new NumberSequenceIterator(current + elementsPerSplit,to)};
  }
}

Fixed version (ground truth):
@Override public NumberSequenceIterator[] split(int numPartitions){
  if (numPartitions < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (numPartitions == 1) {
    return new NumberSequenceIterator[]{new NumberSequenceIterator(current,to)};
  }
  long elementsPerSplit;
  if (to - current + 1 >= 0) {
    elementsPerSplit=(to - current + 1) / numPartitions;
  }
 else {
    final long halfDiff;
    if (current == Long.MIN_VALUE) {
      halfDiff=(Long.MAX_VALUE / 2 + 1) + to / 2;
    }
 else {
      long posFrom=-current;
      if (posFrom > to) {
        halfDiff=to + ((posFrom - to) / 2);
      }
 else {
        halfDiff=posFrom + ((to - posFrom) / 2);
      }
    }
    elementsPerSplit=halfDiff / numPartitions * 2;
  }
  if (elementsPerSplit < Long.MAX_VALUE) {
    long numWithExtra=-(elementsPerSplit * numPartitions) + to - current + 1;
    if (numWithExtra > numPartitions) {
      elementsPerSplit++;
      numWithExtra-=numPartitions;
      if (numWithExtra > numPartitions) {
        throw new RuntimeException("String_Node_Str");
      }
    }
    NumberSequenceIterator[] iters=new NumberSequenceIterator[numPartitions];
    long curr=current;
    int i=0;
    for (; i < numWithExtra; i++) {
      long next=curr + elementsPerSplit + 1;
      iters[i]=new NumberSequenceIterator(curr,next - 1);
      curr=next;
    }
    for (; i < numPartitions; i++) {
      long next=curr + elementsPerSplit;
      iters[i]=new NumberSequenceIterator(curr,next - 1,true);
      curr=next;
    }
    return iters;
  }
 else {
    if (numPartitions != 2) {
      throw new RuntimeException("String_Node_Str");
    }
    return new NumberSequenceIterator[]{new NumberSequenceIterator(current,current + elementsPerSplit),new NumberSequenceIterator(current + elementsPerSplit,to)};
  }
}