Program: 80241
Project: 80241
Buggy source:
protected void getResponse(String url,HttpResponse response,HttpRequestBase method,Map<String,Object> headers){
  long startTime=0;
  long endTime=-1;
  try {
    if (headers != null) {
      for (      String key : headers.keySet()) {
        Object value=headers.get(key);
        if (value != null) {
          method.setHeader(key,value.toString());
        }
      }
    }
    org.apache.http.HttpResponse resp;
    CookieStore store=response.getCookieStore();
    startTime=currentTimeMillis();
    if (store == null) {
      resp=getHttpResponse(url,method);
    }
 else {
      resp=getHttpResponse(store,url,method);
    }
    endTime=currentTimeMillis();
    int returnCode=resp.getStatusLine().getStatusCode();
    response.setStatusCode(returnCode);
    HttpEntity entity=resp.getEntity();
    Map<String,String> responseHeaders=response.getResponseHeaders();
    for (    Header h : resp.getAllHeaders()) {
      responseHeaders.put(h.getName(),h.getValue());
    }
    if (entity == null) {
      response.setResponse(null);
    }
 else {
      if (response instanceof BinaryHttpResponse) {
        BinaryHttpResponse binaryHttpResponse=(BinaryHttpResponse)response;
        byte[] content=EntityUtils.toByteArray(entity);
        binaryHttpResponse.setResponseContent(content);
        String fileName=getAttachmentFileName(resp);
        binaryHttpResponse.setFileName(fileName);
      }
 else {
        String result=EntityUtils.toString(entity);
        response.setResponse(result);
      }
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + url,e);
  }
 finally {
    if (startTime > 0) {
      if (endTime < 0) {
        endTime=currentTimeMillis();
      }
    }
    response.setResponseTime(endTime - startTime);
    method.reset();
  }
}

Fixed version (ground truth):
protected void getResponse(String url,HttpResponse response,HttpRequestBase method,Map<String,Object> headers){
  long startTime=0;
  long endTime=-1;
  try {
    if (headers != null) {
      for (      String key : headers.keySet()) {
        Object value=headers.get(key);
        if (value != null) {
          method.setHeader(key,value.toString());
        }
      }
    }
    org.apache.http.HttpResponse resp;
    CookieStore store=response.getCookieStore();
    startTime=currentTimeMillis();
    if (store == null) {
      resp=getHttpResponse(url,method);
    }
 else {
      resp=getHttpResponse(store,url,method);
    }
    endTime=currentTimeMillis();
    int returnCode=resp.getStatusLine().getStatusCode();
    response.setStatusCode(returnCode);
    HttpEntity entity=resp.getEntity();
    copyHeaders(response.getResponseHeaders(),resp.getAllHeaders());
    if (entity == null) {
      response.setResponse(null);
    }
 else {
      if (response instanceof BinaryHttpResponse) {
        BinaryHttpResponse binaryHttpResponse=(BinaryHttpResponse)response;
        byte[] content=EntityUtils.toByteArray(entity);
        binaryHttpResponse.setResponseContent(content);
        String fileName=getAttachmentFileName(resp);
        binaryHttpResponse.setFileName(fileName);
      }
 else {
        String result=EntityUtils.toString(entity);
        response.setResponse(result);
      }
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + url,e);
  }
 finally {
    if (startTime > 0) {
      if (endTime < 0) {
        endTime=currentTimeMillis();
      }
    }
    response.setResponseTime(endTime - startTime);
    method.reset();
  }
}