Program: 112953
Project: 112953
Buggy source:
private String createCoverageXml(Map<String,String> geowaveStoreConfig,Boolean equalizeHistogramOverride,String interpolationOverride,Boolean scaleTo8Bit){
  String coverageXml=null;
  String workspace=geowaveStoreConfig.get(GeoServerConfig.GEOSERVER_WORKSPACE);
  String cvgstoreName=geowaveStoreConfig.get(GeoServerConfig.GEOSERVER_CS);
  try {
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    factory.setFeature("String_Node_Str",false);
    factory.setFeature("String_Node_Str",false);
    Document xmlDoc=factory.newDocumentBuilder().newDocument();
    Element rootEl=xmlDoc.createElement("String_Node_Str");
    xmlDoc.appendChild(rootEl);
    Element nameEl=xmlDoc.createElement("String_Node_Str");
    nameEl.appendChild(xmlDoc.createTextNode(cvgstoreName));
    rootEl.appendChild(nameEl);
    Element wsEl=xmlDoc.createElement("String_Node_Str");
    wsEl.appendChild(xmlDoc.createTextNode(workspace));
    rootEl.appendChild(wsEl);
    Element typeEl=xmlDoc.createElement("String_Node_Str");
    typeEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(typeEl);
    Element enabledEl=xmlDoc.createElement("String_Node_Str");
    enabledEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(enabledEl);
    Element configEl=xmlDoc.createElement("String_Node_Str");
    configEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(configEl);
    String storeConfigUrl=createParamUrl(geowaveStoreConfig,equalizeHistogramOverride,interpolationOverride,scaleTo8Bit);
    Element urlEl=xmlDoc.createElement("String_Node_Str");
    urlEl.appendChild(xmlDoc.createTextNode(storeConfigUrl));
    rootEl.appendChild(urlEl);
    TransformerFactory xformerFactory=TransformerFactory.newInstance();
    xformerFactory.setFeature("String_Node_Str",false);
    xformerFactory.setFeature("String_Node_Str",false);
    xformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD,"String_Node_Str");
    xformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET,"String_Node_Str");
    Transformer xformer=xformerFactory.newTransformer();
    DOMSource source=new DOMSource(xmlDoc);
    StreamResult result=new StreamResult(new StringWriter());
    xformer.transform(source,result);
    coverageXml=result.getWriter().toString();
  }
 catch (  TransformerException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ParserConfigurationException e1) {
    LOGGER.error("String_Node_Str",e1);
  }
  return coverageXml;
}

Fixed version (ground truth):
private String createCoverageXml(Map<String,String> geowaveStoreConfig,Boolean equalizeHistogramOverride,String interpolationOverride,Boolean scaleTo8Bit){
  String coverageXml=null;
  String workspace=geowaveStoreConfig.get(GeoServerConfig.GEOSERVER_WORKSPACE);
  String cvgstoreName=geowaveStoreConfig.get(GeoServerConfig.GEOSERVER_CS);
  StreamResult result=null;
  try {
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    factory.setFeature("String_Node_Str",false);
    factory.setFeature("String_Node_Str",false);
    Document xmlDoc=factory.newDocumentBuilder().newDocument();
    Element rootEl=xmlDoc.createElement("String_Node_Str");
    xmlDoc.appendChild(rootEl);
    Element nameEl=xmlDoc.createElement("String_Node_Str");
    nameEl.appendChild(xmlDoc.createTextNode(cvgstoreName));
    rootEl.appendChild(nameEl);
    Element wsEl=xmlDoc.createElement("String_Node_Str");
    wsEl.appendChild(xmlDoc.createTextNode(workspace));
    rootEl.appendChild(wsEl);
    Element typeEl=xmlDoc.createElement("String_Node_Str");
    typeEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(typeEl);
    Element enabledEl=xmlDoc.createElement("String_Node_Str");
    enabledEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(enabledEl);
    Element configEl=xmlDoc.createElement("String_Node_Str");
    configEl.appendChild(xmlDoc.createTextNode("String_Node_Str"));
    rootEl.appendChild(configEl);
    String storeConfigUrl=createParamUrl(geowaveStoreConfig,equalizeHistogramOverride,interpolationOverride,scaleTo8Bit);
    Element urlEl=xmlDoc.createElement("String_Node_Str");
    urlEl.appendChild(xmlDoc.createTextNode(storeConfigUrl));
    rootEl.appendChild(urlEl);
    TransformerFactory xformerFactory=TransformerFactory.newInstance();
    xformerFactory.setFeature("String_Node_Str",false);
    xformerFactory.setFeature("String_Node_Str",false);
    xformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD,"String_Node_Str");
    xformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET,"String_Node_Str");
    Transformer xformer=xformerFactory.newTransformer();
    DOMSource source=new DOMSource(xmlDoc);
    result=new StreamResult(new StringWriter());
    xformer.transform(source,result);
    coverageXml=result.getWriter().toString();
  }
 catch (  TransformerException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  ParserConfigurationException e1) {
    LOGGER.error("String_Node_Str",e1);
  }
 finally {
    if (result != null && result.getWriter() != null) {
      try {
        result.getWriter().close();
      }
 catch (      IOException e) {
        LOGGER.error(e);
      }
    }
  }
  return coverageXml;
}