Program: 35835
Project: 35835
Buggy source:
public HttpResource(HttpClient httpClient,String baseUrl,Target target){
  this.target=target;
  HttpState httpState=null;
  if (target.getContext() != null)   httpState=target.getContext().getHttpState();
  if ("String_Node_Str".equalsIgnoreCase(target.getMethod()) || !target.isProxyMode()) {
    url=ResourceUtils.getHttpUrlWithQueryString(baseUrl,target);
    httpMethod=new GetMethod(url);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(target.getMethod())) {
    url=ResourceUtils.getHttpUrl(baseUrl,target);
    PostMethod postMethod=new PostMethod(url);
    Context context=target.getContext();
    Map<String,String> parameters=target.getParameters();
    if (context != null) {
      for (      Map.Entry<String,String> temp : context.getParameterMap().entrySet()) {
        postMethod.addParameter(new NameValuePair(temp.getKey(),temp.getValue()));
      }
    }
    if (parameters != null) {
      for (      Map.Entry<String,String> temp : parameters.entrySet()) {
        postMethod.addParameter(new NameValuePair(temp.getKey(),temp.getValue()));
      }
    }
    if (target.getOriginalRequest() != null) {
      for (      Object obj : target.getOriginalRequest().getParameterMap().entrySet()) {
        @SuppressWarnings("String_Node_Str") Entry<String,String[]> entry=(Entry<String,String[]>)obj;
        for (int i=0; i < entry.getValue().length; i++) {
          postMethod.addParameter(new NameValuePair(entry.getKey(),(entry.getValue())[i]));
        }
      }
    }
    httpMethod=postMethod;
  }
 else {
    throw new UnsupportedHttpMethodException(target.getMethod() + "String_Node_Str" + ResourceUtils.getHttpUrl(baseUrl,target));
  }
  if (target.isProxyMode()) {
    httpMethod.setFollowRedirects(false);
  }
 else {
    httpMethod.setFollowRedirects(true);
  }
  try {
    httpClient.executeMethod(httpClient.getHostConfiguration(),httpMethod,httpState);
    statusCode=httpMethod.getStatusCode();
    statusText=httpMethod.getStatusText();
    if (statusCode != HttpServletResponse.SC_OK && statusCode != HttpServletResponse.SC_MOVED_TEMPORARILY && statusCode != HttpServletResponse.SC_MOVED_PERMANENTLY)     log.warn("String_Node_Str" + url + "String_Node_Str"+ statusCode+ "String_Node_Str"+ statusText);
  }
 catch (  ConnectTimeoutException e) {
    statusCode=HttpServletResponse.SC_GATEWAY_TIMEOUT;
    statusText="String_Node_Str" + url;
    log.warn("String_Node_Str" + url);
  }
catch (  SocketTimeoutException e) {
    statusCode=HttpServletResponse.SC_GATEWAY_TIMEOUT;
    statusText="String_Node_Str" + url;
    log.warn("String_Node_Str" + url);
  }
catch (  HttpException e) {
    statusCode=HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    statusText="String_Node_Str" + url;
    log.error("String_Node_Str" + url,e);
  }
catch (  IOException e) {
    statusCode=HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    statusText="String_Node_Str" + url;
    log.error("String_Node_Str" + url,e);
  }
}

Fixed version (ground truth):
public HttpResource(HttpClient httpClient,String baseUrl,Target target){
  this.target=target;
  HttpState httpState=null;
  if (target.getContext() != null)   httpState=target.getContext().getHttpState();
  if ("String_Node_Str".equalsIgnoreCase(target.getMethod()) || !target.isProxyMode()) {
    url=ResourceUtils.getHttpUrlWithQueryString(baseUrl,target);
    httpMethod=new GetMethod(url);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(target.getMethod())) {
    url=ResourceUtils.getHttpUrl(baseUrl,target);
    PostMethod postMethod=new PostMethod(url);
    postMethod.getParams().setContentCharset(target.getOriginalRequest().getCharacterEncoding());
    Context context=target.getContext();
    Map<String,String> parameters=target.getParameters();
    if (context != null) {
      for (      Map.Entry<String,String> temp : context.getParameterMap().entrySet()) {
        postMethod.addParameter(new NameValuePair(temp.getKey(),temp.getValue()));
      }
    }
    if (parameters != null) {
      for (      Map.Entry<String,String> temp : parameters.entrySet()) {
        postMethod.addParameter(new NameValuePair(temp.getKey(),temp.getValue()));
      }
    }
    if (target.getOriginalRequest() != null) {
      for (      Object obj : target.getOriginalRequest().getParameterMap().entrySet()) {
        @SuppressWarnings("String_Node_Str") Entry<String,String[]> entry=(Entry<String,String[]>)obj;
        for (int i=0; i < entry.getValue().length; i++) {
          postMethod.addParameter(new NameValuePair(entry.getKey(),(entry.getValue())[i]));
        }
      }
    }
    httpMethod=postMethod;
  }
 else {
    throw new UnsupportedHttpMethodException(target.getMethod() + "String_Node_Str" + ResourceUtils.getHttpUrl(baseUrl,target));
  }
  if (target.isProxyMode()) {
    httpMethod.setFollowRedirects(false);
  }
 else {
    httpMethod.setFollowRedirects(true);
  }
  try {
    httpClient.executeMethod(httpClient.getHostConfiguration(),httpMethod,httpState);
    statusCode=httpMethod.getStatusCode();
    statusText=httpMethod.getStatusText();
    if (statusCode != HttpServletResponse.SC_OK && statusCode != HttpServletResponse.SC_MOVED_TEMPORARILY && statusCode != HttpServletResponse.SC_MOVED_PERMANENTLY)     log.warn("String_Node_Str" + url + "String_Node_Str"+ statusCode+ "String_Node_Str"+ statusText);
  }
 catch (  ConnectTimeoutException e) {
    statusCode=HttpServletResponse.SC_GATEWAY_TIMEOUT;
    statusText="String_Node_Str" + url;
    log.warn("String_Node_Str" + url);
  }
catch (  SocketTimeoutException e) {
    statusCode=HttpServletResponse.SC_GATEWAY_TIMEOUT;
    statusText="String_Node_Str" + url;
    log.warn("String_Node_Str" + url);
  }
catch (  HttpException e) {
    statusCode=HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    statusText="String_Node_Str" + url;
    log.error("String_Node_Str" + url,e);
  }
catch (  IOException e) {
    statusCode=HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    statusText="String_Node_Str" + url;
    log.error("String_Node_Str" + url,e);
  }
}