Program: 43053
Project: 43053
Buggy source:
private boolean parseIntent(Resources res,XmlPullParser parser,AttributeSet attrs,int flags,IntentInfo outInfo,String[] outError,boolean isActivity) throws XmlPullParserException, IOException {
  TypedArray sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestIntentFilter);
  int priority=sa.getInt(com.android.internal.R.styleable.AndroidManifestIntentFilter_priority,0);
  if (priority > 0 && isActivity && (flags & PARSE_IS_SYSTEM) == 0) {
    Log.w(TAG,"String_Node_Str" + parser.getPositionDescription());
    priority=0;
  }
  outInfo.setPriority(priority);
  TypedValue v=sa.peekValue(com.android.internal.R.styleable.AndroidManifestIntentFilter_label);
  if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
    outInfo.nonLocalizedLabel=v.coerceToString();
  }
  outInfo.icon=sa.getResourceId(com.android.internal.R.styleable.AndroidManifestIntentFilter_icon,0);
  sa.recycle();
  int outerDepth=parser.getDepth();
  int type;
  while ((type=parser.next()) != parser.END_DOCUMENT && (type != parser.END_TAG || parser.getDepth() > outerDepth)) {
    if (type == parser.END_TAG || type == parser.TEXT) {
      continue;
    }
    String nodeName=parser.getName();
    if (nodeName.equals("String_Node_Str")) {
      String value=attrs.getAttributeValue(ANDROID_RESOURCES,"String_Node_Str");
      if (value == null || value == "String_Node_Str") {
        outError[0]="String_Node_Str";
        return false;
      }
      XmlUtils.skipCurrentTag(parser);
      outInfo.addAction(value);
    }
 else     if (nodeName.equals("String_Node_Str")) {
      String value=attrs.getAttributeValue(ANDROID_RESOURCES,"String_Node_Str");
      if (value == null || value == "String_Node_Str") {
        outError[0]="String_Node_Str";
        return false;
      }
      XmlUtils.skipCurrentTag(parser);
      outInfo.addCategory(value);
    }
 else     if (nodeName.equals("String_Node_Str")) {
      sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestData);
      String str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_mimeType);
      if (str != null) {
        try {
          outInfo.addDataType(str);
        }
 catch (        IntentFilter.MalformedMimeTypeException e) {
          outError[0]=e.toString();
          sa.recycle();
          return false;
        }
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_scheme);
      if (str != null) {
        outInfo.addDataScheme(str);
      }
      String host=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_host);
      String port=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_port);
      if (host != null) {
        outInfo.addDataAuthority(host,port);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_path);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_LITERAL);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_pathPrefix);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_PREFIX);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_pathPattern);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_SIMPLE_GLOB);
      }
      sa.recycle();
      XmlUtils.skipCurrentTag(parser);
    }
 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);
    }
 else {
      outError[0]="String_Node_Str" + parser.getName();
      return false;
    }
  }
  outInfo.hasDefault=outInfo.hasCategory(Intent.CATEGORY_DEFAULT);
  if (false) {
    String cats="String_Node_Str";
    Iterator<String> it=outInfo.categoriesIterator();
    while (it != null && it.hasNext()) {
      cats+="String_Node_Str" + it.next();
    }
    System.out.println("String_Node_Str" + outInfo.hasDefault + "String_Node_Str"+ cats);
  }
  return true;
}

Fixed version (ground truth):
private boolean parseIntent(Resources res,XmlPullParser parser,AttributeSet attrs,int flags,IntentInfo outInfo,String[] outError,boolean isActivity) throws XmlPullParserException, IOException {
  TypedArray sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestIntentFilter);
  int priority=sa.getInt(com.android.internal.R.styleable.AndroidManifestIntentFilter_priority,0);
  if (priority > 0 && isActivity && (flags & PARSE_IS_SYSTEM) == 0) {
    Log.w(TAG,"String_Node_Str" + mArchiveSourcePath + "String_Node_Str"+ parser.getPositionDescription());
    priority=0;
  }
  outInfo.setPriority(priority);
  TypedValue v=sa.peekValue(com.android.internal.R.styleable.AndroidManifestIntentFilter_label);
  if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
    outInfo.nonLocalizedLabel=v.coerceToString();
  }
  outInfo.icon=sa.getResourceId(com.android.internal.R.styleable.AndroidManifestIntentFilter_icon,0);
  sa.recycle();
  int outerDepth=parser.getDepth();
  int type;
  while ((type=parser.next()) != parser.END_DOCUMENT && (type != parser.END_TAG || parser.getDepth() > outerDepth)) {
    if (type == parser.END_TAG || type == parser.TEXT) {
      continue;
    }
    String nodeName=parser.getName();
    if (nodeName.equals("String_Node_Str")) {
      String value=attrs.getAttributeValue(ANDROID_RESOURCES,"String_Node_Str");
      if (value == null || value == "String_Node_Str") {
        outError[0]="String_Node_Str";
        return false;
      }
      XmlUtils.skipCurrentTag(parser);
      outInfo.addAction(value);
    }
 else     if (nodeName.equals("String_Node_Str")) {
      String value=attrs.getAttributeValue(ANDROID_RESOURCES,"String_Node_Str");
      if (value == null || value == "String_Node_Str") {
        outError[0]="String_Node_Str";
        return false;
      }
      XmlUtils.skipCurrentTag(parser);
      outInfo.addCategory(value);
    }
 else     if (nodeName.equals("String_Node_Str")) {
      sa=res.obtainAttributes(attrs,com.android.internal.R.styleable.AndroidManifestData);
      String str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_mimeType);
      if (str != null) {
        try {
          outInfo.addDataType(str);
        }
 catch (        IntentFilter.MalformedMimeTypeException e) {
          outError[0]=e.toString();
          sa.recycle();
          return false;
        }
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_scheme);
      if (str != null) {
        outInfo.addDataScheme(str);
      }
      String host=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_host);
      String port=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_port);
      if (host != null) {
        outInfo.addDataAuthority(host,port);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_path);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_LITERAL);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_pathPrefix);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_PREFIX);
      }
      str=sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestData_pathPattern);
      if (str != null) {
        outInfo.addDataPath(str,PatternMatcher.PATTERN_SIMPLE_GLOB);
      }
      sa.recycle();
      XmlUtils.skipCurrentTag(parser);
    }
 else     if (!RIGID_PARSER) {
      Log.w(TAG,"String_Node_Str" + parser.getName() + "String_Node_Str"+ mArchiveSourcePath+ "String_Node_Str"+ parser.getPositionDescription());
      XmlUtils.skipCurrentTag(parser);
    }
 else {
      outError[0]="String_Node_Str" + parser.getName();
      return false;
    }
  }
  outInfo.hasDefault=outInfo.hasCategory(Intent.CATEGORY_DEFAULT);
  if (false) {
    String cats="String_Node_Str";
    Iterator<String> it=outInfo.categoriesIterator();
    while (it != null && it.hasNext()) {
      cats+="String_Node_Str" + it.next();
    }
    System.out.println("String_Node_Str" + outInfo.hasDefault + "String_Node_Str"+ cats);
  }
  return true;
}