Program: 193556
Project: 193556
Buggy source:
private void readConfigFileLocked(XmlPullParser parser){
  final PackageManager pm=getContext().getPackageManager();
  try {
    int type;
    while ((type=parser.next()) != XmlPullParser.START_TAG && type != XmlPullParser.END_DOCUMENT) {
      ;
    }
    if (type != XmlPullParser.START_TAG) {
      throw new IllegalStateException("String_Node_Str");
    }
    int outerDepth=parser.getDepth();
    while ((type=parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
      if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
        continue;
      }
      String tagName=parser.getName();
      if (tagName.equals("String_Node_Str")) {
        String name=parser.getAttributeValue(null,"String_Node_Str");
        if (name != null) {
          try {
            ApplicationInfo ai=pm.getApplicationInfo(name,0);
            mPowerSaveWhitelistUserApps.put(ai.packageName,UserHandle.getAppId(ai.uid));
          }
 catch (          PackageManager.NameNotFoundException e) {
          }
        }
      }
 else {
        Slog.w(TAG,"String_Node_Str" + parser.getName());
        XmlUtils.skipCurrentTag(parser);
      }
    }
  }
 catch (  IllegalStateException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  NullPointerException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  NumberFormatException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  XmlPullParserException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  IOException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  IndexOutOfBoundsException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
}

Fixed version (ground truth):
private void readConfigFileLocked(XmlPullParser parser){
  final PackageManager pm=getContext().getPackageManager();
  try {
    int type;
    while ((type=parser.next()) != XmlPullParser.START_TAG && type != XmlPullParser.END_DOCUMENT) {
      ;
    }
    if (type != XmlPullParser.START_TAG) {
      throw new IllegalStateException("String_Node_Str");
    }
    int outerDepth=parser.getDepth();
    while ((type=parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
      if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
        continue;
      }
      String tagName=parser.getName();
      if (tagName.equals("String_Node_Str")) {
        String name=parser.getAttributeValue(null,"String_Node_Str");
        if (name != null) {
          try {
            ApplicationInfo ai=pm.getApplicationInfo(name,PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
            mPowerSaveWhitelistUserApps.put(ai.packageName,UserHandle.getAppId(ai.uid));
          }
 catch (          PackageManager.NameNotFoundException e) {
          }
        }
      }
 else {
        Slog.w(TAG,"String_Node_Str" + parser.getName());
        XmlUtils.skipCurrentTag(parser);
      }
    }
  }
 catch (  IllegalStateException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  NullPointerException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  NumberFormatException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  XmlPullParserException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  IOException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
catch (  IndexOutOfBoundsException e) {
    Slog.w(TAG,"String_Node_Str" + e);
  }
}