Program: 45679
Project: 45679
Buggy source:
@Override public void decode(InputStream in,OutputStream out) throws AndrolibException {
  try {
    XmlPullWrapperFactory factory=XmlPullWrapperFactory.newInstance();
    XmlPullParserWrapper par=factory.newPullParserWrapper(mParser);
    final ResTable resTable=((AXmlResourceParser)mParser).getAttrDecoder().getCurrentPackage().getResTable();
    XmlSerializerWrapper ser=new StaticXmlSerializerWrapper(mSerial,factory){
      boolean hideSdkInfo=false;
      boolean hidePackageInfo=false;
      @Override public void event(      XmlPullParser pp) throws XmlPullParserException, IOException {
        int type=pp.getEventType();
        if (type == XmlPullParser.START_TAG) {
          if ("String_Node_Str".equalsIgnoreCase(pp.getName())) {
            try {
              hidePackageInfo=parseManifest(pp);
            }
 catch (            AndrolibException e) {
            }
          }
 else           if ("String_Node_Str".equalsIgnoreCase(pp.getName())) {
            try {
              hideSdkInfo=parseAttr(pp);
              if (hideSdkInfo) {
                return;
              }
            }
 catch (            AndrolibException e) {
            }
          }
        }
 else         if (hideSdkInfo && type == XmlPullParser.END_TAG && "String_Node_Str".equalsIgnoreCase(pp.getName())) {
          return;
        }
 else         if (hidePackageInfo && type == XmlPullParser.END_TAG && "String_Node_Str".equalsIgnoreCase(pp.getName())) {
          super.event(pp);
          return;
        }
        super.event(pp);
      }
      private boolean parseManifest(      XmlPullParser pp) throws AndrolibException {
        ResTable restable=resTable;
        for (int i=0; i < pp.getAttributeCount(); i++) {
          if (pp.getAttributeName(i).equalsIgnoreCase(("String_Node_Str"))) {
            restable.addPackageInfo("String_Node_Str",pp.getAttributeValue(i));
          }
 else           if (pp.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
            restable.addVersionInfo("String_Node_Str",pp.getAttributeValue(i).toString());
          }
 else           if (pp.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
            restable.addVersionInfo("String_Node_Str",pp.getAttributeValue(i).toString());
          }
        }
        return true;
      }
      private boolean parseAttr(      XmlPullParser pp) throws AndrolibException {
        ResTable restable=resTable;
        for (int i=0; i < pp.getAttributeCount(); i++) {
          final String a_ns="String_Node_Str";
          String ns=pp.getAttributeNamespace(i);
          if (a_ns.equalsIgnoreCase(ns)) {
            String name=pp.getAttributeName(i);
            String value=pp.getAttributeValue(i);
            if (name != null && value != null) {
              if (name.equalsIgnoreCase("String_Node_Str") || name.equalsIgnoreCase("String_Node_Str") || name.equalsIgnoreCase("String_Node_Str")) {
                restable.addSdkInfo(name,value);
              }
 else {
                restable.clearSdkInfo();
                return false;
              }
            }
          }
 else {
            resTable.clearSdkInfo();
            if (i >= pp.getAttributeCount()) {
              return false;
            }
          }
        }
        return true;
      }
    }
;
    par.setInput(in,null);
    ser.setOutput(out,null);
    while (par.nextToken() != XmlPullParser.END_DOCUMENT) {
      ser.event(par);
    }
    ser.flush();
  }
 catch (  XmlPullParserException ex) {
    throw new AndrolibException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new AndrolibException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
@Override public void decode(InputStream in,OutputStream out) throws AndrolibException {
  try {
    XmlPullWrapperFactory factory=XmlPullWrapperFactory.newInstance();
    XmlPullParserWrapper par=factory.newPullParserWrapper(mParser);
    final ResTable resTable=((AXmlResourceParser)mParser).getAttrDecoder().getCurrentPackage().getResTable();
    XmlSerializerWrapper ser=new StaticXmlSerializerWrapper(mSerial,factory){
      boolean hideSdkInfo=false;
      boolean hidePackageInfo=false;
      @Override public void event(      XmlPullParser pp) throws XmlPullParserException, IOException {
        int type=pp.getEventType();
        if (type == XmlPullParser.START_TAG) {
          if ("String_Node_Str".equalsIgnoreCase(pp.getName())) {
            try {
              hidePackageInfo=parseManifest(pp);
            }
 catch (            AndrolibException e) {
            }
          }
 else           if ("String_Node_Str".equalsIgnoreCase(pp.getName())) {
            try {
              hideSdkInfo=parseAttr(pp);
              if (hideSdkInfo) {
                return;
              }
            }
 catch (            AndrolibException e) {
            }
          }
        }
 else         if (hideSdkInfo && type == XmlPullParser.END_TAG && "String_Node_Str".equalsIgnoreCase(pp.getName())) {
          return;
        }
 else         if (hidePackageInfo && type == XmlPullParser.END_TAG && "String_Node_Str".equalsIgnoreCase(pp.getName())) {
          super.event(pp);
          return;
        }
        super.event(pp);
      }
      private boolean parseManifest(      XmlPullParser pp) throws AndrolibException {
        ResTable restable=resTable;
        for (int i=0; i < pp.getAttributeCount(); i++) {
          if (pp.getAttributeName(i).equalsIgnoreCase(("String_Node_Str"))) {
            restable.addPackageInfo("String_Node_Str",pp.getAttributeValue(i));
          }
 else           if (pp.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
            restable.addVersionInfo("String_Node_Str",pp.getAttributeValue(i).toString());
          }
 else           if (pp.getAttributeName(i).equalsIgnoreCase("String_Node_Str")) {
            restable.addVersionInfo("String_Node_Str",pp.getAttributeValue(i).toString());
          }
        }
        return true;
      }
      private boolean parseAttr(      XmlPullParser pp) throws AndrolibException {
        ResTable restable=resTable;
        for (int i=0; i < pp.getAttributeCount(); i++) {
          final String a_ns="String_Node_Str";
          String ns=pp.getAttributeNamespace(i);
          if (a_ns.equalsIgnoreCase(ns)) {
            String name=pp.getAttributeName(i);
            String value=pp.getAttributeValue(i);
            if (name != null && value != null) {
              if (name.equalsIgnoreCase("String_Node_Str") || name.equalsIgnoreCase("String_Node_Str") || name.equalsIgnoreCase("String_Node_Str")) {
                restable.addSdkInfo(name,value);
              }
 else {
                restable.clearSdkInfo();
                return false;
              }
            }
          }
 else {
            resTable.clearSdkInfo();
            if (i >= pp.getAttributeCount()) {
              return false;
            }
          }
        }
        if (resTable.getAnalysisMode() == true) {
          return false;
        }
 else {
          return true;
        }
      }
    }
;
    par.setInput(in,null);
    ser.setOutput(out,null);
    while (par.nextToken() != XmlPullParser.END_DOCUMENT) {
      ser.event(par);
    }
    ser.flush();
  }
 catch (  XmlPullParserException ex) {
    throw new AndrolibException("String_Node_Str",ex);
  }
catch (  IOException ex) {
    throw new AndrolibException("String_Node_Str",ex);
  }
}