Program: 63054
Project: 63054
Buggy source:
@SuppressWarnings("String_Node_Str") public static <T>ListWrapper<T> deserializeToListWrapper(String content,Class<T> clazz,String... matchPattern){
  XMLStreamReader xr=null;
  XMLStreamWriter xw=null;
  try {
    xr=XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(content));
    List<Pattern> patterns=new ArrayList<Pattern>();
    for (    String pattern : matchPattern) {
      patterns.add(Pattern.compile(pattern));
    }
    Matcher matcher=null;
    Map<String,Map<String,String>> outMap=new HashMap<String,Map<String,String>>();
    while (true) {
      int event=xr.next();
      if (event == XMLStreamConstants.END_DOCUMENT) {
        break;
      }
 else       if (event == XMLStreamConstants.START_ELEMENT) {
        String name=xr.getLocalName();
        for (        Pattern pattern : patterns) {
          if ((matcher=pattern.matcher(name)).find()) {
            while (true) {
              event=xr.next();
              if (event == XMLStreamConstants.START_ELEMENT) {
                name=xr.getLocalName();
              }
 else               if (event == XMLStreamConstants.END_ELEMENT) {
                break;
              }
 else               if (event == XMLStreamConstants.CHARACTERS) {
                String key=matcher.group();
                if (!pattern.pattern().equals(DEFAULT_PATTERN.pattern())) {
                  matcher=DEFAULT_PATTERN.matcher(name);
                  matcher.find();
                  key=matcher.group();
                }
                Map<String,String> innerMap=null;
                if ((innerMap=outMap.get(key)) == null) {
                  innerMap=new HashMap<String,String>();
                  outMap.put(key,innerMap);
                }
                innerMap.put(name.replace(key,"String_Node_Str"),xr.getText());
              }
            }
            break;
          }
        }
      }
    }
    if (!outMap.isEmpty()) {
      StringWriter sw=new StringWriter();
      xw=XMLOutputFactory.newInstance().createXMLStreamWriter(sw);
      xw.writeStartDocument(Consts.UTF_8.name(),"String_Node_Str");
      xw.writeStartElement(clazz.getCanonicalName());
      String itemName=StringUtil.uncapitalize(clazz.getSimpleName());
      XmlRootElement rootElement=clazz.getAnnotation(XmlRootElement.class);
      if (rootElement != null && StringUtil.isNotBlank(rootElement.name())) {
        try {
          if (!rootElement.name().equals(XmlRootElement.class.getMethod("String_Node_Str").getDefaultValue().toString())) {
            itemName=rootElement.name();
          }
        }
 catch (        NoSuchMethodException e) {
          ;
        }
      }
      for (Iterator<Entry<String,Map<String,String>>> outIt=outMap.entrySet().iterator(); outIt.hasNext(); ) {
        xw.writeStartElement(itemName);
        for (Iterator<Entry<String,String>> innerIt=outIt.next().getValue().entrySet().iterator(); innerIt.hasNext(); ) {
          Entry<String,String> entry=innerIt.next();
          xw.writeStartElement(entry.getKey());
          xw.writeCharacters(entry.getValue());
          xw.writeEndElement();
        }
        xw.writeEndElement();
      }
      xw.writeEndElement();
      xw.writeEndDocument();
      JAXBContext ctx=JAXBContext.newInstance(ListWrapper.class,clazz);
      Unmarshaller u=ctx.createUnmarshaller();
      return u.unmarshal(new StreamSource(new StringReader(sw.getBuffer().toString())),ListWrapper.class).getValue();
    }
    return null;
  }
 catch (  XMLStreamException e) {
    throw new IllegalArgumentException(e);
  }
catch (  JAXBException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      if (xw != null) {
        xw.close();
      }
      if (xr != null) {
        xr.close();
      }
    }
 catch (    XMLStreamException e) {
      ;
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static <T>ListWrapper<T> deserializeToListWrapper(String content,Class<T> clazz,String... matchPattern){
  XMLStreamReader xr=null;
  XMLStreamWriter xw=null;
  try {
    xr=XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(content));
    List<Pattern> patterns=new ArrayList<Pattern>();
    for (    String pattern : matchPattern) {
      patterns.add(Pattern.compile(pattern));
    }
    Matcher matcher=null;
    Map<String,Map<String,String>> outMap=new HashMap<String,Map<String,String>>();
    while (true) {
      int event=xr.next();
      if (event == XMLStreamConstants.END_DOCUMENT) {
        break;
      }
 else       if (event == XMLStreamConstants.START_ELEMENT) {
        String name=xr.getLocalName();
        for (        Pattern pattern : patterns) {
          if ((matcher=pattern.matcher(name)).find()) {
            while (true) {
              event=xr.next();
              if (event == XMLStreamConstants.START_ELEMENT) {
                name=xr.getLocalName();
              }
 else               if (event == XMLStreamConstants.END_ELEMENT) {
                break;
              }
 else               if (event == XMLStreamConstants.CHARACTERS || event == XMLStreamConstants.CDATA) {
                String key=matcher.group();
                if (!pattern.pattern().equals(DEFAULT_PATTERN.pattern())) {
                  matcher=DEFAULT_PATTERN.matcher(name);
                  matcher.find();
                  key=matcher.group();
                }
                Map<String,String> innerMap=null;
                if ((innerMap=outMap.get(key)) == null) {
                  innerMap=new HashMap<String,String>();
                  outMap.put(key,innerMap);
                }
                innerMap.put(name.replace(key,"String_Node_Str"),xr.getText());
              }
            }
            break;
          }
        }
      }
    }
    if (!outMap.isEmpty()) {
      StringWriter sw=new StringWriter();
      xw=XMLOutputFactory.newInstance().createXMLStreamWriter(sw);
      xw.writeStartDocument(Consts.UTF_8.name(),"String_Node_Str");
      xw.writeStartElement(clazz.getCanonicalName());
      String itemName=StringUtil.uncapitalize(clazz.getSimpleName());
      XmlRootElement rootElement=clazz.getAnnotation(XmlRootElement.class);
      if (rootElement != null && StringUtil.isNotBlank(rootElement.name())) {
        try {
          if (!rootElement.name().equals(XmlRootElement.class.getMethod("String_Node_Str").getDefaultValue().toString())) {
            itemName=rootElement.name();
          }
        }
 catch (        NoSuchMethodException e) {
          ;
        }
      }
      for (Iterator<Entry<String,Map<String,String>>> outIt=outMap.entrySet().iterator(); outIt.hasNext(); ) {
        xw.writeStartElement(itemName);
        for (Iterator<Entry<String,String>> innerIt=outIt.next().getValue().entrySet().iterator(); innerIt.hasNext(); ) {
          Entry<String,String> entry=innerIt.next();
          xw.writeStartElement(entry.getKey());
          xw.writeCharacters(entry.getValue());
          xw.writeEndElement();
        }
        xw.writeEndElement();
      }
      xw.writeEndElement();
      xw.writeEndDocument();
      JAXBContext ctx=JAXBContext.newInstance(ListWrapper.class,clazz);
      Unmarshaller u=ctx.createUnmarshaller();
      return u.unmarshal(new StreamSource(new StringReader(sw.getBuffer().toString())),ListWrapper.class).getValue();
    }
    return null;
  }
 catch (  XMLStreamException e) {
    throw new IllegalArgumentException(e);
  }
catch (  JAXBException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      if (xw != null) {
        xw.close();
      }
      if (xr != null) {
        xr.close();
      }
    }
 catch (    XMLStreamException e) {
      ;
    }
  }
}