Program: 16796
Project: 16796
Buggy source:
/** 
 * Issue an HTTP request against the service using a given path and request message.
 * @param path    The request path.
 * @param request The request message.
 * @return The HTTP response.
 */
public ResponseMessage send(String path,RequestMessage request){
  URL url=getUrl(path);
  HttpURLConnection cn;
  try {
    cn=(HttpURLConnection)url.openConnection();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  if (cn instanceof HttpsURLConnection) {
    ((HttpsURLConnection)cn).setSSLSocketFactory(sslSocketFactory);
    ((HttpsURLConnection)cn).setHostnameVerifier(HOSTNAME_VERIFIER);
  }
  cn.setUseCaches(false);
  cn.setAllowUserInteraction(false);
  cn.setConnectTimeout(connectTimeout == null ? 0 : connectTimeout);
  cn.setReadTimeout(readTimeout == null ? 0 : readTimeout);
  String method=request.getMethod();
  try {
    cn.setRequestMethod(method);
  }
 catch (  ProtocolException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  Map<String,String> header=request.getHeader();
  for (  Entry<String,String> entry : header.entrySet())   cn.setRequestProperty(entry.getKey(),entry.getValue());
  for (  Entry<String,String> entry : defaultHeader.entrySet()) {
    String key=entry.getKey();
    if (header.containsKey(key))     continue;
    cn.setRequestProperty(key,entry.getValue());
  }
  cn.setRequestProperty("String_Node_Str",cookieStore.getCookies());
  try {
    Object content=request.getContent();
    if (content != null) {
      cn.setDoOutput(true);
      OutputStream stream=cn.getOutputStream();
      OutputStreamWriter writer=new OutputStreamWriter(stream,"String_Node_Str");
      writer.write((String)content);
      writer.close();
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  if (VERBOSE_REQUESTS) {
    System.out.format("String_Node_Str",method,url.toString());
  }
  try {
    cn.connect();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  int status;
  try {
    status=cn.getResponseCode();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  InputStream input=null;
  try {
    input=status >= 400 ? cn.getErrorStream() : cn.getInputStream();
  }
 catch (  IOException e) {
    assert(false);
  }
  cookieStore.add(cn.getHeaderField("String_Node_Str"));
  ResponseMessage response=new ResponseMessage(status,input);
  if (VERBOSE_REQUESTS) {
    System.out.format("String_Node_Str",status);
    if (method.equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + request.getContent());
    }
  }
  if (status >= 400)   throw HttpException.create(response);
  return response;
}

Fixed version (ground truth):
/** 
 * Issue an HTTP request against the service using a given path and request message.
 * @param path    The request path.
 * @param request The request message.
 * @return The HTTP response.
 */
public ResponseMessage send(String path,RequestMessage request){
  URL url=getUrl(path);
  HttpURLConnection cn;
  try {
    cn=(HttpURLConnection)url.openConnection();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  if (cn instanceof HttpsURLConnection) {
    ((HttpsURLConnection)cn).setSSLSocketFactory(sslSocketFactory);
    ((HttpsURLConnection)cn).setHostnameVerifier(HOSTNAME_VERIFIER);
  }
  cn.setUseCaches(false);
  cn.setAllowUserInteraction(false);
  cn.setConnectTimeout(connectTimeout == null ? 0 : connectTimeout);
  cn.setReadTimeout(readTimeout == null ? 0 : readTimeout);
  String method=request.getMethod();
  try {
    cn.setRequestMethod(method);
  }
 catch (  ProtocolException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  Map<String,String> header=request.getHeader();
  for (  Entry<String,String> entry : header.entrySet())   cn.setRequestProperty(entry.getKey(),entry.getValue());
  for (  Entry<String,String> entry : defaultHeader.entrySet()) {
    String key=entry.getKey();
    if (header.containsKey(key))     continue;
    cn.setRequestProperty(key,entry.getValue());
  }
  cn.setRequestProperty("String_Node_Str",cookieStore.getCookies());
  try {
    Object content=request.getContent();
    if (content != null) {
      cn.setDoOutput(true);
      OutputStream stream=cn.getOutputStream();
      OutputStreamWriter writer=new OutputStreamWriter(stream,"String_Node_Str");
      writer.write((String)content);
      writer.close();
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  if (VERBOSE_REQUESTS) {
    System.out.format("String_Node_Str",method,url.toString());
  }
  try {
    cn.connect();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  int status;
  try {
    status=cn.getResponseCode();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  InputStream input=null;
  try {
    input=status >= 400 ? cn.getErrorStream() : cn.getInputStream();
  }
 catch (  IOException e) {
    assert(false);
  }
  Map<String,List<String>> headers=cn.getHeaderFields();
  if (headers.containsKey("String_Node_Str")) {
    for (    String cookieHeader : headers.get("String_Node_Str")) {
      if (cookieHeader != null && cookieHeader.length() > 0)       cookieStore.add(cookieHeader);
    }
  }
  ResponseMessage response=new ResponseMessage(status,input);
  if (VERBOSE_REQUESTS) {
    System.out.format("String_Node_Str",status);
    if (method.equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + request.getContent());
    }
  }
  if (status >= 400)   throw HttpException.create(response);
  return response;
}