Program: 197253
Project: 197253
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;
  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");
      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) || "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_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)) {
      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)) {
synchronized (mPackages) {
        mSettings.writeLPr();
        pw.println("String_Node_Str");
        return;
      }
    }
 else     if ("String_Node_Str".equals(cmd)) {
      dumpState.setDump(DumpState.DUMP_INSTALLS);
    }
  }
  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");
        pw.print("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mSettings.mInternalSdkPlatform);
        pw.print("String_Node_Str");
        pw.println(mSettings.mExternalSdkPlatform);
        pw.print("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mSettings.mInternalDatabaseVersion);
        pw.print("String_Node_Str");
        pw.println(mSettings.mExternalDatabaseVersion);
      }
    }
    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_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))) {
        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))) {
        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))) {
        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))) {
        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)) {
          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,"String_Node_Str");
        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_PERMISSIONS)) {
      mSettings.dumpPermissionsLPr(pw,packageName,dumpState);
      if (packageName == 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,dumpState,checkin);
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_SHARED_USERS)) {
      mSettings.dumpSharedUsersLPr(pw,packageName,dumpState);
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS)) {
      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");
      final File fname=getSettingsProblemFile();
      FileInputStream in=null;
      try {
        in=new FileInputStream(fname);
        final int avail=in.available();
        final byte[] data=new byte[avail];
        in.read(data);
        pw.print(new String(data));
      }
 catch (      FileNotFoundException e) {
      }
catch (      IOException e) {
      }
 finally {
        if (in != null) {
          try {
            in.close();
          }
 catch (          IOException e) {
          }
        }
      }
    }
  }
}

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;
  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");
      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) || "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_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)) {
      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");
        pw.print("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mSettings.mInternalSdkPlatform);
        pw.print("String_Node_Str");
        pw.println(mSettings.mExternalSdkPlatform);
        pw.print("String_Node_Str");
        pw.print("String_Node_Str");
        pw.print(mSettings.mInternalDatabaseVersion);
        pw.print("String_Node_Str");
        pw.println(mSettings.mExternalDatabaseVersion);
      }
    }
    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_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))) {
        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))) {
        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))) {
        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))) {
        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)) {
          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,"String_Node_Str");
        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_PERMISSIONS)) {
      mSettings.dumpPermissionsLPr(pw,packageName,dumpState);
      if (packageName == 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,dumpState,checkin);
    }
    if (!checkin && dumpState.isDumping(DumpState.DUMP_SHARED_USERS)) {
      mSettings.dumpSharedUsersLPr(pw,packageName,dumpState);
    }
    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");
      final File fname=getSettingsProblemFile();
      FileInputStream in=null;
      try {
        in=new FileInputStream(fname);
        final int avail=in.available();
        final byte[] data=new byte[avail];
        in.read(data);
        pw.print(new String(data));
      }
 catch (      FileNotFoundException e) {
      }
catch (      IOException e) {
      }
 finally {
        if (in != null) {
          try {
            in.close();
          }
 catch (          IOException e) {
          }
        }
      }
    }
  }
}