Program: 21683
Project: 21683
Buggy source:
public JSONRPCResponseObject sendAndReceive(JSONRPCRequestObject message) throws JSONException, SaploClientException {
  HttpPost httpost=new HttpPost(uri + "String_Node_Str" + params);
  ByteArrayEntity ent=new ByteArrayEntity(message.toString().getBytes());
  ent.setContentEncoding(HTTP.UTF_8);
  ent.setContentType("String_Node_Str");
  httpost.setEntity(ent);
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    if (proxified)     httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
    HttpResponse response=httpClient.execute(httpost);
    HttpEntity entity=response.getEntity();
    int statusCode=response.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK)     throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION,ResponseCodes.CODE_API_DOWN_EXCEPTION,statusCode);
    String got="String_Node_Str";
    if (entity != null) {
      byte[] bytes=EntityUtils.toByteArray(entity);
      got=new String(bytes,Charset.forName("String_Node_Str"));
    }
    JSONTokener tokener=new JSONTokener(got);
    Object rawResponseMessage=tokener.nextValue();
    JSONObject responseMessage=(JSONObject)rawResponseMessage;
    if (responseMessage == null)     throw new ClientError("String_Node_Str" + rawResponseMessage);
    return new JSONRPCResponseObject(responseMessage);
  }
 catch (  ClientProtocolException e) {
    throw new ClientError(e);
  }
catch (  NoHttpResponseException nr) {
    throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION,ResponseCodes.CODE_API_DOWN_EXCEPTION,777);
  }
catch (  IOException e) {
    throw new ClientError(e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
public JSONRPCResponseObject sendAndReceive(JSONRPCRequestObject message) throws JSONException, SaploClientException {
  HttpPost httpost=new HttpPost(uri + "String_Node_Str" + params);
  ByteArrayEntity ent=new ByteArrayEntity(message.toString().getBytes(Charset.forName("String_Node_Str")));
  ent.setContentEncoding(HTTP.UTF_8);
  ent.setContentType("String_Node_Str");
  httpost.setEntity(ent);
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    if (proxified)     httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
    HttpResponse response=httpClient.execute(httpost);
    HttpEntity entity=response.getEntity();
    int statusCode=response.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK)     throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION,ResponseCodes.CODE_API_DOWN_EXCEPTION,statusCode);
    String got="String_Node_Str";
    if (entity != null) {
      byte[] bytes=EntityUtils.toByteArray(entity);
      got=new String(bytes,Charset.forName("String_Node_Str"));
    }
    JSONTokener tokener=new JSONTokener(got);
    Object rawResponseMessage=tokener.nextValue();
    JSONObject responseMessage=(JSONObject)rawResponseMessage;
    if (responseMessage == null)     throw new ClientError("String_Node_Str" + rawResponseMessage);
    return new JSONRPCResponseObject(responseMessage);
  }
 catch (  ClientProtocolException e) {
    throw new ClientError(e);
  }
catch (  NoHttpResponseException nr) {
    throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION,ResponseCodes.CODE_API_DOWN_EXCEPTION,777);
  }
catch (  IOException e) {
    throw new ClientError(e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}