Program: 4514
Project: 4514
Buggy source:
private void send(OutputStream out,int start,int stop) throws IOException {
  totalAmountToUpload+=stop - start;
  long t0=System.currentTimeMillis();
  if (minPollTime > 0)   Assert.that(t0 > minPollTime,"String_Node_Str" + (minPollTime - t0) + "String_Node_Str");
  if (maxPollTime > 0)   Assert.that(t0 < maxPollTime,"String_Node_Str" + (t0 - maxPollTime) + "String_Node_Str");
  String str=busy || queue || partial == 1 ? "String_Node_Str" : "String_Node_Str";
  out.write(str.getBytes());
  if (busy && retryAfter != -1) {
    str="String_Node_Str" + retryAfter + "String_Node_Str";
    out.write(str.getBytes());
  }
  if (queue) {
    LOG.debug("String_Node_Str");
    str="String_Node_Str" + queuePos + "String_Node_Str"+ MIN_POLL / 1000 + "String_Node_Str" + MAX_POLL / 1000 + "String_Node_Str";
    out.write(str.getBytes());
    str="String_Node_Str";
    out.write(str.getBytes());
    out.flush();
    long t=System.currentTimeMillis();
    minPollTime=t + MIN_POLL;
    maxPollTime=t + MAX_POLL;
    return;
  }
  if (partial > 0) {
switch (partial) {
case 1:
      str="String_Node_Str";
    break;
case 2:
  str="String_Node_Str";
break;
default :
str="String_Node_Str";
}
out.write(str.getBytes());
out.flush();
partial++;
if (partial == 2) {
str="String_Node_Str";
out.write(str.getBytes());
out.flush();
return;
}
}
str="String_Node_Str" + (stop - start) + "String_Node_Str";
out.write(str.getBytes());
if (start != 0 || (stop - start != TestFile.length())) {
str="String_Node_Str" + start + "String_Node_Str"+ (stop - 1)+ "String_Node_Str"+ TestFile.length()+ "String_Node_Str";
out.write(str.getBytes());
}
if (storedAltLocs != null && storedAltLocs.hasAlternateLocations()) {
LOG.debug("String_Node_Str" + storedAltLocs + "String_Node_Str");
HTTPUtils.writeHeader(HTTPHeaderName.ALT_LOCATION,storedAltLocs,out);
}
 else {
LOG.debug("String_Node_Str" + storedAltLocs + "String_Node_Str");
}
str="String_Node_Str";
out.write(str.getBytes());
out.flush();
if (busy) {
if (connects >= timesBusy) busy=false;
out.close();
return;
}
for (int i=start; i < stop; ) {
if (stopAfter > -1 && totalUploaded == stopAfter) {
stopped=true;
out.flush();
throw new IOException();
}
if (sendCorrupt) out.write(TestFile.getByte(i) + (byte)1);
 else out.write(TestFile.getByte(i));
totalUploaded++;
i++;
}
out.flush();
}

Fixed version (ground truth):
private void send(OutputStream out,int start,int stop) throws IOException {
  totalAmountToUpload+=stop - start;
  long t0=System.currentTimeMillis();
  if (minPollTime > 0)   Assert.that(t0 > minPollTime,"String_Node_Str" + (minPollTime - t0) + "String_Node_Str");
  if (maxPollTime > 0)   Assert.that(t0 < maxPollTime,"String_Node_Str" + (t0 - maxPollTime) + "String_Node_Str");
  String httpValue=respondWithHTTP11 ? "String_Node_Str" : "String_Node_Str";
  String str=httpValue + "String_Node_Str" + (busy || queue || partial == 1 ? "String_Node_Str" : "String_Node_Str");
  out.write(str.getBytes());
  if (busy && retryAfter != -1) {
    str="String_Node_Str" + retryAfter + "String_Node_Str";
    out.write(str.getBytes());
  }
  if (queue) {
    LOG.debug("String_Node_Str");
    str="String_Node_Str" + queuePos + "String_Node_Str"+ MIN_POLL / 1000 + "String_Node_Str" + MAX_POLL / 1000 + "String_Node_Str";
    out.write(str.getBytes());
    str="String_Node_Str";
    out.write(str.getBytes());
    out.flush();
    long t=System.currentTimeMillis();
    minPollTime=t + MIN_POLL;
    maxPollTime=t + MAX_POLL;
    return;
  }
  if (partial > 0) {
switch (partial) {
case 1:
      str="String_Node_Str";
    break;
case 2:
  str="String_Node_Str";
break;
default :
str="String_Node_Str";
}
out.write(str.getBytes());
out.flush();
partial++;
if (partial == 2) {
str="String_Node_Str";
out.write(str.getBytes());
out.flush();
return;
}
}
str="String_Node_Str" + (stop - start) + "String_Node_Str";
out.write(str.getBytes());
if (start != 0 || (stop - start != TestFile.length())) {
str="String_Node_Str" + start + "String_Node_Str"+ (stop - 1)+ "String_Node_Str"+ TestFile.length()+ "String_Node_Str";
out.write(str.getBytes());
}
if (storedAltLocs != null && storedAltLocs.hasAlternateLocations()) {
LOG.debug("String_Node_Str" + storedAltLocs + "String_Node_Str");
HTTPUtils.writeHeader(HTTPHeaderName.ALT_LOCATION,storedAltLocs,out);
}
 else {
LOG.debug("String_Node_Str" + storedAltLocs + "String_Node_Str");
}
str="String_Node_Str";
out.write(str.getBytes());
out.flush();
if (busy) {
if (connects >= timesBusy) busy=false;
out.close();
return;
}
for (int i=start; i < stop; ) {
if (stopAfter > -1 && totalUploaded == stopAfter) {
stopped=true;
out.flush();
throw new IOException();
}
if (sendCorrupt) out.write(TestFile.getByte(i) + (byte)1);
 else out.write(TestFile.getByte(i));
totalUploaded++;
i++;
}
out.flush();
}