Program: 52346
Project: 52346
Buggy source:
/** 
 * Return &lt;meta&gt; elements that can be put in the &lt;head&gt; element of an XHTML document.
 */
public List disseminateList(DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException {
  if (dso.getType() != Constants.ITEM) {
    throw new CrosswalkObjectNotSupported("String_Node_Str" + dso.getID() + "String_Node_Str"+ Constants.typeText[dso.getType()]);
  }
  Item item=(Item)dso;
  List<Element> metas=new ArrayList<Element>();
  DCValue[] values=item.getMetadata(Item.ANY,Item.ANY,Item.ANY,Item.ANY);
  Iterator<String> schemaIterator=schemaURLs.keySet().iterator();
  while (schemaIterator.hasNext()) {
    String s=schemaIterator.next();
    Element e=new Element("String_Node_Str",XHTML_NAMESPACE);
    e.setAttribute("String_Node_Str",s);
    e.setAttribute("String_Node_Str",schemaURLs.get(s));
    metas.add(e);
  }
  for (int i=0; i < values.length; i++) {
    DCValue v=values[i];
    String key=v.schema + "String_Node_Str" + v.element+ (v.qualifier != null ? "String_Node_Str" + v.qualifier : "String_Node_Str");
    String originalKey=key;
    String name=names.get(key);
    if (name == null && v.qualifier != null) {
      key=v.schema + "String_Node_Str" + v.element;
      name=names.get(key);
    }
    if (name == null) {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + dso.getID());
      }
    }
 else {
      Element e=new Element("String_Node_Str",XHTML_NAMESPACE);
      e.setAttribute("String_Node_Str",name);
      e.setAttribute("String_Node_Str",v.value == null ? "String_Node_Str" : v.value);
      if (v.language != null && !v.language.equals("String_Node_Str")) {
        e.setAttribute("String_Node_Str",v.language,Namespace.XML_NAMESPACE);
      }
      String schemeAttr=schemes.get(key);
      if (schemeAttr != null) {
        e.setAttribute("String_Node_Str",schemeAttr);
      }
      metas.add(e);
    }
  }
  return metas;
}

Fixed version (ground truth):
/** 
 * Return &lt;meta&gt; elements that can be put in the &lt;head&gt; element of an XHTML document.
 */
public List disseminateList(DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException {
  if (dso.getType() != Constants.ITEM) {
    throw new CrosswalkObjectNotSupported("String_Node_Str" + dso.getID() + "String_Node_Str"+ Constants.typeText[dso.getType()]);
  }
  Item item=(Item)dso;
  List<Element> metas=new ArrayList<Element>();
  DCValue[] values=item.getMetadata(Item.ANY,Item.ANY,Item.ANY,Item.ANY);
  Iterator<String> schemaIterator=schemaURLs.keySet().iterator();
  while (schemaIterator.hasNext()) {
    String s=schemaIterator.next();
    Element e=new Element("String_Node_Str",XHTML_NAMESPACE);
    e.setAttribute("String_Node_Str",s);
    e.setAttribute("String_Node_Str",schemaURLs.get(s));
    metas.add(e);
  }
  for (int i=0; i < values.length; i++) {
    DCValue v=values[i];
    String key=v.schema + "String_Node_Str" + v.element+ (v.qualifier != null ? "String_Node_Str" + v.qualifier : "String_Node_Str");
    String originalKey=key;
    String name=names.get(key);
    if (name == null && v.qualifier != null) {
      key=v.schema + "String_Node_Str" + v.element;
      name=names.get(key);
    }
    if (name == null) {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + dso.getID());
      }
    }
 else {
      Element e=new Element("String_Node_Str",XHTML_NAMESPACE);
      e.setAttribute("String_Node_Str",name);
      if (v.value == null) {
        e.setAttribute("String_Node_Str","String_Node_Str");
      }
 else {
        String reason=Verifier.checkCharacterData(v.value);
        if (reason == null) {
          e.setAttribute("String_Node_Str",v.value == null ? "String_Node_Str" : v.value);
        }
 else {
          log.warn("String_Node_Str" + reason);
          String simpleText=v.value.replaceAll("String_Node_Str","String_Node_Str");
          if (Verifier.checkCharacterData(simpleText) == null)           e.setAttribute("String_Node_Str",simpleText);
        }
      }
      if (v.language != null && !v.language.equals("String_Node_Str")) {
        e.setAttribute("String_Node_Str",v.language,Namespace.XML_NAMESPACE);
      }
      String schemeAttr=schemes.get(key);
      if (schemeAttr != null) {
        e.setAttribute("String_Node_Str",schemeAttr);
      }
      metas.add(e);
    }
  }
  return metas;
}