Program: 177995
Project: 177995
Buggy source:
/** 
 * Publish a zipped shapefile.<br> http://docs.geoserver.org/stable/en/user /restconfig/rest-config-examples/rest- config-examples-curl.html#uploading-a-shapefile
 * @param workspace the name of the workspace to use
 * @param storename the name of the store to create
 * @param layername the name of the layer to configure
 * @param zipFile the zip file containing the shapefile
 * @param srs the native CRS
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are:<br> <ul> <li><b>charset</b> used to set the charset</li> </ul>
 * @return true if success false otherwise
 * @throws FileNotFoundException
 */
public boolean publishShp(String workspace,String storename,String layername,File zipFile,String srs,NameValuePair... params) throws FileNotFoundException {
  StringBuilder sbUrl=new StringBuilder(restURL).append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename).append("String_Node_Str");
  sbUrl.append(appendParameters(params));
  String sentResult=HTTPUtils.put(sbUrl.toString(),zipFile,"String_Node_Str",gsuser,gspass);
  boolean shpSent=sentResult != null;
  if (shpSent) {
    LOGGER.info("String_Node_Str" + layername + "String_Node_Str"+ zipFile+ "String_Node_Str");
    StringBuilder postUrl=new StringBuilder(restURL).append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename).append("String_Node_Str").append(layername);
    GSFeatureTypeEncoder fte=new GSFeatureTypeEncoder();
    fte.addName(layername);
    fte.addSRS(srs);
    fte.addProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
    String configuredResult=HTTPUtils.putXml(postUrl.toString(),fte.toString(),this.gsuser,this.gspass);
    boolean shpConfigured=configuredResult != null;
    if (!shpConfigured) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername+ "String_Node_Str"+ zipFile);
    }
 else {
      LOGGER.info("String_Node_Str" + layername + "String_Node_Str");
    }
    return shpConfigured;
  }
 else {
    LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername+ "String_Node_Str"+ zipFile);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Publish a zipped shapefile.<br> http://docs.geoserver.org/stable/en/user /restconfig/rest-config-examples/rest- config-examples-curl.html#uploading-a-shapefile
 * @param workspace the name of the workspace to use
 * @param storename the name of the store to create
 * @param layername the name of the layer to configure
 * @param zipFile the zip file containing the shapefile
 * @param srs the native CRS
 * @param params parameters to append to the url (can be null).<br> Accepted parameters are:<br> <ul> <li><b>charset</b> used to set the charset</li> </ul>
 * @return true if success false otherwise
 * @throws FileNotFoundException
 */
public boolean publishShp(String workspace,String storename,String layername,File zipFile,String srs,NameValuePair... params) throws FileNotFoundException {
  StringBuilder sbUrl=new StringBuilder(restURL).append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename).append("String_Node_Str");
  sbUrl.append(appendParameters(params));
  String sentResult=HTTPUtils.put(sbUrl.toString(),zipFile,"String_Node_Str",gsuser,gspass);
  boolean shpSent=sentResult != null;
  if (shpSent) {
    LOGGER.info("String_Node_Str" + layername + "String_Node_Str"+ zipFile+ "String_Node_Str");
    StringBuilder postUrl=new StringBuilder(restURL).append("String_Node_Str").append(workspace).append("String_Node_Str").append(storename).append("String_Node_Str").append(layername);
    GSFeatureTypeEncoder fte=new GSFeatureTypeEncoder();
    fte.setName(layername);
    fte.setSRS(srs);
    fte.setProjectionPolicy(ProjectionPolicy.FORCE_DECLARED);
    String configuredResult=HTTPUtils.putXml(postUrl.toString(),fte.toString(),this.gsuser,this.gspass);
    boolean shpConfigured=configuredResult != null;
    if (!shpConfigured) {
      LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername+ "String_Node_Str"+ zipFile);
    }
 else {
      LOGGER.info("String_Node_Str" + layername + "String_Node_Str");
    }
    return shpConfigured;
  }
 else {
    LOGGER.warn("String_Node_Str" + workspace + "String_Node_Str"+ storename+ "String_Node_Str"+ layername+ "String_Node_Str"+ zipFile);
    return false;
  }
}