Program: 7543
Project: 7543
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public HttpResponse doRequest(String url,HttpMethod method,Map<String,Object> requestParameters,String charset) throws IOException {
  HttpEntity entity=null;
  if (method == HttpMethod.GET) {
    List<NameValuePair> params=toNameValuePairList(requestParameters);
    String queryString=URLEncodedUtils.format(params,"String_Node_Str");
    if (queryString != null && !queryString.isEmpty()) {
      url=url.contains("String_Node_Str") ? url + "String_Node_Str" + queryString : url + "String_Node_Str" + queryString;
    }
  }
 else {
    List<NameValuePair> params=toNameValuePairList(requestParameters);
    entity=new UrlEncodedFormEntity(params,"String_Node_Str");
  }
  readGetParameters(url);
  HttpClient httpClient=new DefaultHttpClient();
  HttpUriRequest request=getRequest(method,url);
  httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,connectTimeoutMillis);
  httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,readTimeoutMillis);
  httpClient.getParams().setParameter(CoreProtocolPNames.USER_AGENT,USER_AGENT);
  httpClient.getParams().setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET,charset);
  for (  String name : headersToOverwrite.keySet()) {
    request.setHeader(name,headersToOverwrite.get(name));
  }
  String oAuthNonce=String.valueOf(new SecureRandom().nextLong());
  Long oAuthTimestamp=System.currentTimeMillis() / 1000;
  String signature=getSignature(url,method,oAuthNonce,oAuthTimestamp);
  String authorizationHeader=getAuthorizationHeader(signature,oAuthNonce,oAuthTimestamp);
  request.setHeader("String_Node_Str",authorizationHeader);
  if (entity != null) {
    if (method == HttpMethod.POST) {
      HttpPost postRequest=(HttpPost)request;
      postRequest.setEntity(entity);
    }
 else     if (method == HttpMethod.PUT) {
      HttpPut putRequest=(HttpPut)request;
      putRequest.setEntity(entity);
    }
  }
  org.apache.http.HttpResponse apacheHCResponse=httpClient.execute(request);
  if (apacheHCResponse.getStatusLine().getStatusCode() >= 400) {
    HttpResponse httpResponse=toReturnValue(apacheHCResponse,charset);
    throw new HttpException(apacheHCResponse.getStatusLine().getReasonPhrase(),httpResponse);
  }
  return toReturnValue(apacheHCResponse,charset);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public HttpResponse doRequest(String url,HttpMethod method,Map<String,Object> requestParameters,String charset) throws IOException {
  HttpEntity entity=null;
  if (method == HttpMethod.GET) {
    List<NameValuePair> params=toNameValuePairList(requestParameters);
    String queryString=URLEncodedUtils.format(params,"String_Node_Str");
    if (queryString != null && !queryString.isEmpty()) {
      url=url.contains("String_Node_Str") ? url + "String_Node_Str" + queryString : url + "String_Node_Str" + queryString;
    }
  }
 else {
    List<NameValuePair> params=toNameValuePairList(requestParameters);
    entity=new UrlEncodedFormEntity(params,"String_Node_Str");
  }
  readQueryStringAndAddToSignatureBaseString(url);
  HttpClient httpClient=new DefaultHttpClient();
  HttpUriRequest request=getRequest(method,url);
  httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,connectTimeoutMillis);
  httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,readTimeoutMillis);
  httpClient.getParams().setParameter(CoreProtocolPNames.USER_AGENT,USER_AGENT);
  httpClient.getParams().setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET,charset);
  for (  String name : headersToOverwrite.keySet()) {
    request.setHeader(name,headersToOverwrite.get(name));
  }
  String oAuthNonce=String.valueOf(new SecureRandom().nextLong());
  Long oAuthTimestamp=System.currentTimeMillis() / 1000;
  String signature=getSignature(url,method,oAuthNonce,oAuthTimestamp);
  String authorizationHeader=getAuthorizationHeader(signature,oAuthNonce,oAuthTimestamp);
  request.setHeader("String_Node_Str",authorizationHeader);
  if (entity != null) {
    if (method == HttpMethod.POST) {
      HttpPost postRequest=(HttpPost)request;
      postRequest.setEntity(entity);
    }
 else     if (method == HttpMethod.PUT) {
      HttpPut putRequest=(HttpPut)request;
      putRequest.setEntity(entity);
    }
  }
  org.apache.http.HttpResponse apacheHCResponse=httpClient.execute(request);
  if (apacheHCResponse.getStatusLine().getStatusCode() >= 400) {
    HttpResponse httpResponse=toReturnValue(apacheHCResponse,charset);
    throw new HttpException(apacheHCResponse.getStatusLine().getReasonPhrase(),httpResponse);
  }
  return toReturnValue(apacheHCResponse,charset);
}