Program: 97253
Project: 97253
Buggy source:
public static String compress(List<Integer> locationPoints){
  Collections.sort(locationPoints);
  StringBuilder workingLocRefs=new StringBuilder();
  boolean isRange=false;
  boolean endOfRange=false;
  int startOfRange=-1;
  int previous=-1;
  Iterator<Integer> iterator=locationPoints.iterator();
  while (iterator.hasNext()) {
    int currentTestPoint=iterator.next();
    boolean isLastElement=!iterator.hasNext();
    if (previous == (currentTestPoint - 1) && startOfRange == -1) {
      isRange=true;
      endOfRange=false;
      startOfRange=previous;
      int lastIndexOf=workingLocRefs.lastIndexOf("String_Node_Str");
      if (lastIndexOf > 0) {
        workingLocRefs.replace(lastIndexOf,workingLocRefs.length(),"String_Node_Str");
      }
 else {
        workingLocRefs.setLength(0);
      }
    }
    if (isRange && (previous != (currentTestPoint - 1) || isLastElement)) {
      endOfRange=true;
    }
    StringBuilder toAppend=new StringBuilder();
    if (!isRange) {
      toAppend.append(currentTestPoint);
    }
 else     if (endOfRange) {
      if (isLastElement) {
        toAppend.append(new LocationRange(startOfRange,currentTestPoint).toString());
      }
 else {
        toAppend.append(new LocationRange(startOfRange,previous).toString());
        toAppend.append("String_Node_Str");
        toAppend.append(currentTestPoint);
      }
      isRange=false;
      startOfRange=-1;
    }
    if (toAppend.length() != 0) {
      if (workingLocRefs.length() > 0) {
        workingLocRefs.append("String_Node_Str");
      }
      workingLocRefs.append(toAppend);
    }
    previous=currentTestPoint;
  }
  return workingLocRefs.toString();
}

Fixed version (ground truth):
public static String compress(List<Integer> locationPoints){
  Collections.sort(locationPoints);
  StringBuilder workingLocRefs=new StringBuilder();
  boolean isRange=false;
  boolean endOfRange=false;
  int startOfRange=-1;
  int previous=-1;
  Iterator<Integer> iterator=locationPoints.iterator();
  while (iterator.hasNext()) {
    int currentTestPoint=iterator.next();
    boolean isLastElement=!iterator.hasNext();
    if (currentTestPoint != 0 && previous == (currentTestPoint - 1) && startOfRange == -1) {
      isRange=true;
      endOfRange=false;
      startOfRange=previous;
      int lastIndexOf=workingLocRefs.lastIndexOf("String_Node_Str");
      if (lastIndexOf > 0) {
        workingLocRefs.replace(lastIndexOf,workingLocRefs.length(),"String_Node_Str");
      }
 else {
        workingLocRefs.setLength(0);
      }
    }
    if (isRange && (previous != (currentTestPoint - 1) || isLastElement)) {
      endOfRange=true;
    }
    StringBuilder toAppend=new StringBuilder();
    if (!isRange) {
      toAppend.append(currentTestPoint);
    }
 else     if (endOfRange) {
      if (previous != (currentTestPoint - 1)) {
        toAppend.append(new LocationRange(startOfRange,previous).toString());
        toAppend.append("String_Node_Str");
        toAppend.append(currentTestPoint);
      }
 else {
        toAppend.append(new LocationRange(startOfRange,currentTestPoint).toString());
      }
      isRange=false;
      startOfRange=-1;
    }
    if (toAppend.length() != 0) {
      if (workingLocRefs.length() > 0) {
        workingLocRefs.append("String_Node_Str");
      }
      workingLocRefs.append(toAppend);
    }
    previous=currentTestPoint;
  }
  return workingLocRefs.toString();
}