Program: 606
Project: 606
Buggy source:
static void dumpProcessState(PrintWriter pw,String prefix,ProcessState proc,int[] screenStates,int[] memStates,int[] procStates,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int is=0; is < screenStates.length; is++) {
    int printedMem=-1;
    for (int im=0; im < memStates.length; im++) {
      for (int ip=0; ip < procStates.length; ip++) {
        final int iscreen=screenStates[is];
        final int imem=memStates[im];
        final int bucket=((iscreen + imem) * STATE_COUNT) + procStates[ip];
        long time=proc.getDuration(bucket,now);
        String running="String_Node_Str";
        if (proc.mCurState == bucket) {
          running="String_Node_Str";
        }
        if (time != 0) {
          pw.print(prefix);
          if (screenStates.length > 1) {
            printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
            printedScreen=iscreen;
          }
          if (memStates.length > 1) {
            printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING);
            printedMem=imem;
          }
          pw.print(STATE_NAMES[procStates[ip]]);
          pw.print("String_Node_Str");
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
          totalTime+=time;
        }
      }
    }
  }
  if (totalTime != 0) {
    pw.print(prefix);
    if (screenStates.length > 1) {
      printScreenLabel(pw,STATE_NOTHING);
    }
    if (memStates.length > 1) {
      printMemLabel(pw,STATE_NOTHING);
    }
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
}

Fixed version (ground truth):
static void dumpProcessState(PrintWriter pw,String prefix,ProcessState proc,int[] screenStates,int[] memStates,int[] procStates,long now){
  long totalTime=0;
  int printedScreen=-1;
  for (int is=0; is < screenStates.length; is++) {
    int printedMem=-1;
    for (int im=0; im < memStates.length; im++) {
      for (int ip=0; ip < procStates.length; ip++) {
        final int iscreen=screenStates[is];
        final int imem=memStates[im];
        final int bucket=((iscreen + imem) * STATE_COUNT) + procStates[ip];
        long time=proc.getDuration(bucket,now);
        String running="String_Node_Str";
        if (proc.mCurState == bucket) {
          running="String_Node_Str";
        }
        if (time != 0) {
          pw.print(prefix);
          if (screenStates.length > 1) {
            printScreenLabel(pw,printedScreen != iscreen ? iscreen : STATE_NOTHING);
            printedScreen=iscreen;
          }
          if (memStates.length > 1) {
            printMemLabel(pw,printedMem != imem ? imem : STATE_NOTHING,'/');
            printedMem=imem;
          }
          pw.print(STATE_NAMES[procStates[ip]]);
          pw.print("String_Node_Str");
          TimeUtils.formatDuration(time,pw);
          pw.println(running);
          totalTime+=time;
        }
      }
    }
  }
  if (totalTime != 0) {
    pw.print(prefix);
    if (screenStates.length > 1) {
      printScreenLabel(pw,STATE_NOTHING);
    }
    if (memStates.length > 1) {
      printMemLabel(pw,STATE_NOTHING,'/');
    }
    pw.print("String_Node_Str");
    TimeUtils.formatDuration(totalTime,pw);
    pw.println();
  }
}