Program: 20955
Project: 20955
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void run(){
  ServiceCommand<ResponseListener<Object>> command=(ServiceCommand<ResponseListener<Object>>)mCommand;
  Object payload=command.getPayload();
  HttpRequestBase request=command.getRequest();
  HttpResponse response=null;
  int code=-1;
  if (payload != null && command.getHttpMethod().equalsIgnoreCase(ServiceCommand.TYPE_POST)) {
    request.setHeader(HttpMessage.CONTENT_TYPE_HEADER,"String_Node_Str");
    HttpPost post=(HttpPost)request;
    HttpEntity entity=null;
    try {
      if (payload instanceof String) {
        entity=new StringEntity((String)payload);
      }
 else       if (payload instanceof JSONObject) {
        entity=new StringEntity((String)payload);
      }
    }
 catch (    UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    if (entity == null) {
      Util.postError(command.getResponseListener(),new ServiceCommandError(0,"String_Node_Str",null));
      return;
    }
    post.setEntity(entity);
  }
  try {
    response=httpClient.execute(request);
    code=response.getStatusLine().getStatusCode();
    if (code == 200 || code == 201) {
      HttpEntity entity=response.getEntity();
      String message=EntityUtils.toString(entity,"String_Node_Str");
      Util.postSuccess(command.getResponseListener(),message);
    }
 else {
      Util.postError(command.getResponseListener(),ServiceCommandError.getError(code));
    }
  }
 catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void run(){
  ServiceCommand<ResponseListener<Object>> command=(ServiceCommand<ResponseListener<Object>>)mCommand;
  Object payload=command.getPayload();
  HttpRequestBase request=command.getRequest();
  HttpResponse response=null;
  int code=-1;
  if (payload != null && command.getHttpMethod().equalsIgnoreCase(ServiceCommand.TYPE_POST)) {
    request.setHeader(HttpMessage.CONTENT_TYPE_HEADER,"String_Node_Str");
    HttpPost post=(HttpPost)request;
    HttpEntity entity=null;
    try {
      if (payload instanceof String) {
        entity=new StringEntity((String)payload);
      }
 else       if (payload instanceof JSONObject) {
        entity=new StringEntity((String)payload);
      }
    }
 catch (    UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    if (entity == null) {
      Util.postError(command.getResponseListener(),new ServiceCommandError(0,"String_Node_Str",null));
      return;
    }
    post.setEntity(entity);
  }
  try {
    response=httpClient.execute(request);
    code=response.getStatusLine().getStatusCode();
    if (code == 200 || code == 201) {
      HttpEntity entity=response.getEntity();
      String message=EntityUtils.toString(entity,"String_Node_Str");
      Util.postSuccess(command.getResponseListener(),message);
    }
 else {
      Util.postError(command.getResponseListener(),ServiceCommandError.getError(code));
    }
  }
 catch (  IllegalStateException e) {
    e.printStackTrace();
  }
catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}