Program: 41388
Project: 41388
Buggy source:
/** 
 * Inflate a new view hierarchy from the specified XML node. Throws  {@link InflateException} if there is an error.<p> <em><strong>Important</strong></em>&nbsp;&nbsp;&nbsp;For performance reasons, view inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime.
 * @param parser XML dom node containing the description of the viewhierarchy.
 * @param root Optional view to be the parent of the generated hierarchy (if<em>attachToRoot</em> is true), or else simply an object that provides a set of LayoutParams values for root of the returned hierarchy (if <em>attachToRoot</em> is false.)
 * @param attachToRoot Whether the inflated hierarchy should be attached tothe root parameter? If false, root is only used to create the correct subclass of LayoutParams for the root view in the XML.
 * @return The root View of the inflated hierarchy. If root was supplied andattachToRoot is true, this is root; otherwise it is the root of the inflated XML file.
 */
public View inflate(XmlPullParser parser,ViewGroup root,boolean attachToRoot){
synchronized (mConstructorArgs) {
    final AttributeSet attrs=Xml.asAttributeSet(parser);
    mConstructorArgs[0]=mContext;
    View result=root;
    try {
      int type;
      while ((type=parser.next()) != XmlPullParser.START_TAG && type != XmlPullParser.END_DOCUMENT) {
      }
      if (type != XmlPullParser.START_TAG) {
        throw new InflateException(parser.getPositionDescription() + "String_Node_Str");
      }
      final String name=parser.getName();
      if (DEBUG) {
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str" + name);
        System.out.println("String_Node_Str");
      }
      if (TAG_MERGE.equals(name)) {
        if (root == null || !attachToRoot) {
          throw new InflateException("String_Node_Str" + "String_Node_Str");
        }
        rInflate(parser,root,attrs);
      }
 else {
        View temp=createViewFromTag(name,attrs);
        ViewGroup.LayoutParams params=null;
        if (root != null) {
          if (DEBUG) {
            System.out.println("String_Node_Str" + root);
          }
          params=root.generateLayoutParams(attrs);
          if (!attachToRoot) {
            temp.setLayoutParams(params);
          }
        }
        if (DEBUG) {
          System.out.println("String_Node_Str");
        }
        rInflate(parser,temp,attrs);
        if (DEBUG) {
          System.out.println("String_Node_Str");
        }
        if (root != null && attachToRoot) {
          root.addView(temp,params);
        }
        if (root == null || !attachToRoot) {
          result=temp;
        }
      }
    }
 catch (    XmlPullParserException e) {
      InflateException ex=new InflateException(e.getMessage());
      ex.initCause(e);
      throw ex;
    }
catch (    IOException e) {
      InflateException ex=new InflateException(parser.getPositionDescription() + "String_Node_Str" + e.getMessage());
      ex.initCause(e);
      throw ex;
    }
    mConstructorArgs[0]=null;
    mConstructorArgs[1]=null;
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Inflate a new view hierarchy from the specified XML node. Throws  {@link InflateException} if there is an error.<p> <em><strong>Important</strong></em>&nbsp;&nbsp;&nbsp;For performance reasons, view inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime.
 * @param parser XML dom node containing the description of the viewhierarchy.
 * @param root Optional view to be the parent of the generated hierarchy (if<em>attachToRoot</em> is true), or else simply an object that provides a set of LayoutParams values for root of the returned hierarchy (if <em>attachToRoot</em> is false.)
 * @param attachToRoot Whether the inflated hierarchy should be attached tothe root parameter? If false, root is only used to create the correct subclass of LayoutParams for the root view in the XML.
 * @return The root View of the inflated hierarchy. If root was supplied andattachToRoot is true, this is root; otherwise it is the root of the inflated XML file.
 */
public View inflate(XmlPullParser parser,ViewGroup root,boolean attachToRoot){
synchronized (mConstructorArgs) {
    final AttributeSet attrs=Xml.asAttributeSet(parser);
    Context lastContext=(Context)mConstructorArgs[0];
    mConstructorArgs[0]=mContext;
    View result=root;
    try {
      int type;
      while ((type=parser.next()) != XmlPullParser.START_TAG && type != XmlPullParser.END_DOCUMENT) {
      }
      if (type != XmlPullParser.START_TAG) {
        throw new InflateException(parser.getPositionDescription() + "String_Node_Str");
      }
      final String name=parser.getName();
      if (DEBUG) {
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str" + name);
        System.out.println("String_Node_Str");
      }
      if (TAG_MERGE.equals(name)) {
        if (root == null || !attachToRoot) {
          throw new InflateException("String_Node_Str" + "String_Node_Str");
        }
        rInflate(parser,root,attrs);
      }
 else {
        View temp=createViewFromTag(name,attrs);
        ViewGroup.LayoutParams params=null;
        if (root != null) {
          if (DEBUG) {
            System.out.println("String_Node_Str" + root);
          }
          params=root.generateLayoutParams(attrs);
          if (!attachToRoot) {
            temp.setLayoutParams(params);
          }
        }
        if (DEBUG) {
          System.out.println("String_Node_Str");
        }
        rInflate(parser,temp,attrs);
        if (DEBUG) {
          System.out.println("String_Node_Str");
        }
        if (root != null && attachToRoot) {
          root.addView(temp,params);
        }
        if (root == null || !attachToRoot) {
          result=temp;
        }
      }
    }
 catch (    XmlPullParserException e) {
      InflateException ex=new InflateException(e.getMessage());
      ex.initCause(e);
      throw ex;
    }
catch (    IOException e) {
      InflateException ex=new InflateException(parser.getPositionDescription() + "String_Node_Str" + e.getMessage());
      ex.initCause(e);
      throw ex;
    }
 finally {
      mConstructorArgs[0]=lastContext;
      mConstructorArgs[1]=null;
    }
    return result;
  }
}