Program: 193771
Project: 193771
Buggy source:
@Override protected void dump(FileDescriptor fd,PrintWriter pw,String[] args){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) {
    pw.println("String_Node_Str" + Binder.getCallingPid() + "String_Node_Str"+ Binder.getCallingUid()+ "String_Node_Str"+ android.Manifest.permission.DUMP);
    return;
  }
  DumpState dumpState=new DumpState();
  boolean fullPreferred=false;
  boolean checkin=false;
  String packageName=null;
  ArraySet<String> permissionNames=null;
  int opti=0;
  while (opti < args.length) {
    String opt=args[opti];
    if (opt == null || opt.length() <= 0 || opt.charAt(0) != '-') {
      break;
    }
    opti++;
    if ("String_Node_Str".equals(opt)) {
    }
 else     if ("String_Node_Str".equals(opt)) {
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      return;
    }
 else     if ("String_Node_Str".equals(opt)) {
      checkin=true;
    }
 else     if ("String_Node_Str".equals(opt)) {
      dumpState.setOptionEnabled(DumpState.OPTION_SHOW_FILTERS);
    }
 else {
      pw.println("String_Node_Str" + opt + "String_Node_Str");
    }
  }
  if (opti < args.length) {
    String cmd=args[opti];
    opti++;
    if ("String_Node_Str".equals(cmd) || cmd.contains("String_Node_Str")) {
      packageName=cmd;
      dumpState.setOptionEnabled(DumpState.OPTION_SHOW_FILTERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_LIBS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_FEATURES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_RESOLVERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PERMISSIONS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      if (opti >= args.length) {
        pw.println("String_Node_Str");
        return;
      }
      permissionNames=new ArraySet<>();
      while (opti < args.length) {
        permissionNames.add(args[opti]);
        opti++;
      }
      dumpState.setDump(DumpState.DUMP_PERMISSIONS | DumpState.DUMP_PACKAGES | DumpState.DUMP_SHARED_USERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PREFERRED);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PREFERRED_XML);
      if (opti < args.length && "String_Node_Str".equals(args[opti])) {
        fullPreferred=true;
        opti++;
      }
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_DOMAIN_PREFERRED);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PACKAGES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_SHARED_USERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PROVIDERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_MESSAGES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_VERIFIERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_INTENT_FILTER_VERIFIERS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_VERSION);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_KEYSETS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_INSTALLS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
synchronized (mPackages) {
        mSettings.writeLPr();
        pw.println("String_Node_Str");
        return;
      }
    }
  }
  if (checkin) {
    pw.println("String_Node_Str");
  }
synchronized (mPackages) {
    if (dumpState.isDumping(DumpState.DUMP_VERSION) && packageName == null) {
      if (!checkin) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        mSettings.dumpVersionLPr(new IndentingPrintWriter(pw,"String_Node_Str"));
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_VERIFIERS) && packageName == null) {
      if (!checkin) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mRequiredVerifierPackage);
        pw.print("String_Node_Str");
        pw.print(getPackageUid(mRequiredVerifierPackage,0));
        pw.println("String_Node_Str");
      }
 else       if (mRequiredVerifierPackage != null) {
        pw.print("String_Node_Str");
        pw.print(mRequiredVerifierPackage);
        pw.print("String_Node_Str");
        pw.println(getPackageUid(mRequiredVerifierPackage,0));
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_INTENT_FILTER_VERIFIERS) && packageName == null) {
      if (mIntentFilterVerifierComponent != null) {
        String verifierPackageName=mIntentFilterVerifierComponent.getPackageName();
        if (!checkin) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          pw.print("String_Node_Str");
          pw.print(verifierPackageName);
          pw.print("String_Node_Str");
          pw.print(getPackageUid(verifierPackageName,0));
          pw.println("String_Node_Str");
        }
 else         if (verifierPackageName != null) {
          pw.print("String_Node_Str");
          pw.print(verifierPackageName);
          pw.print("String_Node_Str");
          pw.println(getPackageUid(verifierPackageName,0));
        }
      }
 else {
        pw.println();
        pw.println("String_Node_Str");
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_LIBS) && packageName == null) {
      boolean printedHeader=false;
      final Iterator<String> it=mSharedLibraries.keySet().iterator();
      while (it.hasNext()) {
        String name=it.next();
        SharedLibraryEntry ent=mSharedLibraries.get(name);
        if (!checkin) {
          if (!printedHeader) {
            if (dumpState.onTitlePrinted())             pw.println();
            pw.println("String_Node_Str");
            printedHeader=true;
          }
          pw.print("String_Node_Str");
        }
 else {
          pw.print("String_Node_Str");
        }
        pw.print(name);
        if (!checkin) {
          pw.print("String_Node_Str");
        }
        if (ent.path != null) {
          if (!checkin) {
            pw.print("String_Node_Str");
            pw.print(ent.path);
          }
 else {
            pw.print("String_Node_Str");
            pw.print(ent.path);
          }
        }
 else {
          if (!checkin) {
            pw.print("String_Node_Str");
            pw.print(ent.apk);
          }
 else {
            pw.print("String_Node_Str");
            pw.print(ent.apk);
          }
        }
        pw.println();
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_FEATURES) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      if (!checkin) {
        pw.println("String_Node_Str");
      }
      Iterator<String> it=mAvailableFeatures.keySet().iterator();
      while (it.hasNext()) {
        String name=it.next();
        if (!checkin) {
          pw.print("String_Node_Str");
        }
 else {
          pw.print("String_Node_Str");
        }
        pw.println(name);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_RESOLVERS)) {
      if (mActivities.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mReceivers.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mServices.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mProviders.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED)) {
      for (int i=0; i < mSettings.mPreferredActivities.size(); i++) {
        PreferredIntentResolver pir=mSettings.mPreferredActivities.valueAt(i);
        int user=mSettings.mPreferredActivities.keyAt(i);
        if (pir.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" + user + "String_Node_Str" : "String_Node_Str" + user + "String_Node_Str","String_Node_Str",packageName,true,false)) {
          dumpState.setTitlePrinted(true);
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED_XML)) {
      pw.flush();
      FileOutputStream fout=new FileOutputStream(fd);
      BufferedOutputStream str=new BufferedOutputStream(fout);
      XmlSerializer serializer=new FastXmlSerializer();
      try {
        serializer.setOutput(str,StandardCharsets.UTF_8.name());
        serializer.startDocument(null,true);
        serializer.setFeature("String_Node_Str",true);
        mSettings.writePreferredActivitiesLPr(serializer,0,fullPreferred);
        serializer.endDocument();
        serializer.flush();
      }
 catch (      IllegalArgumentException e) {
        pw.println("String_Node_Str" + e);
      }
catch (      IllegalStateException e) {
        pw.println("String_Node_Str" + e);
      }
catch (      IOException e) {
        pw.println("String_Node_Str" + e);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_DOMAIN_PREFERRED) && packageName == null) {
      pw.println();
      int count=mSettings.mPackages.size();
      if (count == 0) {
        pw.println("String_Node_Str");
        pw.println();
      }
 else {
        final String prefix="String_Node_Str";
        Collection<PackageSetting> allPackageSettings=mSettings.mPackages.values();
        if (allPackageSettings.size() == 0) {
          pw.println("String_Node_Str");
          pw.println();
        }
 else {
          pw.println("String_Node_Str");
          pw.println();
          count=0;
          for (          PackageSetting ps : allPackageSettings) {
            IntentFilterVerificationInfo ivi=ps.getIntentFilterVerificationInfo();
            if (ivi == null || ivi.getPackageName() == null)             continue;
            pw.println(prefix + "String_Node_Str" + ivi.getPackageName());
            pw.println(prefix + "String_Node_Str" + ivi.getDomainsString());
            pw.println(prefix + "String_Node_Str" + ivi.getStatusString());
            pw.println();
            count++;
          }
          if (count == 0) {
            pw.println(prefix + "String_Node_Str");
            pw.println();
          }
          for (          int userId : sUserManager.getUserIds()) {
            pw.println("String_Node_Str" + userId + "String_Node_Str");
            pw.println();
            count=0;
            for (            PackageSetting ps : allPackageSettings) {
              final long status=ps.getDomainVerificationStatusForUser(userId);
              if (status >> 32 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED) {
                continue;
              }
              pw.println(prefix + "String_Node_Str" + ps.name);
              pw.println(prefix + "String_Node_Str" + dumpDomainString(ps.name));
              String statusStr=IntentFilterVerificationInfo.getStatusStringFromValue(status);
              pw.println(prefix + "String_Node_Str" + statusStr);
              pw.println();
              count++;
            }
            if (count == 0) {
              pw.println(prefix + "String_Node_Str");
              pw.println();
            }
          }
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PERMISSIONS)) {
      mSettings.dumpPermissionsLPr(pw,packageName,permissionNames,dumpState);
      if (packageName == null && permissionNames == null) {
        for (int iperm=0; iperm < mAppOpPermissionPackages.size(); iperm++) {
          if (iperm == 0) {
            if (dumpState.onTitlePrinted())             pw.println();
            pw.println("String_Node_Str");
          }
          pw.print("String_Node_Str");
          pw.print(mAppOpPermissionPackages.keyAt(iperm));
          pw.println("String_Node_Str");
          ArraySet<String> pkgs=mAppOpPermissionPackages.valueAt(iperm);
          for (int ipkg=0; ipkg < pkgs.size(); ipkg++) {
            pw.print("String_Node_Str");
            pw.println(pkgs.valueAt(ipkg));
          }
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PROVIDERS)) {
      boolean printedSomething=false;
      for (      PackageParser.Provider p : mProviders.mProviders.values()) {
        if (packageName != null && !packageName.equals(p.info.packageName)) {
          continue;
        }
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
        p.printComponentShortName(pw);
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.println(p.toString());
      }
      printedSomething=false;
      for (      Map.Entry<String,PackageParser.Provider> entry : mProvidersByAuthority.entrySet()) {
        PackageParser.Provider p=entry.getValue();
        if (packageName != null && !packageName.equals(p.info.packageName)) {
          continue;
        }
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
        pw.print(entry.getKey());
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.println(p.toString());
        if (p.info != null && p.info.applicationInfo != null) {
          final String appInfo=p.info.applicationInfo.toString();
          pw.print("String_Node_Str");
          pw.println(appInfo);
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_KEYSETS)) {
      mSettings.mKeySetManagerService.dumpLPr(pw,packageName,dumpState);
    }
    if (dumpState.isDumping(DumpState.DUMP_PACKAGES)) {
      mSettings.dumpPackagesLPr(pw,packageName,permissionNames,dumpState,checkin);
    }
    if (dumpState.isDumping(DumpState.DUMP_SHARED_USERS)) {
      mSettings.dumpSharedUsersLPr(pw,packageName,permissionNames,dumpState,checkin);
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      mInstallerService.dump(new IndentingPrintWriter(pw,"String_Node_Str",120));
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_MESSAGES) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      mSettings.dumpReadMessagesLPr(pw,dumpState);
      pw.println();
      pw.println("String_Node_Str");
      BufferedReader in=null;
      String line=null;
      try {
        in=new BufferedReader(new FileReader(getSettingsProblemFile()));
        while ((line=in.readLine()) != null) {
          if (line.contains("String_Node_Str"))           continue;
          pw.println(line);
        }
      }
 catch (      IOException ignored) {
      }
 finally {
        IoUtils.closeQuietly(in);
      }
    }
    if (checkin && dumpState.isDumping(DumpState.DUMP_MESSAGES)) {
      BufferedReader in=null;
      String line=null;
      try {
        in=new BufferedReader(new FileReader(getSettingsProblemFile()));
        while ((line=in.readLine()) != null) {
          if (line.contains("String_Node_Str"))           continue;
          pw.print("String_Node_Str");
          pw.println(line);
        }
      }
 catch (      IOException ignored) {
      }
 finally {
        IoUtils.closeQuietly(in);
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void dump(FileDescriptor fd,PrintWriter pw,String[] args){
  if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) {
    pw.println("String_Node_Str" + Binder.getCallingPid() + "String_Node_Str"+ Binder.getCallingUid()+ "String_Node_Str"+ android.Manifest.permission.DUMP);
    return;
  }
  DumpState dumpState=new DumpState();
  boolean fullPreferred=false;
  boolean checkin=false;
  String packageName=null;
  ArraySet<String> permissionNames=null;
  int opti=0;
  while (opti < args.length) {
    String opt=args[opti];
    if (opt == null || opt.length() <= 0 || opt.charAt(0) != '-') {
      break;
    }
    opti++;
    if ("String_Node_Str".equals(opt)) {
    }
 else     if ("String_Node_Str".equals(opt)) {
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      pw.println("String_Node_Str");
      return;
    }
 else     if ("String_Node_Str".equals(opt)) {
      checkin=true;
    }
 else     if ("String_Node_Str".equals(opt)) {
      dumpState.setOptionEnabled(DumpState.OPTION_SHOW_FILTERS);
    }
 else {
      pw.println("String_Node_Str" + opt + "String_Node_Str");
    }
  }
  if (opti < args.length) {
    String cmd=args[opti];
    opti++;
    if ("String_Node_Str".equals(cmd) || cmd.contains("String_Node_Str")) {
      packageName=cmd;
      dumpState.setOptionEnabled(DumpState.OPTION_SHOW_FILTERS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      if (opti >= args.length) {
        pw.println("String_Node_Str");
        return;
      }
      String perm=args[opti];
      opti++;
      if (opti >= args.length) {
        pw.println("String_Node_Str");
        return;
      }
      String pkg=args[opti];
      opti++;
      int user=UserHandle.getUserId(Binder.getCallingUid());
      if (opti < args.length) {
        try {
          user=Integer.parseInt(args[opti]);
        }
 catch (        NumberFormatException e) {
          pw.println("String_Node_Str" + args[opti]);
          return;
        }
      }
      pw.println(checkPermission(perm,pkg,user));
      return;
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_LIBS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_FEATURES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_RESOLVERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PERMISSIONS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      if (opti >= args.length) {
        pw.println("String_Node_Str");
        return;
      }
      permissionNames=new ArraySet<>();
      while (opti < args.length) {
        permissionNames.add(args[opti]);
        opti++;
      }
      dumpState.setDump(DumpState.DUMP_PERMISSIONS | DumpState.DUMP_PACKAGES | DumpState.DUMP_SHARED_USERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PREFERRED);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PREFERRED_XML);
      if (opti < args.length && "String_Node_Str".equals(args[opti])) {
        fullPreferred=true;
        opti++;
      }
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_DOMAIN_PREFERRED);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PACKAGES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_SHARED_USERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_PROVIDERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_MESSAGES);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_VERIFIERS);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_INTENT_FILTER_VERIFIERS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_VERSION);
    }
 else     if ("String_Node_Str".equals(cmd) || "String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_KEYSETS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_INSTALLS);
    }
 else     if ("String_Node_Str".equals(cmd)) {
synchronized (mPackages) {
        mSettings.writeLPr();
        pw.println("String_Node_Str");
        return;
      }
    }
  }
  if (checkin) {
    pw.println("String_Node_Str");
  }
synchronized (mPackages) {
    if (dumpState.isDumping(DumpState.DUMP_VERSION) && packageName == null) {
      if (!checkin) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        mSettings.dumpVersionLPr(new IndentingPrintWriter(pw,"String_Node_Str"));
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_VERIFIERS) && packageName == null) {
      if (!checkin) {
        if (dumpState.onTitlePrinted())         pw.println();
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mRequiredVerifierPackage);
        pw.print("String_Node_Str");
        pw.print(getPackageUid(mRequiredVerifierPackage,0));
        pw.println("String_Node_Str");
      }
 else       if (mRequiredVerifierPackage != null) {
        pw.print("String_Node_Str");
        pw.print(mRequiredVerifierPackage);
        pw.print("String_Node_Str");
        pw.println(getPackageUid(mRequiredVerifierPackage,0));
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_INTENT_FILTER_VERIFIERS) && packageName == null) {
      if (mIntentFilterVerifierComponent != null) {
        String verifierPackageName=mIntentFilterVerifierComponent.getPackageName();
        if (!checkin) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          pw.print("String_Node_Str");
          pw.print(verifierPackageName);
          pw.print("String_Node_Str");
          pw.print(getPackageUid(verifierPackageName,0));
          pw.println("String_Node_Str");
        }
 else         if (verifierPackageName != null) {
          pw.print("String_Node_Str");
          pw.print(verifierPackageName);
          pw.print("String_Node_Str");
          pw.println(getPackageUid(verifierPackageName,0));
        }
      }
 else {
        pw.println();
        pw.println("String_Node_Str");
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_LIBS) && packageName == null) {
      boolean printedHeader=false;
      final Iterator<String> it=mSharedLibraries.keySet().iterator();
      while (it.hasNext()) {
        String name=it.next();
        SharedLibraryEntry ent=mSharedLibraries.get(name);
        if (!checkin) {
          if (!printedHeader) {
            if (dumpState.onTitlePrinted())             pw.println();
            pw.println("String_Node_Str");
            printedHeader=true;
          }
          pw.print("String_Node_Str");
        }
 else {
          pw.print("String_Node_Str");
        }
        pw.print(name);
        if (!checkin) {
          pw.print("String_Node_Str");
        }
        if (ent.path != null) {
          if (!checkin) {
            pw.print("String_Node_Str");
            pw.print(ent.path);
          }
 else {
            pw.print("String_Node_Str");
            pw.print(ent.path);
          }
        }
 else {
          if (!checkin) {
            pw.print("String_Node_Str");
            pw.print(ent.apk);
          }
 else {
            pw.print("String_Node_Str");
            pw.print(ent.apk);
          }
        }
        pw.println();
      }
    }
    if (dumpState.isDumping(DumpState.DUMP_FEATURES) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      if (!checkin) {
        pw.println("String_Node_Str");
      }
      Iterator<String> it=mAvailableFeatures.keySet().iterator();
      while (it.hasNext()) {
        String name=it.next();
        if (!checkin) {
          pw.print("String_Node_Str");
        }
 else {
          pw.print("String_Node_Str");
        }
        pw.println(name);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_RESOLVERS)) {
      if (mActivities.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mReceivers.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mServices.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
      if (mProviders.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" : "String_Node_Str","String_Node_Str",packageName,dumpState.isOptionEnabled(DumpState.OPTION_SHOW_FILTERS),true)) {
        dumpState.setTitlePrinted(true);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED)) {
      for (int i=0; i < mSettings.mPreferredActivities.size(); i++) {
        PreferredIntentResolver pir=mSettings.mPreferredActivities.valueAt(i);
        int user=mSettings.mPreferredActivities.keyAt(i);
        if (pir.dump(pw,dumpState.getTitlePrinted() ? "String_Node_Str" + user + "String_Node_Str" : "String_Node_Str" + user + "String_Node_Str","String_Node_Str",packageName,true,false)) {
          dumpState.setTitlePrinted(true);
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED_XML)) {
      pw.flush();
      FileOutputStream fout=new FileOutputStream(fd);
      BufferedOutputStream str=new BufferedOutputStream(fout);
      XmlSerializer serializer=new FastXmlSerializer();
      try {
        serializer.setOutput(str,StandardCharsets.UTF_8.name());
        serializer.startDocument(null,true);
        serializer.setFeature("String_Node_Str",true);
        mSettings.writePreferredActivitiesLPr(serializer,0,fullPreferred);
        serializer.endDocument();
        serializer.flush();
      }
 catch (      IllegalArgumentException e) {
        pw.println("String_Node_Str" + e);
      }
catch (      IllegalStateException e) {
        pw.println("String_Node_Str" + e);
      }
catch (      IOException e) {
        pw.println("String_Node_Str" + e);
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_DOMAIN_PREFERRED) && packageName == null) {
      pw.println();
      int count=mSettings.mPackages.size();
      if (count == 0) {
        pw.println("String_Node_Str");
        pw.println();
      }
 else {
        final String prefix="String_Node_Str";
        Collection<PackageSetting> allPackageSettings=mSettings.mPackages.values();
        if (allPackageSettings.size() == 0) {
          pw.println("String_Node_Str");
          pw.println();
        }
 else {
          pw.println("String_Node_Str");
          pw.println();
          count=0;
          for (          PackageSetting ps : allPackageSettings) {
            IntentFilterVerificationInfo ivi=ps.getIntentFilterVerificationInfo();
            if (ivi == null || ivi.getPackageName() == null)             continue;
            pw.println(prefix + "String_Node_Str" + ivi.getPackageName());
            pw.println(prefix + "String_Node_Str" + ivi.getDomainsString());
            pw.println(prefix + "String_Node_Str" + ivi.getStatusString());
            pw.println();
            count++;
          }
          if (count == 0) {
            pw.println(prefix + "String_Node_Str");
            pw.println();
          }
          for (          int userId : sUserManager.getUserIds()) {
            pw.println("String_Node_Str" + userId + "String_Node_Str");
            pw.println();
            count=0;
            for (            PackageSetting ps : allPackageSettings) {
              final long status=ps.getDomainVerificationStatusForUser(userId);
              if (status >> 32 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED) {
                continue;
              }
              pw.println(prefix + "String_Node_Str" + ps.name);
              pw.println(prefix + "String_Node_Str" + dumpDomainString(ps.name));
              String statusStr=IntentFilterVerificationInfo.getStatusStringFromValue(status);
              pw.println(prefix + "String_Node_Str" + statusStr);
              pw.println();
              count++;
            }
            if (count == 0) {
              pw.println(prefix + "String_Node_Str");
              pw.println();
            }
          }
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PERMISSIONS)) {
      mSettings.dumpPermissionsLPr(pw,packageName,permissionNames,dumpState);
      if (packageName == null && permissionNames == null) {
        for (int iperm=0; iperm < mAppOpPermissionPackages.size(); iperm++) {
          if (iperm == 0) {
            if (dumpState.onTitlePrinted())             pw.println();
            pw.println("String_Node_Str");
          }
          pw.print("String_Node_Str");
          pw.print(mAppOpPermissionPackages.keyAt(iperm));
          pw.println("String_Node_Str");
          ArraySet<String> pkgs=mAppOpPermissionPackages.valueAt(iperm);
          for (int ipkg=0; ipkg < pkgs.size(); ipkg++) {
            pw.print("String_Node_Str");
            pw.println(pkgs.valueAt(ipkg));
          }
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_PROVIDERS)) {
      boolean printedSomething=false;
      for (      PackageParser.Provider p : mProviders.mProviders.values()) {
        if (packageName != null && !packageName.equals(p.info.packageName)) {
          continue;
        }
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
        p.printComponentShortName(pw);
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.println(p.toString());
      }
      printedSomething=false;
      for (      Map.Entry<String,PackageParser.Provider> entry : mProvidersByAuthority.entrySet()) {
        PackageParser.Provider p=entry.getValue();
        if (packageName != null && !packageName.equals(p.info.packageName)) {
          continue;
        }
        if (!printedSomething) {
          if (dumpState.onTitlePrinted())           pw.println();
          pw.println("String_Node_Str");
          printedSomething=true;
        }
        pw.print("String_Node_Str");
        pw.print(entry.getKey());
        pw.println("String_Node_Str");
        pw.print("String_Node_Str");
        pw.println(p.toString());
        if (p.info != null && p.info.applicationInfo != null) {
          final String appInfo=p.info.applicationInfo.toString();
          pw.print("String_Node_Str");
          pw.println(appInfo);
        }
      }
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_KEYSETS)) {
      mSettings.mKeySetManagerService.dumpLPr(pw,packageName,dumpState);
    }
    if (dumpState.isDumping(DumpState.DUMP_PACKAGES)) {
      mSettings.dumpPackagesLPr(pw,packageName,permissionNames,dumpState,checkin);
    }
    if (dumpState.isDumping(DumpState.DUMP_SHARED_USERS)) {
      mSettings.dumpSharedUsersLPr(pw,packageName,permissionNames,dumpState,checkin);
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      mInstallerService.dump(new IndentingPrintWriter(pw,"String_Node_Str",120));
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_MESSAGES) && packageName == null) {
      if (dumpState.onTitlePrinted())       pw.println();
      mSettings.dumpReadMessagesLPr(pw,dumpState);
      pw.println();
      pw.println("String_Node_Str");
      BufferedReader in=null;
      String line=null;
      try {
        in=new BufferedReader(new FileReader(getSettingsProblemFile()));
        while ((line=in.readLine()) != null) {
          if (line.contains("String_Node_Str"))           continue;
          pw.println(line);
        }
      }
 catch (      IOException ignored) {
      }
 finally {
        IoUtils.closeQuietly(in);
      }
    }
    if (checkin && dumpState.isDumping(DumpState.DUMP_MESSAGES)) {
      BufferedReader in=null;
      String line=null;
      try {
        in=new BufferedReader(new FileReader(getSettingsProblemFile()));
        while ((line=in.readLine()) != null) {
          if (line.contains("String_Node_Str"))           continue;
          pw.print("String_Node_Str");
          pw.println(line);
        }
      }
 catch (      IOException ignored) {
      }
 finally {
        IoUtils.closeQuietly(in);
      }
    }
  }
}