Program: 23653
Project: 23653
Buggy source:
private Service parseService(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.AndroidManifestService);
  if (mParseServiceArgs == null) {
    mParseServiceArgs=new ParseComponentArgs(owner,outError,com.android.internal.R.styleable.AndroidManifestService_name,com.android.internal.R.styleable.AndroidManifestService_label,com.android.internal.R.styleable.AndroidManifestService_icon,mSeparateProcesses,com.android.internal.R.styleable.AndroidManifestService_process,com.android.internal.R.styleable.AndroidManifestService_enabled);
    mParseServiceArgs.tag="String_Node_Str";
  }
  mParseServiceArgs.sa=sa;
  mParseServiceArgs.flags=flags;
  Service s=new Service(mParseServiceArgs,new ServiceInfo());
  if (outError[0] != null) {
    sa.recycle();
    return null;
  }
  final boolean setExported=sa.hasValue(com.android.internal.R.styleable.AndroidManifestService_exported);
  if (setExported) {
    s.info.exported=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestService_exported,false);
  }
  String str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestService_permission);
  if (str == null) {
    s.info.permission=owner.applicationInfo.permission;
  }
 else {
    s.info.permission=str.length() > 0 ? str.toString().intern() : null;
  }
  sa.recycle();
  int outerDepth=parser.getDepth();
  int type;
  while ((type=parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
    if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
      continue;
    }
    if (parser.getName().equals("String_Node_Str")) {
      ServiceIntentInfo intent=new ServiceIntentInfo(s);
      if (!parseIntent(res,parser,attrs,flags,intent,outError,false)) {
        return null;
      }
      s.intents.add(intent);
    }
 else     if (parser.getName().equals("String_Node_Str")) {
      if ((s.metaData=parseMetaData(res,parser,attrs,s.metaData,outError)) == null) {
        return null;
      }
    }
 else {
      if (!RIGID_PARSER) {
        Log.w(TAG,"String_Node_Str" + mArchiveSourcePath + "String_Node_Str");
        Log.w(TAG,"String_Node_Str" + parser.getName());
        XmlUtils.skipCurrentTag(parser);
        continue;
      }
      outError[0]="String_Node_Str" + parser.getName();
      return null;
    }
  }
  if (!setExported) {
    s.info.exported=s.intents.size() > 0;
  }
  return s;
}

Fixed version (ground truth):
private Service parseService(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.AndroidManifestService);
  if (mParseServiceArgs == null) {
    mParseServiceArgs=new ParseComponentArgs(owner,outError,com.android.internal.R.styleable.AndroidManifestService_name,com.android.internal.R.styleable.AndroidManifestService_label,com.android.internal.R.styleable.AndroidManifestService_icon,mSeparateProcesses,com.android.internal.R.styleable.AndroidManifestService_process,com.android.internal.R.styleable.AndroidManifestService_enabled);
    mParseServiceArgs.tag="String_Node_Str";
  }
  mParseServiceArgs.sa=sa;
  mParseServiceArgs.flags=flags;
  Service s=new Service(mParseServiceArgs,new ServiceInfo());
  if (outError[0] != null) {
    sa.recycle();
    return null;
  }
  final boolean setExported=sa.hasValue(com.android.internal.R.styleable.AndroidManifestService_exported);
  if (setExported) {
    s.info.exported=sa.getBoolean(com.android.internal.R.styleable.AndroidManifestService_exported,false);
  }
  String str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestService_permission);
  if (str == null) {
    s.info.permission=owner.applicationInfo.permission;
  }
 else {
    s.info.permission=str.length() > 0 ? str.toString().intern() : null;
  }
  sa.recycle();
  int outerDepth=parser.getDepth();
  int type;
  while ((type=parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
    if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
      continue;
    }
    if (parser.getName().equals("String_Node_Str")) {
      ServiceIntentInfo intent=new ServiceIntentInfo(s);
      if (!parseIntent(res,parser,attrs,flags,intent,outError,false)) {
        return null;
      }
      s.intents.add(intent);
    }
 else     if (parser.getName().equals("String_Node_Str")) {
      if ((s.metaData=parseMetaData(res,parser,attrs,s.metaData,outError)) == null) {
        return null;
      }
    }
 else {
      if (!RIGID_PARSER) {
        Log.w(TAG,"String_Node_Str" + parser.getName() + "String_Node_Str"+ mArchiveSourcePath+ "String_Node_Str"+ parser.getPositionDescription());
        XmlUtils.skipCurrentTag(parser);
        continue;
      }
      outError[0]="String_Node_Str" + parser.getName();
      return null;
    }
  }
  if (!setExported) {
    s.info.exported=s.intents.size() > 0;
  }
  return s;
}