Program: 37016
Project: 37016
Buggy source:
@Override public String submitRequest(RequestInfo requestInfo) throws IOException {
  log.debug("String_Node_Str");
  String updateUrl=requestInfo.getUpdateUrl();
  StringBuilder builder=new StringBuilder(updateUrl);
  Map<String,Object> requestParams=requestInfo.getRequestParams();
  if (requestParams != null && requestParams.size() > 0) {
    builder.append(updateUrl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
    for (    String key : requestParams.keySet()) {
      builder.append(key).append("String_Node_Str").append(String.valueOf(requestParams.get(key)));
      builder.append("String_Node_Str");
    }
    builder.deleteCharAt(builder.length() - 1);
  }
  URL targetUrl=new URL(builder.toString());
  log.trace("String_Node_Str" + builder.toString());
  HttpURLConnection connection=(HttpURLConnection)targetUrl.openConnection();
  connection.setDefaultUseCaches(false);
  connection.setConnectTimeout(5 * 60 * 1000);
  connection.setReadTimeout(5 * 60 * 1000);
  try {
    connection.setRequestMethod(requestInfo.getMethod());
  }
 catch (  ProtocolException e) {
    throw new RuntimeException(e);
  }
  Map<String,Object> headers=requestInfo.getRequestHeaders();
  if (headers != null) {
    for (    String key : headers.keySet()) {
      connection.addRequestProperty(key,String.valueOf(headers.get(key)));
    }
  }
  InputStream is=connection.getInputStream();
  String response=toStringBuffer(is).toString();
  log.trace("String_Node_Str" + response);
  is.close();
  connection.disconnect();
  return response;
}

Fixed version (ground truth):
@Override public String submitRequest(RequestInfo requestInfo) throws IOException {
  log.debug("String_Node_Str");
  String updateUrl=requestInfo.getUpdateUrl();
  StringBuilder builder=new StringBuilder(updateUrl);
  Map<String,Object> requestParams=requestInfo.getRequestParams();
  if (requestParams != null && requestParams.size() > 0) {
    builder.append(updateUrl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
    for (    String key : requestParams.keySet()) {
      builder.append(URLEncoder.encode(key,CHARSET_NAME));
      builder.append("String_Node_Str");
      builder.append(URLEncoder.encode(String.valueOf(requestParams.get(key)),CHARSET_NAME));
      builder.append("String_Node_Str");
    }
    builder.deleteCharAt(builder.length() - 1);
  }
  URL targetUrl=new URL(builder.toString());
  log.trace("String_Node_Str" + builder.toString());
  HttpURLConnection connection=(HttpURLConnection)targetUrl.openConnection();
  connection.setDefaultUseCaches(false);
  connection.setConnectTimeout(5 * 60 * 1000);
  connection.setReadTimeout(5 * 60 * 1000);
  try {
    connection.setRequestMethod(requestInfo.getMethod());
  }
 catch (  ProtocolException e) {
    throw new RuntimeException(e);
  }
  Map<String,Object> headers=requestInfo.getRequestHeaders();
  if (headers != null) {
    for (    String key : headers.keySet()) {
      connection.addRequestProperty(key,String.valueOf(headers.get(key)));
    }
  }
  InputStream is=connection.getInputStream();
  String response=toStringBuffer(is).toString();
  log.trace("String_Node_Str" + response);
  is.close();
  connection.disconnect();
  return response;
}