nus-yam/ex-repair huggingface dataset:
Program: 177994
Project: 177994
Buggy source:
/** 
 * Create a new coverage in a given workspace and coverage store
 * @param ce contains the coverage name to create and the configuration to apply
 * @param wsname the workspace to search for existent coverage
 * @param csname the coverage store to search for existent coverage
 * @return
 */
public boolean createCoverage(final GSCoverageEncoder ce,final String wsname,final String csname){
  final String cname=ce.getName();
  if (cname == null) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error("String_Node_Str");
    return false;
  }
  final String url=restURL + "String_Node_Str" + wsname+ "String_Node_Str"+ csname+ "String_Node_Str";
  final String xmlBody=ce.toString();
  final String sendResult=HTTPUtils.postXml(url,xmlBody,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname+ "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}

Fixed version (ground truth):
/** 
 * Create a new coverage in a given workspace and coverage store
 * @param wsname the workspace to search for existent coverage
 * @param storeName an existent store name to use as data source
 * @param ce contains the coverage name to create and the configuration to apply
 * @return true if success
 * @throws IllegalArgumentException if arguments are null or empty
 */
public boolean createCoverage(final String wsname,final String storeName,final GSCoverageEncoder ce) throws IllegalArgumentException {
  if (wsname.isEmpty() || wsname == null || ce == null || ce.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String coverageName=ce.getName();
  if (coverageName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String url=restURL + "String_Node_Str" + wsname+ "String_Node_Str"+ storeName+ "String_Node_Str";
  final String xmlBody=ce.toString();
  final String sendResult=HTTPUtils.postXml(url,xmlBody,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + wsname + "String_Node_Str"+ storeName+ "String_Node_Str"+ coverageName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + wsname + "String_Node_Str"+ storeName+ "String_Node_Str"+ coverageName+ "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}
Program: 177996
Project: 177996
Buggy source:
/** 
 * Publish a GeoTiff. Simple wrapper for   {@link #publishCoverage(String,String,String,String,File,ParameterConfigure,NameValuePair)}<P> This is the equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$FULLPATH" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$STORENAME/external.geotiff}</PRE>
 * @param workspace Workspace to use
 * @param storeName Name of the coveragestore (if null the file name will be used)
 * @param layerName the name of the coverage (if null the file name will be used)
 * @param geotiff file to upload
 * @return true if the operation completed successfully.
 * @throws FileNotFoundException if file does not exists
 * @throws IllegalArgumentException if workspace or geotiff are null
 */
public boolean publishGeoTIFF(final String workspace,final String storeName,final String layerName,final File geotiff) throws FileNotFoundException, IllegalArgumentException {
  if (workspace == null || geotiff == null)   throw new IllegalArgumentException("String_Node_Str");
  return publishCoverage(workspace,(storeName != null) ? storeName : FilenameUtils.getBaseName(geotiff.getAbsolutePath()),"String_Node_Str","String_Node_Str",geotiff,ParameterConfigure.FIRST,(layerName != null) ? new NameValuePair[]{new NameValuePair("String_Node_Str",layerName)} : (NameValuePair[])null);
}

Fixed version (ground truth):
/** 
 * Publish a GeoTiff. Simple wrapper for   {@link #publishCoverage(String,String,CoverageStoreExtension,String,File,ParameterConfigure,NameValuePair)}<P> This is the equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$FULLPATH" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$STORENAME/external.geotiff}</PRE>
 * @param workspace Workspace to use
 * @param storeName Name of the coveragestore (if null the file name will be used)
 * @param coverageName the name of the coverage (if null the file name will be used)
 * @param geotiff file to upload
 * @return true if the operation completed successfully.
 * @throws FileNotFoundException if file does not exists
 * @throws IllegalArgumentException if workspace or geotiff are null
 */
public boolean publishGeoTIFF(final String workspace,final String storeName,final String coverageName,final File geotiff) throws FileNotFoundException, IllegalArgumentException {
  if (workspace == null || geotiff == null)   throw new IllegalArgumentException("String_Node_Str");
  return publishCoverage(workspace,(storeName != null) ? storeName : FilenameUtils.getBaseName(geotiff.getAbsolutePath()),CoverageStoreExtension.geotiff,"String_Node_Str",geotiff,ParameterConfigure.FIRST,(coverageName != null) ? new NameValuePair[]{new NameValuePair("String_Node_Str",coverageName)} : (NameValuePair[])null);
}
Program: 177997
Project: 177997
Buggy source:
/** 
 * Allows to configure some coverage's attributes
 * @param ce Coverage encoder
 * @param wsname workspace name
 * @param csname coveragestore name
 * @param cname coverage name (if != null will override the CoverageEncoder name)
 * @return true if success
 * @deprecated use{@link GeoServerRESTPublisher#configureCoverage(GSCoverageEncoder,String,String)}
 */
protected boolean configureCoverage(final GSCoverageEncoder ce,final String wsname,final String csname,String cname){
  if (cname != null)   ce.setName(cname);
 else   cname=ce.getName();
  return configureCoverage(ce,wsname,csname);
}

Fixed version (ground truth):
/** 
 * Configure an existent coverage in a given workspace and coverage store
 * @param ce contains the coverage name to configure and the configuration to apply
 * @param wsname the workspace to search for existent coverage
 * @param csname the coverage store to search for existent coverage
 * @return true if success
 */
public boolean configureCoverage(final GSCoverageEncoder ce,final String wsname,final String csname){
  final String cname=ce.getName();
  if (cname == null) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error("String_Node_Str");
    return false;
  }
  GeoServerRESTReader reader;
  try {
    reader=new GeoServerRESTReader(restURL,gsuser,gspass);
  }
 catch (  MalformedURLException e) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error(e);
    return false;
  }
  final RESTCoverageList covList=reader.getCoverages(wsname,csname);
  if (covList.isEmpty()) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error("String_Node_Str" + csname);
    return false;
  }
  final Iterator<NameLinkElem> it=covList.iterator();
  boolean found=false;
  while (it.hasNext()) {
    NameLinkElem nameElem=it.next();
    if (nameElem.getName().equals(cname)) {
      found=true;
      break;
    }
  }
  if (!found) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error("String_Node_Str" + csname + "String_Node_Str"+ cname);
    return false;
  }
  final String url=restURL + "String_Node_Str" + wsname+ "String_Node_Str"+ csname+ "String_Node_Str"+ cname+ "String_Node_Str";
  final String xmlBody=ce.toString();
  final String sendResult=HTTPUtils.putXml(url,xmlBody,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname+ "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}
Program: 178000
Project: 178000
Buggy source:
/** 
 * Allows to configure some layer attributes such and DefaultStyle
 * @TODO WmsPath
 */
public boolean configureLayer(final String workspace,final String layerName,final GSLayerEncoder layer){
  if (layer.isEmpty()) {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str");
    return true;
  }
  final String fqLayerName;
  if (workspace == null) {
    fqLayerName=layerName;
    if (LOGGER.isEnabledFor(Level.WARN)) {
      LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
    }
  }
 else {
    fqLayerName=workspace + "String_Node_Str" + layerName;
  }
  final String url=restURL + "String_Node_Str" + fqLayerName;
  String layerXml=layer.toString();
  String sendResult=HTTPUtils.putXml(url,layerXml,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName + "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}

Fixed version (ground truth):
/** 
 * Allows to configure some layer attributes such and DefaultStyle
 * @param workspace
 * @param resourceName the name of the resource to use (featureStore or coverageStore name)
 * @param layer the layer encoder used to configure the layer
 * @return true if success
 * @throws IllegalArgumentException if some arguments are null or empty
 * @TODO WmsPath
 */
public boolean configureLayer(final String workspace,final String resourceName,final GSLayerEncoder layer) throws IllegalArgumentException {
  if (workspace == null || resourceName == null || layer == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (workspace.isEmpty() || resourceName.isEmpty() || layer.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String fqLayerName=workspace + "String_Node_Str" + resourceName;
  final String url=restURL + "String_Node_Str" + fqLayerName;
  String layerXml=layer.toString();
  String sendResult=HTTPUtils.putXml(url,layerXml,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName + "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}
Program: 178001
Project: 178001
Buggy source:
/** 
 * Publish imagemosaic as zip file
 * @see {@link #publishWorldImage(String,String,File,ParameterConfigure,NameValuePair)}
 */
public boolean publishImageMosaic(String workspace,String storeName,File zipFile,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  return publishCoverage(workspace,storeName,"String_Node_Str","String_Node_Str",zipFile,configure,params);
}

Fixed version (ground truth):
/** 
 * Publish imagemosaic as zip file
 * @see {@link #publishWorldImage(String,String,File,ParameterConfigure,NameValuePair)}
 */
public boolean publishImageMosaic(String workspace,String storeName,File zipFile,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  return publishCoverage(workspace,storeName,CoverageStoreExtension.imagemosaic,"String_Node_Str",zipFile,configure,params);
}
Program: 178002
Project: 178002
Buggy source:
/** 
 * Publish a zipped worldimage file. It is assumed that the the zip-file contain the *.prj to set the srs. <P> This is equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: application/zip' \ --data-binary @$ZIPFILE \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$COVERAGESTORE/file.worldimage </PRE>}
 * @param workspace Workspace to use
 * @param coveragestore Name of the coveragestore
 * @param file file to upload
 * @param configure Configure parameter. It may be null.
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are: <ul> <li> <b>coverageName=name</b> coverageName parameter to append. Only works if configure is not set to ParameterConfigure.NONE. </li> </ul>
 * @see #{@link ParameterConfigure}
 * @return true if the operation completed successfully.
 */
private boolean publishCoverage(String workspace,String coveragestore,String format,String mimeType,File file,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  StringBuilder sbUrl=new StringBuilder(restURL).append("String_Node_Str").append(workspace).append("String_Node_Str").append(coveragestore).append("String_Node_Str").append(format);
  if (configure != null) {
    sbUrl.append("String_Node_Str").append(configure);
    if (params != (NameValuePair[])null && !configure.equals(ParameterConfigure.NONE)) {
      final String paramString=appendParameters(params);
      if (!paramString.isEmpty()) {
        sbUrl.append("String_Node_Str").append(paramString);
      }
    }
  }
  String sentResult=HTTPUtils.put(sbUrl.toString(),file,mimeType,gsuser,gspass);
  boolean fileSent=sentResult != null;
  if (fileSent) {
    if (LOGGER.isInfoEnabled())     LOGGER.info("String_Node_Str" + file + "String_Node_Str");
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + file);
  }
  return fileSent;
}

Fixed version (ground truth):
/** 
 * Publish a file.  <P> This is an example with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: application/zip' \ --data-binary @$ZIPFILE \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$COVERAGESTORE/file.worldimage </PRE>}
 * @param workspace Workspace to use
 * @param coveragestore Name of the coveragestore
 * @param file file to upload
 * @param configure Configure parameter. It may be null.
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are: <ul> <li> <b>coverageName=name</b> coverageName parameter to append. Only works if configure is not set to ParameterConfigure.NONE. </li> </ul>
 * @see #{@link ParameterConfigure}
 * @return true if the operation completed successfully.
 */
private boolean publishCoverage(String workspace,String coveragestore,CoverageStoreExtension extension,String mimeType,File file,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  return createCoverageStore(workspace,coveragestore,UploadMethod.file,extension,mimeType,file.toURI(),configure,params);
}
Program: 178003
Project: 178003
Buggy source:
/** 
 * Publish a Mosaic already in a filesystem readable by GeoServer. <P> Sample cUrl usage:<BR> <TT>curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$ABSPORTDIR" http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$BAREDIR/external.imagemosaic </TT>
 * @param workspace an existing workspace
 * @param storeName the name of the coverageStore to be created
 * @param mosaicDir the directory where the raster images are located
 * @param coverageEncoder the set of parameters to be set to the coverage (bbox, srs, ...)
 * @param layerEncoder the set of parameters to be set to the layer (defaultstyle, wmspath, ...)
 * @return true if the operation completed successfully.
 * @throws FileNotFoundException
 */
public boolean createExternalMosaic(String workspace,String storeName,File mosaicDir,GSCoverageEncoder coverageEncoder,GSLayerEncoder layerEncoder) throws FileNotFoundException {
  RESTCoverageStore store=createExternaMosaicDatastore(workspace,storeName,mosaicDir,ParameterConfigure.NONE,ParameterUpdate.OVERWRITE);
  final String coverageStoreName=FilenameUtils.getBaseName(mosaicDir.getName());
  if (coverageEncoder == null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + workspace + "String_Node_Str"+ storeName);
    }
    coverageEncoder=new GSCoverageEncoder();
    coverageEncoder.setName(coverageStoreName);
  }
  if (layerEncoder == null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + workspace + "String_Node_Str"+ storeName);
    }
    layerEncoder=new GSLayerEncoder();
  }
  if (store != null) {
    try {
      coverageEncoder.setName(coverageStoreName);
      if (!createCoverage(coverageEncoder,workspace,storeName)) {
        if (LOGGER.isEnabledFor(Level.ERROR))         LOGGER.error("String_Node_Str" + storeName);
        return false;
      }
      if (!configureLayer(workspace,coverageStoreName,layerEncoder)) {
        if (LOGGER.isEnabledFor(Level.ERROR))         LOGGER.error("String_Node_Str" + coverageStoreName);
        return false;
      }
    }
 catch (    Exception e) {
      if (LOGGER.isEnabledFor(Level.WARN))       LOGGER.warn("String_Node_Str" + storeName,e);
      store=null;
      return false;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @deprecated use {@link #publishExternalMosaic(String workspace, final String storeName, File mosaicDir, GSCoverageEncoder coverageEncoder,GSLayerEncoder layerEncoder)}
 * @param workspace
 * @param storeName
 * @param mosaicDir
 * @param coverageEncoder
 * @param layerEncoder
 * @return
 * @throws FileNotFoundException
 */
public boolean createExternalMosaic(String workspace,String storeName,File mosaicDir,GSCoverageEncoder coverageEncoder,GSLayerEncoder layerEncoder) throws FileNotFoundException {
  return publishExternalMosaic(workspace,storeName,mosaicDir,coverageEncoder,layerEncoder);
}
Program: 178004
Project: 178004
Buggy source:
/** 
 * Publish a zipped worldimage file. It is assumed that the the zip-file contain the *.prj to set the srs. <P> This is equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: application/zip' \ --data-binary @$ZIPFILE \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$COVERAGESTORE/file.worldimage </PRE>}
 * @param workspace Workspace to use
 * @param coveragestore Name of the coveragestore
 * @param zipFile zip file to upload
 * @param configure Configure parameter. It may be null.
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are: <ul> <li> <b>coverageName=name</b> coverageName parameter to append. Only works if configure is not set to ParameterConfigure.NONE. </li> </ul>
 * @see #{@link ParameterConfigure}
 * @return true if the operation completed successfully.
 */
public boolean publishWorldImage(String workspace,String coveragestore,File zipFile,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  return publishCoverage(workspace,coveragestore,"String_Node_Str","String_Node_Str",zipFile,configure,params);
}

Fixed version (ground truth):
/** 
 * Publish a zipped worldimage file. It is assumed that the the zip-file contain the *.prj to set the srs. <P> This is equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: application/zip' \ --data-binary @$ZIPFILE \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$COVERAGESTORE/file.worldimage </PRE>}
 * @param workspace Workspace to use
 * @param coveragestore Name of the coveragestore
 * @param zipFile zip file to upload
 * @param configure Configure parameter. It may be null.
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are: <ul> <li> <b>coverageName=name</b> coverageName parameter to append. Only works if configure is not set to ParameterConfigure.NONE. </li> </ul>
 * @see #{@link ParameterConfigure}
 * @return true if the operation completed successfully.
 */
public boolean publishWorldImage(String workspace,String coveragestore,File zipFile,ParameterConfigure configure,NameValuePair... params) throws FileNotFoundException {
  return publishCoverage(workspace,coveragestore,CoverageStoreExtension.worldimage,"String_Node_Str",zipFile,configure,params);
}
Program: 178005
Project: 178005
Buggy source:
public void setDefaultStyle(String defaultStyle){
  set("String_Node_Str",defaultStyle);
}

Fixed version (ground truth):
/** 
 * @param defaultStyle The style that will be applied if no style is specified.
 * @throws IllegalArgumentException if defaultStyle is null or empty
 */
public void setDefaultStyle(final String defaultStyle) throws IllegalArgumentException {
  if (defaultStyle == null || defaultStyle.isEmpty())   throw new IllegalArgumentException("String_Node_Str");
  set("String_Node_Str",defaultStyle);
}
Program: 178006
Project: 178006
Buggy source:
/** 
 * @param defaultStyle
 * @deprecated will be set to protected in the next release, please use setDefaultStyle
 */
public void addDefaultStyle(String defaultStyle){
  add("String_Node_Str",defaultStyle);
}

Fixed version (ground truth):
/** 
 * @see {@link GSLayerEncoder#setDefaultStyle(String)}
 * @param defaultStyle 
 */
protected void addDefaultStyle(String defaultStyle){
  add("String_Node_Str",defaultStyle);
}
Program: 178007
Project: 178007
Buggy source:
protected void addEnabled(){
  add("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * enabled the layer
 */
protected void addEnabled(){
  add("String_Node_Str","String_Node_Str");
}
Program: 178008
Project: 178008
Buggy source:
public void insertExternalGeotiff() throws FileNotFoundException, IOException {
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  RESTCoverageStore pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,null,null);
  assertNotNull(pc);
}

Fixed version (ground truth):
public void insertExternalGeotiff() throws FileNotFoundException, IOException {
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  boolean pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,layerName,"String_Node_Str",ProjectionPolicy.FORCE_DECLARED,"String_Node_Str");
  assertTrue(pc);
}
Program: 178009
Project: 178009
Buggy source:
public void testExternalGeotiff() throws FileNotFoundException, IOException {
  if (!enabled())   return;
  deleteAll();
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  assertTrue(reader.getWorkspaces().isEmpty());
  assertTrue(publisher.createWorkspace(DEFAULT_WS));
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  assertFalse("String_Node_Str",existsLayer(layerName));
  RESTCoverageStore pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,null,null);
  assertNotNull("String_Node_Str",pc);
  assertTrue(existsLayer(layerName));
  LOGGER.info(pc);
  RESTCoverageStore reloadedCS=reader.getCoverageStore(DEFAULT_WS,storeName);
  assertEquals(pc.getName(),reloadedCS.getName());
  assertEquals(pc.getWorkspaceName(),reloadedCS.getWorkspaceName());
  assertTrue("String_Node_Str",publisher.unpublishCoverage(DEFAULT_WS,storeName,layerName));
  assertTrue("String_Node_Str",publisher.removeCoverageStore(DEFAULT_WS,storeName));
  assertFalse("String_Node_Str",publisher.unpublishCoverage(DEFAULT_WS,storeName,layerName));
  assertFalse(existsLayer(layerName));
}

Fixed version (ground truth):
public void testExternalGeotiff() throws FileNotFoundException, IOException {
  if (!enabled())   return;
  deleteAll();
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  assertTrue(reader.getWorkspaces().isEmpty());
  assertTrue(publisher.createWorkspace(DEFAULT_WS));
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  assertFalse("String_Node_Str",existsLayer(layerName));
  boolean pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,layerName,"String_Node_Str",ProjectionPolicy.FORCE_DECLARED,"String_Node_Str");
  assertTrue("String_Node_Str",pc);
  assertTrue(existsLayer(layerName));
  LOGGER.info(pc);
  RESTCoverageStore reloadedCS=reader.getCoverageStore(DEFAULT_WS,storeName);
  assertEquals(storeName,reloadedCS.getName());
  assertEquals(DEFAULT_WS,reloadedCS.getWorkspaceName());
  assertTrue("String_Node_Str",publisher.unpublishCoverage(DEFAULT_WS,storeName,layerName));
  assertTrue("String_Node_Str",publisher.removeCoverageStore(DEFAULT_WS,storeName));
  assertFalse("String_Node_Str",publisher.unpublishCoverage(DEFAULT_WS,storeName,layerName));
  assertFalse(existsLayer(layerName));
}
Program: 178011
Project: 178011
Buggy source:
/** 
 * remove workspace and all of its contents
 * @throws IOException
 */
public void testWorkspaceRemoval() throws IOException {
  if (!enabled())   return;
  deleteAll();
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  assertTrue(reader.getWorkspaces().isEmpty());
  assertTrue(publisher.createWorkspace(DEFAULT_WS));
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  assertFalse("String_Node_Str",existsLayer(layerName));
  RESTCoverageStore pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,null,null);
  assertTrue(publisher.removeWorkspace(DEFAULT_WS,true));
}

Fixed version (ground truth):
/** 
 * remove workspace and all of its contents
 * @throws IOException
 */
public void testWorkspaceRemoval() throws IOException {
  if (!enabled())   return;
  deleteAll();
  String storeName="String_Node_Str";
  String layerName="String_Node_Str";
  assertTrue(reader.getWorkspaces().isEmpty());
  assertTrue(publisher.createWorkspace(DEFAULT_WS));
  File geotiff=new ClassPathResource("String_Node_Str").getFile();
  assertFalse("String_Node_Str",existsLayer(layerName));
  boolean pc=publisher.publishExternalGeoTIFF(DEFAULT_WS,storeName,geotiff,layerName,"String_Node_Str",ProjectionPolicy.REPROJECT_TO_DECLARED,"String_Node_Str");
  assertTrue(publisher.removeWorkspace(DEFAULT_WS,true));
}
Program: 178012
Project: 178012
Buggy source:
/** 
 * Store and publish an SLD, assigning it a name.
 * @param sldFile the File containing the SLD document.
 * @param name    the Style name.
 * @return <TT>true</TT> if the operation completed successfully.
 */
public boolean publishStyle(File sldFile,String name){
  String sUrl=restURL + "String_Node_Str";
  if (name != null) {
    sUrl+="String_Node_Str" + encode(name);
  }
  LOGGER.debug("String_Node_Str" + name + "String_Node_Str"+ sUrl);
  String result=HTTPUtils.post(sUrl,sldFile,"String_Node_Str",gsuser,gspass);
  return result != null;
}

Fixed version (ground truth):
/** 
 * Store and publish an SLD, assigning it a name.
 * @param sldFile the File containing the SLD document.
 * @param name the Style name.
 * @return <TT>true</TT> if the operation completed successfully.
 */
public boolean publishStyle(File sldFile,String name){
  String sUrl=restURL + "String_Node_Str";
  if (name != null) {
    sUrl+="String_Node_Str" + encode(name);
  }
  LOGGER.debug("String_Node_Str" + name + "String_Node_Str"+ sUrl);
  String result=HTTPUtils.post(sUrl,sldFile,"String_Node_Str",gsuser,gspass);
  return result != null;
}
Program: 178013
Project: 178013
Buggy source:
/** 
 * Removes the featuretype and the associated layer. <BR>You may also want to   {@link #removeDatastore(String,String) remove the datastore}.
 * @return true if the operation completed successfully.
 */
public boolean unpublishFeatureType(String workspace,String storename,String layername){
  try {
    URL deleteLayerUrl=new URL(restURL + "String_Node_Str" + layername);
    boolean layerDeleted=HTTPUtils.delete(deleteLayerUrl.toExternalForm(),gsuser,gspass);
    if (!layerDeleted) {
      LOGGER.warn("String_Node_Str" + layername + "String_Node_Str");
      return false;
    }
    URL deleteFtUrl=new URL(restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storename+ "String_Node_Str"+ layername);
    boolean ftDeleted=HTTPUtils.delete(deleteFtUrl.toExternalForm(),gsuser,gspass);
    if (!ftDeleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername+ "String_Node_Str");
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername);
    }
    return ftDeleted;
  }
 catch (  MalformedURLException ex) {
    LOGGER.error(ex);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Removes the featuretype and the associated layer. <BR> You may also want to   {@link #removeDatastore(String,String) remove thedatastore}.
 * @return true if the operation completed successfully.
 */
public boolean unpublishFeatureType(String workspace,String storename,String layerName){
  try {
    final String fqLayerName;
    if (workspace == null) {
      fqLayerName=layerName;
      if (LOGGER.isEnabledFor(Level.WARN)) {
        LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
      }
    }
 else {
      fqLayerName=workspace + "String_Node_Str" + layerName;
    }
    URL deleteLayerUrl=new URL(restURL + "String_Node_Str" + fqLayerName);
    boolean layerDeleted=HTTPUtils.delete(deleteLayerUrl.toExternalForm(),gsuser,gspass);
    if (!layerDeleted) {
      LOGGER.warn("String_Node_Str" + fqLayerName + "String_Node_Str");
      return false;
    }
    URL deleteFtUrl=new URL(restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storename+ "String_Node_Str"+ layerName);
    boolean ftDeleted=HTTPUtils.delete(deleteFtUrl.toExternalForm(),gsuser,gspass);
    if (!ftDeleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layerName+ "String_Node_Str");
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layerName);
    }
    return ftDeleted;
  }
 catch (  MalformedURLException ex) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error(ex);
    return false;
  }
}
Program: 178014
Project: 178014
Buggy source:
/** 
 * Create a PostGIS datastore.
 * @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the database.
 * @param datastoreEncoder the set of parameters to be set to the datastore (including connection params)
 * @return <TT>true</TT> if the PostGIS datastore has been successfully created, <TT>false</TT> otherwise
 */
public boolean createPostGISDatastore(String workspace,GSPostGISDatastoreEncoder datastoreEncoder){
  String sUrl=restURL + "String_Node_Str" + workspace+ "String_Node_Str";
  String xml=datastoreEncoder.toString();
  String result=HTTPUtils.postXml(sUrl,xml,gsuser,gspass);
  return result != null;
}

Fixed version (ground truth):
/** 
 * Create a PostGIS datastore.
 * @param workspace Name of the workspace to contain the database. This will also be the prefix of any layer names created from tables in the database.
 * @param datastoreEncoder the set of parameters to be set to the datastore (including connection params)
 * @return <TT>true</TT> if the PostGIS datastore has been successfullycreated, <TT>false</TT> otherwise
 */
public boolean createPostGISDatastore(String workspace,GSPostGISDatastoreEncoder datastoreEncoder){
  String sUrl=restURL + "String_Node_Str" + workspace+ "String_Node_Str";
  String xml=datastoreEncoder.toString();
  String result=HTTPUtils.postXml(sUrl,xml,gsuser,gspass);
  return result != null;
}
Program: 178015
Project: 178015
Buggy source:
public boolean removeLayer(final String workspace,final String layerName){
  final String fqLayerName;
  if (workspace == null) {
    fqLayerName=layerName;
    if (LOGGER.isEnabledFor(Level.WARN)) {
      LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
    }
  }
 else {
    fqLayerName=workspace + "String_Node_Str" + layerName;
  }
  if (layerName == null) {
    if (LOGGER.isEnabledFor(Level.ERROR)) {
      LOGGER.error("String_Node_Str" + layerName);
    }
    return false;
  }
  final String url=restURL + "String_Node_Str" + fqLayerName;
  boolean result=HTTPUtils.delete(url,gsuser,gspass);
  if (result) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * remove a generic given layer from a given workspace
 * @param workspace
 * @param layerName
 * @return true if success
 */
public boolean removeLayer(final String workspace,final String layerName){
  final String fqLayerName;
  if (workspace == null) {
    fqLayerName=layerName;
    if (LOGGER.isEnabledFor(Level.WARN)) {
      LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
    }
  }
 else {
    fqLayerName=workspace + "String_Node_Str" + layerName;
  }
  if (layerName == null) {
    if (LOGGER.isEnabledFor(Level.ERROR)) {
      LOGGER.error("String_Node_Str" + layerName);
    }
    return false;
  }
  final String url=restURL + "String_Node_Str" + fqLayerName;
  boolean result=HTTPUtils.delete(url,gsuser,gspass);
  if (result) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName);
  }
  return result;
}
Program: 178017
Project: 178017
Buggy source:
/** 
 * Publish a GeoTiff. <P>This is the equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$FULLPATH" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$STORENAME/external.geotiff}</PRE>
 * @return true if the operation completed successfully.
 * @deprecated UNTESTED
 */
public boolean publishGeoTIFF(String workspace,String storeName,File geotiff) throws FileNotFoundException {
  String sUrl=restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storeName+ "String_Node_Str";
  String sendResult=HTTPUtils.put(sUrl,geotiff,"String_Node_Str",gsuser,gspass);
  boolean sent=sendResult != null;
  return sent;
}

Fixed version (ground truth):
/** 
 * Publish a GeoTiff. <P> This is the equivalent call with cUrl: <PRE>  {@code curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$FULLPATH" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$STORENAME/external.geotiff}</PRE>
 * @return true if the operation completed successfully.
 * @deprecated UNTESTED
 */
public boolean publishGeoTIFF(String workspace,String storeName,File geotiff) throws FileNotFoundException {
  String sUrl=restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storeName+ "String_Node_Str";
  String sendResult=HTTPUtils.put(sUrl,geotiff,"String_Node_Str",gsuser,gspass);
  boolean sent=sendResult != null;
  return sent;
}
Program: 178019
Project: 178019
Buggy source:
/** 
 * Allows to configure some coverage's attributes
 */
protected boolean configureCoverage(final GSCoverageEncoder ce,String wsname,String csname,String cname){
  final String url=restURL + "String_Node_Str" + wsname+ "String_Node_Str"+ csname+ "String_Node_Str"+ cname+ "String_Node_Str";
  String xmlBody=ce.toString();
  String sendResult=HTTPUtils.putXml(url,xmlBody,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + wsname + "String_Node_Str"+ csname+ "String_Node_Str"+ cname+ "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}

Fixed version (ground truth):
/** 
 * Allows to configure some coverage's attributes
 * @param ce Coverage encoder
 * @param wsname workspace name
 * @param csname coveragestore name
 * @param cname coverage name (if != null will override the CoverageEncoder name)
 * @return true if success
 * @deprecated
 */
protected boolean configureCoverage(final GSCoverageEncoder ce,final String wsname,final String csname,String cname){
  if (cname != null)   ce.setName(cname);
 else   cname=ce.getName();
  return configureCoverage(ce,wsname,csname);
}
Program: 178020
Project: 178020
Buggy source:
/** 
 * Publish a Mosaic already in a filesystem readable by GeoServer. <P> Sample cUrl usage:<BR> <> <TT>curl -u admin:geoserver -XPUT -H 'Content-type: text' -d "file:$ABSPORTDIR" http://$GSIP:$GSPORT/$SERVLET/rest/workspaces/$WORKSPACE/coveragestores/$BAREDIR/external.imagemosaic </TT>
 * @param workspace an existing workspace
 * @param storeName the name of the coverageStore to be created
 * @param mosaicDir the directory where the raster images are located
 * @return true if the operation completed successfully.
 * @throws FileNotFoundException
 */
public RESTCoverageStore configureExternaMosaicDatastore(String workspace,String storeName,File mosaicDir) throws FileNotFoundException {
  if (!mosaicDir.isDirectory()) {
    throw new IllegalArgumentException("String_Node_Str" + mosaicDir + "String_Node_Str");
  }
  String sUrl=restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storeName+ "String_Node_Str";
  String sendResult=HTTPUtils.put(sUrl,mosaicDir.toURI().toString(),"String_Node_Str",gsuser,gspass);
  return RESTCoverageStore.build(sendResult);
}

Fixed version (ground truth):
/** 
 * @deprecated provided for backward compatibility use {@link
	 *             createExternaMosaicDatastore(String workspace, StringstoreName, File mosaicDir, CoverageConfigure configure)}
 * @param workspace
 * @param storeName
 * @param mosaicDir
 * @return
 * @throws FileNotFoundException
 */
public RESTCoverageStore configureExternaMosaicDatastore(String workspace,String storeName,File mosaicDir) throws FileNotFoundException {
  return createExternaMosaicDatastore(workspace,storeName,mosaicDir,ParameterConfigure.FIRST,ParameterUpdate.APPEND);
}
Program: 178022
Project: 178022
Buggy source:
/** 
 * reload the target geoserver configuration
 * @return true if success
 * @see http://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html
 */
public boolean reload(){
  String sUrl=restURL + "String_Node_Str";
  String result=HTTPUtils.post(sUrl,"String_Node_Str","String_Node_Str",gsuser,gspass);
  return result != null;
}

Fixed version (ground truth):
/** 
 * reload the target geoserver configuration
 * @return true if success
 * @see http ://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html
 */
public boolean reload(){
  String sUrl=restURL + "String_Node_Str";
  String result=HTTPUtils.post(sUrl,"String_Node_Str","String_Node_Str",gsuser,gspass);
  return result != null;
}
Program: 178023
Project: 178023
Buggy source:
/** 
 * reset the target geoserver configuration
 * @return true if success
 * @see http://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html
 */
public boolean reset(){
  String sUrl=restURL + "String_Node_Str";
  String result=HTTPUtils.post(sUrl,"String_Node_Str","String_Node_Str",gsuser,gspass);
  return result != null;
}

Fixed version (ground truth):
/** 
 * reset the target geoserver configuration
 * @return true if success
 * @see http ://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html
 */
public boolean reset(){
  String sUrl=restURL + "String_Node_Str";
  String result=HTTPUtils.post(sUrl,"String_Node_Str","String_Node_Str",gsuser,gspass);
  return result != null;
}
Program: 178024
Project: 178024
Buggy source:
/** 
 * Create a new Workspace
 * @param workspace The name of the new workspace.<P> This is the equivalent call with cUrl: <PRE> {@code curl -u admin:geoserver -XPOST \-H 'Content-type: text/xml' \ -d "<workspace><name>$WORKSPACE</name></workspace>" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces}</PRE>
 */
public boolean createWorkspace(final String workspace){
  final String sUrl=restURL + "String_Node_Str";
  final GSWorkspaceEncoder wsenc=new GSWorkspaceEncoder(workspace);
  final String wsxml=wsenc.toString();
  final String result=HTTPUtils.postXml(sUrl,wsxml,gsuser,gspass);
  return result != null;
}

Fixed version (ground truth):
/** 
 * Create a new Workspace
 * @param workspace The name of the new workspace. <P> This is the equivalent call with cUrl: <PRE> {@code curl -u admin:geoserver -XPOST \-H 'Content-type: text/xml' \ -d "<workspace><name>$WORKSPACE</name></workspace>" \ http://$GSIP:$GSPORT/$SERVLET/rest/workspaces}</PRE>
 */
public boolean createWorkspace(final String workspace){
  final String sUrl=restURL + "String_Node_Str";
  final GSWorkspaceEncoder wsenc=new GSWorkspaceEncoder(workspace);
  final String wsxml=wsenc.toString();
  final String result=HTTPUtils.postXml(sUrl,wsxml,gsuser,gspass);
  return result != null;
}
Program: 178025
Project: 178025
Buggy source:
/** 
 * Allows to configure some layer attributes such as WmsPath and DefaultStyle
 */
public boolean configureLayer(final String workspace,final String layerName,final GSLayerEncoder layer){
  if (layer.isEmpty()) {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str");
    return true;
  }
  final String fqLayerName;
  if (workspace == null) {
    fqLayerName=layerName;
    if (LOGGER.isEnabledFor(Level.WARN)) {
      LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
    }
  }
 else {
    fqLayerName=workspace + "String_Node_Str" + layerName;
  }
  final String url=restURL + "String_Node_Str" + fqLayerName;
  String layerXml=layer.toString();
  String sendResult=HTTPUtils.putXml(url,layerXml,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName + "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}

Fixed version (ground truth):
/** 
 * Allows to configure some layer attributes such and DefaultStyle TODO WmsPath
 */
public boolean configureLayer(final String workspace,final String layerName,final GSLayerEncoder layer){
  if (layer.isEmpty()) {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str");
    return true;
  }
  final String fqLayerName;
  if (workspace == null) {
    fqLayerName=layerName;
    if (LOGGER.isEnabledFor(Level.WARN)) {
      LOGGER.warn("String_Node_Str" + layerName + "String_Node_Str");
    }
  }
 else {
    fqLayerName=workspace + "String_Node_Str" + layerName;
  }
  final String url=restURL + "String_Node_Str" + fqLayerName;
  String layerXml=layer.toString();
  String sendResult=HTTPUtils.putXml(url,layerXml,gsuser,gspass);
  if (sendResult != null) {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("String_Node_Str" + fqLayerName);
    }
  }
 else {
    if (LOGGER.isEnabledFor(Level.WARN))     LOGGER.warn("String_Node_Str" + fqLayerName + "String_Node_Str"+ sendResult+ "String_Node_Str");
  }
  return sendResult != null;
}
Program: 178026
Project: 178026
Buggy source:
/** 
 * Remove a given CoverageStore in a given Workspace.
 * @param workspace The name of the workspace
 * @param storename The name of the CoverageStore to remove.
 * @return <TT>true</TT> if the CoverageStore was successfully removed.
 */
public boolean removeCoverageStore(String workspace,String storename){
  try {
    URL deleteStore=new URL(restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storename);
    boolean deleted=HTTPUtils.delete(deleteStore.toExternalForm(),gsuser,gspass);
    if (!deleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
    return deleted;
  }
 catch (  MalformedURLException ex) {
    LOGGER.error(ex);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Remove a given CoverageStore in a given Workspace.
 * @param workspace The name of the workspace
 * @param storename The name of the CoverageStore to remove.
 * @param recurse if remove should be performed recursively
 * @return <TT>true</TT> if the CoverageStore was successfully removed.
 */
public boolean removeCoverageStore(final String workspace,final String storename,final boolean recurse){
  try {
    final StringBuilder url=new StringBuilder(restURL);
    url.append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename);
    if (recurse)     url.append("String_Node_Str");
    final URL deleteStore=new URL(url.toString());
    boolean deleted=HTTPUtils.delete(deleteStore.toExternalForm(),gsuser,gspass);
    if (!deleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
    return deleted;
  }
 catch (  MalformedURLException ex) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error(ex);
    return false;
  }
}
Program: 178028
Project: 178028
Buggy source:
/** 
 * Remove a given Datastore in a given Workspace.
 * @param workspace The name of the workspace
 * @param storename The name of the Datastore to remove.
 * @return <TT>true</TT> if the datastore was successfully removed.
 */
public boolean removeDatastore(String workspace,String storename){
  try {
    URL deleteStore=new URL(restURL + "String_Node_Str" + workspace+ "String_Node_Str"+ storename);
    boolean deleted=HTTPUtils.delete(deleteStore.toExternalForm(),gsuser,gspass);
    if (!deleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
    return deleted;
  }
 catch (  MalformedURLException ex) {
    LOGGER.error(ex);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Remove a given Datastore in a given Workspace.
 * @param workspace The name of the workspace
 * @param storename The name of the Datastore to remove.
 * @param recurse if remove should be performed recursively
 * @return <TT>true</TT> if the datastore was successfully removed.
 */
public boolean removeDatastore(String workspace,String storename,final boolean recurse){
  try {
    final StringBuilder url=new StringBuilder(restURL);
    url.append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename);
    if (recurse)     url.append("String_Node_Str");
    final URL deleteStore=new URL(url.toString());
    boolean deleted=HTTPUtils.delete(deleteStore.toExternalForm(),gsuser,gspass);
    if (!deleted) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
 else {
      LOGGER.info("String_Node_Str" + workspace + "String_Node_Str"+ storename);
    }
    return deleted;
  }
 catch (  MalformedURLException ex) {
    if (LOGGER.isEnabledFor(Level.ERROR))     LOGGER.error(ex);
    return false;
  }
}
Program: 178029
Project: 178029
Buggy source:
public static RESTCoverageStore build(String response){
  if (response == null)   return null;
  Element pb=JDOMBuilder.buildElement(response);
  if (pb != null)   return new RESTCoverageStore(pb);
 else   return null;
}

Fixed version (ground truth):
public static RESTCoverageStore build(String response){
  if (response == null)   return null;
  if (response.isEmpty())   return new RESTCoverageStore(new Element("String_Node_Str"));
  Element pb=JDOMBuilder.buildElement(response);
  if (pb != null)   return new RESTCoverageStore(pb);
 else   return null;
}
Program: 178030
Project: 178030
Buggy source:
public void setLatLonBoundingBox(double minx,double maxy,double maxx,double miny,final String crs){
  set(LATLONBBMINX,String.valueOf(minx));
  set(LATLONBBMAXY,String.valueOf(maxy));
  set(LATLONBBMAXX,String.valueOf(maxx));
  set(LATLONBBMINY,String.valueOf(miny));
  set(LATLONBBCRS,crs);
}

Fixed version (ground truth):
public void setLatLonBoundingBox(double minx,double miny,double maxx,double maxy,final String crs){
  set(LATLONBBMINX,String.valueOf(minx));
  set(LATLONBBMAXY,String.valueOf(maxy));
  set(LATLONBBMAXX,String.valueOf(maxx));
  set(LATLONBBMINY,String.valueOf(miny));
  set(LATLONBBCRS,crs);
}