Program: 195880
Project: 195880
Buggy source:
private Provider parseProvider(Package owner,Resources res,XmlPullParser parser,AttributeSet attrs,int flags,String[] outError) throws XmlPullParserException, IOException {
  TypedArray sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestProvider);
  if (mParseProviderArgs == null) {
    mParseProviderArgs=new ParseComponentArgs(owner,outError,com.android.internal.R.styleable.AndroidManifestProvider_name,com.android.internal.R.styleable.AndroidManifestProvider_label,com.android.internal.R.styleable.AndroidManifestProvider_icon,com.android.internal.R.styleable.AndroidManifestProvider_logo,com.android.internal.R.styleable.AndroidManifestProvider_banner,mSeparateProcesses,com.android.internal.R.styleable.AndroidManifestProvider_process,com.android.internal.R.styleable.AndroidManifestProvider_description,com.android.internal.R.styleable.AndroidManifestProvider_enabled);
    mParseProviderArgs.tag="String_Node_Str";
  }
  mParseProviderArgs.sa=sa;
  mParseProviderArgs.flags=flags;
  Provider p=new Provider(mParseProviderArgs,new ProviderInfo());
  if (outError[0] != null) {
    sa.recycle();
    return null;
  }
  boolean providerExportedDefault=false;
  if (owner.applicationInfo.targetSdkVersion < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    providerExportedDefault=true;
  }
  p.info.exported=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_exported,providerExportedDefault);
  String cpname=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_authorities,0);
  p.info.isSyncable=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_syncable,false);
  String permission=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_permission,0);
  String str=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_readPermission,0);
  if (str == null) {
    str=permission;
  }
  if (str == null) {
    p.info.readPermission=owner.applicationInfo.permission;
  }
 else {
    p.info.readPermission=str.length() > 0 ? str.toString().intern() : null;
  }
  str=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_writePermission,0);
  if (str == null) {
    str=permission;
  }
  if (str == null) {
    p.info.writePermission=owner.applicationInfo.permission;
  }
 else {
    p.info.writePermission=str.length() > 0 ? str.toString().intern() : null;
  }
  p.info.grantUriPermissions=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_grantUriPermissions,false);
  p.info.multiprocess=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_multiprocess,false);
  p.info.initOrder=sa.getInt(com.android.internal.R.styleable.AndroidManifestProvider_initOrder,0);
  p.info.flags=0;
  if (sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_singleUser,false)) {
    p.info.flags|=ProviderInfo.FLAG_SINGLE_USER;
    if (p.info.exported && (flags & PARSE_IS_PRIVILEGED) == 0) {
      Slog.w(TAG,"String_Node_Str" + p.className + "String_Node_Str"+ mArchiveSourcePath+ "String_Node_Str"+ parser.getPositionDescription());
      p.info.exported=false;
    }
  }
  sa.recycle();
  if ((owner.applicationInfo.flags & ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
    if (p.info.processName == owner.packageName) {
      outError[0]="String_Node_Str";
      return null;
    }
  }
  if (cpname == null) {
    outError[0]="String_Node_Str";
    return null;
  }
  p.info.authority=cpname.intern();
  if (!parseProviderTags(res,parser,attrs,p,outError)) {
    return null;
  }
  return p;
}

Fixed version (ground truth):
private Provider parseProvider(Package owner,Resources res,XmlPullParser parser,AttributeSet attrs,int flags,String[] outError) throws XmlPullParserException, IOException {
  TypedArray sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestProvider);
  if (mParseProviderArgs == null) {
    mParseProviderArgs=new ParseComponentArgs(owner,outError,com.android.internal.R.styleable.AndroidManifestProvider_name,com.android.internal.R.styleable.AndroidManifestProvider_label,com.android.internal.R.styleable.AndroidManifestProvider_icon,com.android.internal.R.styleable.AndroidManifestProvider_logo,com.android.internal.R.styleable.AndroidManifestProvider_banner,mSeparateProcesses,com.android.internal.R.styleable.AndroidManifestProvider_process,com.android.internal.R.styleable.AndroidManifestProvider_description,com.android.internal.R.styleable.AndroidManifestProvider_enabled);
    mParseProviderArgs.tag="String_Node_Str";
  }
  mParseProviderArgs.sa=sa;
  mParseProviderArgs.flags=flags;
  Provider p=new Provider(mParseProviderArgs,new ProviderInfo());
  if (outError[0] != null) {
    sa.recycle();
    return null;
  }
  boolean providerExportedDefault=false;
  if (owner.applicationInfo.targetSdkVersion < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    providerExportedDefault=true;
  }
  p.info.exported=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_exported,providerExportedDefault);
  String cpname=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_authorities,0);
  p.info.isSyncable=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_syncable,false);
  String permission=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_permission,0);
  String str=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_readPermission,0);
  if (str == null) {
    str=permission;
  }
  if (str == null) {
    p.info.readPermission=owner.applicationInfo.permission;
  }
 else {
    p.info.readPermission=str.length() > 0 ? str.toString().intern() : null;
  }
  str=sa.getNonConfigurationString(com.android.internal.R.styleable.AndroidManifestProvider_writePermission,0);
  if (str == null) {
    str=permission;
  }
  if (str == null) {
    p.info.writePermission=owner.applicationInfo.permission;
  }
 else {
    p.info.writePermission=str.length() > 0 ? str.toString().intern() : null;
  }
  p.info.grantUriPermissions=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_grantUriPermissions,false);
  p.info.multiprocess=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_multiprocess,false);
  p.info.initOrder=sa.getInt(com.android.internal.R.styleable.AndroidManifestProvider_initOrder,0);
  p.info.flags=0;
  if (sa.getBoolean(com.android.internal.R.styleable.AndroidManifestProvider_singleUser,false)) {
    p.info.flags|=ProviderInfo.FLAG_SINGLE_USER;
    if (p.info.exported && (flags & PARSE_IS_PRIVILEGED) == 0) {
      Slog.w(TAG,"String_Node_Str" + p.className + "String_Node_Str"+ mArchiveSourcePath+ "String_Node_Str"+ parser.getPositionDescription());
      p.info.exported=false;
    }
  }
  sa.recycle();
  if ((owner.applicationInfo.flags & ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
    if (p.info.processName == owner.packageName) {
      outError[0]="String_Node_Str";
      return null;
    }
  }
  if (cpname == null) {
    outError[0]="String_Node_Str";
    return null;
  }
  if (cpname.length() <= 0) {
    outError[0]="String_Node_Str";
    return null;
  }
  p.info.authority=cpname.intern();
  if (!parseProviderTags(res,parser,attrs,p,outError)) {
    return null;
  }
  return p;
}