Program: 1772
Project: 1772
Buggy source:
static void dumpProcessSummaryLocked(PrintWriter pw,String prefix,ArrayList<ProcessState> procs,int[] screenStates,int[] memStates,int[] procStates,long now,long totalTime){
  for (int i=procs.size() - 1; i >= 0; i--) {
    ProcessState proc=procs.get(i);
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(proc.mName);
    pw.print("String_Node_Str");
    UserHandle.formatUid(pw,proc.mUid);
    pw.println("String_Node_Str");
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,procStates,now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_PERSISTENT},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_TOP},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_IMPORTANT_FOREGROUND},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_IMPORTANT_BACKGROUND},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_BACKUP},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_HEAVY_WEIGHT},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_SERVICE},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_RECEIVER},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_HOME},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_LAST_ACTIVITY},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_CACHED_ACTIVITY_CLIENT,STATE_CACHED_ACTIVITY_CLIENT,STATE_CACHED_EMPTY},now,totalTime,true);
  }
}

Fixed version (ground truth):
static void dumpProcessSummaryLocked(PrintWriter pw,String prefix,ArrayList<ProcessState> procs,int[] screenStates,int[] memStates,int[] procStates,long now,long totalTime){
  for (int i=procs.size() - 1; i >= 0; i--) {
    ProcessState proc=procs.get(i);
    pw.print(prefix);
    pw.print("String_Node_Str");
    pw.print(proc.mName);
    pw.print("String_Node_Str");
    UserHandle.formatUid(pw,proc.mUid);
    pw.println("String_Node_Str");
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,procStates,now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_PERSISTENT},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_TOP},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_IMPORTANT_FOREGROUND},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_IMPORTANT_BACKGROUND},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_BACKUP},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_HEAVY_WEIGHT},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_SERVICE},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_RECEIVER},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_HOME},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_LAST_ACTIVITY},now,totalTime,true);
    dumpProcessSummaryDetails(pw,proc,prefix,"String_Node_Str",screenStates,memStates,new int[]{STATE_CACHED_ACTIVITY,STATE_CACHED_ACTIVITY_CLIENT,STATE_CACHED_EMPTY},now,totalTime,true);
  }
}