Program: 24122
Project: 24122
Buggy source:
private void collectDumpInfoFromParcelFLOCK(Parcel in,PrintWriter pw,String date,boolean isCompactOutput){
  StringBuilder sb=new StringBuilder(512);
  if (isCompactOutput) {
    sb.append("String_Node_Str");
    sb.append(CHECKIN_VERSION);
    sb.append(',');
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append(date);
  int vers=in.readInt();
  if (vers != VERSION) {
    sb.append("String_Node_Str");
    pw.println(sb.toString());
    return;
  }
  pw.println(sb.toString());
  int N=in.readInt();
  while (N > 0) {
    N--;
    String pkgName=in.readString();
    if (pkgName == null) {
      break;
    }
    sb.setLength(0);
    PkgUsageStatsExtended pus=new PkgUsageStatsExtended(in);
    if (isCompactOutput) {
      sb.append("String_Node_Str");
      sb.append(pkgName);
      sb.append("String_Node_Str");
      sb.append(pus.mLaunchCount);
      sb.append("String_Node_Str");
      sb.append(pus.mUsageTime);
      sb.append('\n');
      final int NC=pus.mLaunchTimes.size();
      if (NC > 0) {
        for (        Map.Entry<String,TimeStats> ent : pus.mLaunchTimes.entrySet()) {
          sb.append("String_Node_Str");
          sb.append(ent.getKey());
          TimeStats times=ent.getValue();
          for (int i=0; i < NUM_LAUNCH_TIME_BINS; i++) {
            sb.append("String_Node_Str");
            sb.append(times.times[i]);
          }
          sb.append('\n');
        }
      }
    }
 else {
      sb.append("String_Node_Str");
      sb.append(pkgName);
      sb.append("String_Node_Str");
      sb.append(pus.mLaunchCount);
      sb.append("String_Node_Str");
      sb.append(pus.mUsageTime);
      sb.append("String_Node_Str");
      sb.append('\n');
      final int NC=pus.mLaunchTimes.size();
      if (NC > 0) {
        for (        Map.Entry<String,TimeStats> ent : pus.mLaunchTimes.entrySet()) {
          sb.append("String_Node_Str");
          sb.append(ent.getKey());
          TimeStats times=ent.getValue();
          int lastBin=0;
          boolean first=true;
          for (int i=0; i < NUM_LAUNCH_TIME_BINS - 1; i++) {
            if (times.times[i] != 0) {
              sb.append(first ? "String_Node_Str" : "String_Node_Str");
              sb.append(lastBin);
              sb.append('-');
              sb.append(LAUNCH_TIME_BINS[i]);
              sb.append('=');
              sb.append(times.times[i]);
              first=false;
            }
            lastBin=LAUNCH_TIME_BINS[i];
          }
          if (times.times[NUM_LAUNCH_TIME_BINS - 1] != 0) {
            sb.append(first ? "String_Node_Str" : "String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(lastBin);
            sb.append('=');
            sb.append(times.times[NUM_LAUNCH_TIME_BINS - 1]);
          }
          sb.append('\n');
        }
      }
    }
    pw.write(sb.toString());
  }
}

Fixed version (ground truth):
private void collectDumpInfoFromParcelFLOCK(Parcel in,PrintWriter pw,String date,boolean isCompactOutput){
  StringBuilder sb=new StringBuilder(512);
  if (isCompactOutput) {
    sb.append("String_Node_Str");
    sb.append(CHECKIN_VERSION);
    sb.append(',');
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append(date);
  int vers=in.readInt();
  if (vers != VERSION) {
    sb.append("String_Node_Str");
    pw.println(sb.toString());
    return;
  }
  pw.println(sb.toString());
  int N=in.readInt();
  while (N > 0) {
    N--;
    String pkgName=in.readString();
    if (pkgName == null) {
      break;
    }
    sb.setLength(0);
    PkgUsageStatsExtended pus=new PkgUsageStatsExtended(in);
    if (isCompactOutput) {
      sb.append("String_Node_Str");
      sb.append(pkgName);
      sb.append(',');
      sb.append(pus.mLaunchCount);
      sb.append(',');
      sb.append(pus.mUsageTime);
      sb.append('\n');
      final int NC=pus.mLaunchTimes.size();
      if (NC > 0) {
        for (        Map.Entry<String,TimeStats> ent : pus.mLaunchTimes.entrySet()) {
          sb.append("String_Node_Str");
          sb.append(ent.getKey());
          TimeStats times=ent.getValue();
          sb.append(',');
          sb.append(times.count);
          for (int i=0; i < NUM_LAUNCH_TIME_BINS; i++) {
            sb.append("String_Node_Str");
            sb.append(times.times[i]);
          }
          sb.append('\n');
        }
      }
    }
 else {
      sb.append("String_Node_Str");
      sb.append(pkgName);
      sb.append("String_Node_Str");
      sb.append(pus.mLaunchCount);
      sb.append("String_Node_Str");
      sb.append(pus.mUsageTime);
      sb.append("String_Node_Str");
      sb.append('\n');
      final int NC=pus.mLaunchTimes.size();
      if (NC > 0) {
        for (        Map.Entry<String,TimeStats> ent : pus.mLaunchTimes.entrySet()) {
          sb.append("String_Node_Str");
          sb.append(ent.getKey());
          TimeStats times=ent.getValue();
          sb.append("String_Node_Str");
          sb.append(times.count);
          sb.append("String_Node_Str");
          int lastBin=0;
          for (int i=0; i < NUM_LAUNCH_TIME_BINS - 1; i++) {
            if (times.times[i] != 0) {
              sb.append("String_Node_Str");
              sb.append(lastBin);
              sb.append('-');
              sb.append(LAUNCH_TIME_BINS[i]);
              sb.append("String_Node_Str");
              sb.append(times.times[i]);
            }
            lastBin=LAUNCH_TIME_BINS[i];
          }
          if (times.times[NUM_LAUNCH_TIME_BINS - 1] != 0) {
            sb.append("String_Node_Str");
            sb.append("String_Node_Str");
            sb.append(lastBin);
            sb.append("String_Node_Str");
            sb.append(times.times[NUM_LAUNCH_TIME_BINS - 1]);
          }
          sb.append('\n');
        }
      }
    }
    pw.write(sb.toString());
  }
}