Program: 193804
Project: 193804
Buggy source:
void dumpPackagesLPr(PrintWriter pw,String packageName,ArraySet<String> permissionNames,DumpState dumpState,boolean checkin){
  final SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  final Date date=new Date();
  boolean printedSomething=false;
  List<UserInfo> users=getAllUsers();
  for (  final PackageSetting ps : mPackages.values()) {
    if (packageName != null && !packageName.equals(ps.realName) && !packageName.equals(ps.name)) {
      continue;
    }
    if (permissionNames != null && !ps.getPermissionsState().hasRequestedPermission(permissionNames)) {
      continue;
    }
    if (!checkin && packageName != null) {
      dumpState.setSharedUser(ps.sharedUser);
    }
    if (!checkin && !printedSomething) {
      if (dumpState.onTitlePrinted())       pw.println();
      pw.println("String_Node_Str");
      printedSomething=true;
    }
    dumpPackageLPr(pw,"String_Node_Str",checkin ? "String_Node_Str" : null,permissionNames,ps,sdf,date,users);
  }
  printedSomething=false;
  if (!checkin && mRenamedPackages.size() > 0 && permissionNames == null) {
    for (    final Map.Entry<String,String> e : mRenamedPackages.entrySet()) {
      if (packageName != null && !packageName.equals(e.getKey()) && !packageName.equals(e.getValue())) {
        continue;
      }
      if (!checkin) {
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
      }
 else {
        pw.print("String_Node_Str");
      }
      pw.print(e.getKey());
      pw.print(checkin ? "String_Node_Str" : "String_Node_Str");
      pw.println(e.getValue());
    }
  }
  printedSomething=false;
  if (mDisabledSysPackages.size() > 0 && permissionNames == null) {
    for (    final PackageSetting ps : mDisabledSysPackages.values()) {
      if (packageName != null && !packageName.equals(ps.realName) && !packageName.equals(ps.name)) {
        continue;
      }
      if (!checkin && !printedSomething) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        printedSomething=true;
      }
      dumpPackageLPr(pw,"String_Node_Str",checkin ? "String_Node_Str" : null,permissionNames,ps,sdf,date,users);
    }
  }
}

Fixed version (ground truth):
void dumpPackagesLPr(PrintWriter pw,String packageName,ArraySet<String> permissionNames,DumpState dumpState,boolean checkin){
  final SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  final Date date=new Date();
  boolean printedSomething=false;
  List<UserInfo> users=getAllUsers();
  for (  final PackageSetting ps : mPackages.values()) {
    if (packageName != null && !packageName.equals(ps.realName) && !packageName.equals(ps.name)) {
      continue;
    }
    if (permissionNames != null && !ps.getPermissionsState().hasRequestedPermission(permissionNames)) {
      continue;
    }
    if (!checkin && packageName != null) {
      dumpState.setSharedUser(ps.sharedUser);
    }
    if (!checkin && !printedSomething) {
      if (dumpState.onTitlePrinted())       pw.println();
      pw.println("String_Node_Str");
      printedSomething=true;
    }
    dumpPackageLPr(pw,"String_Node_Str",checkin ? "String_Node_Str" : null,permissionNames,ps,sdf,date,users,packageName != null);
  }
  printedSomething=false;
  if (mRenamedPackages.size() > 0 && permissionNames == null) {
    for (    final Map.Entry<String,String> e : mRenamedPackages.entrySet()) {
      if (packageName != null && !packageName.equals(e.getKey()) && !packageName.equals(e.getValue())) {
        continue;
      }
      if (!checkin) {
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
      }
 else {
        pw.print("String_Node_Str");
      }
      pw.print(e.getKey());
      pw.print(checkin ? "String_Node_Str" : "String_Node_Str");
      pw.println(e.getValue());
    }
  }
  printedSomething=false;
  if (mDisabledSysPackages.size() > 0 && permissionNames == null) {
    for (    final PackageSetting ps : mDisabledSysPackages.values()) {
      if (packageName != null && !packageName.equals(ps.realName) && !packageName.equals(ps.name)) {
        continue;
      }
      if (!checkin && !printedSomething) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        printedSomething=true;
      }
      dumpPackageLPr(pw,"String_Node_Str",checkin ? "String_Node_Str" : null,permissionNames,ps,sdf,date,users,packageName != null);
    }
  }
}