Program: 172516
Project: 172516
Buggy source:
/** 
 * Async uploading photos
 */
private void uploadDoc(String doc,ExecuteCallback callback){
  String type=null;
  File docFile=new File(doc);
  if (docFile.exists()) {
    type="String_Node_Str";
  }
  URL docUrl=null;
  if (type == null) {
    try {
      docUrl=new URL(doc);
      type="String_Node_Str";
    }
 catch (    MalformedURLException ignored) {
      LOG.error("String_Node_Str",doc);
      callback.onResponse("String_Node_Str");
      return;
    }
  }
  byte[] docBytes;
switch (type) {
case "String_Node_Str":
{
      try {
        docBytes=Files.readAllBytes(Paths.get(docFile.toURI()));
      }
 catch (      IOException ignored) {
        LOG.error("String_Node_Str",docFile.getAbsolutePath());
        callback.onResponse("String_Node_Str");
        return;
      }
      break;
    }
case "String_Node_Str":
{
    try {
      docBytes=Utils.toByteArray(docUrl);
    }
 catch (    IOException ignored) {
      LOG.error("String_Node_Str",doc);
      callback.onResponse("String_Node_Str");
      return;
    }
    break;
  }
default :
{
  LOG.error("String_Node_Str",doc);
  return;
}
}
if (docBytes != null) {
JSONObject params_getMessagesUploadServer=new JSONObject().put("String_Node_Str",peerId);
api.call("String_Node_Str",params_getMessagesUploadServer,response -> {
if (response.toString().equalsIgnoreCase("String_Node_Str")) {
  LOG.error("String_Node_Str");
  callback.onResponse("String_Node_Str");
  return;
}
String uploadUrl=new JSONObject(response.toString()).getString("String_Node_Str");
RequestBody requestBody=new MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("String_Node_Str","String_Node_Str",RequestBody.create(MediaType.parse("String_Node_Str"),docBytes)).build();
Request request=new Request.Builder().url(uploadUrl).post(requestBody).build();
try {
  Connection.client.newCall(request).enqueue(new Callback(){
    @Override public void onFailure(    Call call,    IOException e){
      LOG.error("String_Node_Str",e.toString());
      callback.onResponse("String_Node_Str");
    }
    @Override public void onResponse(    Call call,    Response response) throws IOException {
      String response_uploadFileString;
      ResponseBody responseBody=response.body();
      response_uploadFileString=responseBody != null ? responseBody.string() : "String_Node_Str";
      if (response_uploadFileString.length() < 2 || response_uploadFileString.contains("String_Node_Str") || !response_uploadFileString.contains("String_Node_Str")) {
        LOG.error("String_Node_Str",response_uploadFileString);
        callback.onResponse("String_Node_Str");
        return;
      }
      JSONObject getFileStringResponse;
      try {
        getFileStringResponse=new JSONObject(response_uploadFileString);
      }
 catch (      JSONException ignored) {
        LOG.error("String_Node_Str",response_uploadFileString);
        callback.onResponse("String_Node_Str");
        return;
      }
      if (!getFileStringResponse.has("String_Node_Str")) {
        LOG.error("String_Node_Str",getFileStringResponse.toString());
        callback.onResponse("String_Node_Str");
        return;
      }
      String fileParam=getFileStringResponse.getString("String_Node_Str");
      JSONObject params_photosSaveMessagesPhoto=new JSONObject().put("String_Node_Str",fileParam);
      api.call("String_Node_Str",params_photosSaveMessagesPhoto,response1 -> {
        if (response1.toString().equalsIgnoreCase("String_Node_Str")) {
          LOG.error("String_Node_Str");
          callback.onResponse("String_Node_Str");
          return;
        }
        JSONObject response_saveMessagesPhotoe=new JSONArray(response1.toString()).getJSONObject(0);
        int ownerId=response_saveMessagesPhotoe.getInt("String_Node_Str"), id=response_saveMessagesPhotoe.getInt("String_Node_Str");
        String attach="String_Node_Str" + ownerId + '_'+ id;
        callback.onResponse(attach);
      }
);
    }
  }
);
}
  finally {
  Connection.client.connectionPool().evictAll();
}
}
);
}
}

Fixed version (ground truth):
/** 
 * Async uploading photos
 */
private void uploadDoc(JSONObject doc,ExecuteCallback callback){
  String type=null;
  File docFile=new File(doc.getString("String_Node_Str"));
  if (docFile.exists()) {
    type="String_Node_Str";
  }
  URL docUrl=null;
  if (type == null) {
    try {
      docUrl=new URL(doc.getString("String_Node_Str"));
      type="String_Node_Str";
    }
 catch (    MalformedURLException ignored) {
      LOG.error("String_Node_Str",doc);
      callback.onResponse("String_Node_Str");
      return;
    }
  }
  byte[] docBytes;
switch (type) {
case "String_Node_Str":
{
      try {
        docBytes=Files.readAllBytes(Paths.get(docFile.toURI()));
      }
 catch (      IOException ignored) {
        LOG.error("String_Node_Str",docFile.getAbsolutePath());
        callback.onResponse("String_Node_Str");
        return;
      }
      break;
    }
case "String_Node_Str":
{
    try {
      docBytes=Utils.toByteArray(docUrl);
    }
 catch (    IOException ignored) {
      LOG.error("String_Node_Str",doc);
      callback.onResponse("String_Node_Str");
      return;
    }
    break;
  }
default :
{
  LOG.error("String_Node_Str",doc);
  return;
}
}
if (docBytes != null) {
JSONObject params_getMessagesUploadServer=new JSONObject().put("String_Node_Str",peerId).put("String_Node_Str",doc.getString("String_Node_Str"));
api.call("String_Node_Str",params_getMessagesUploadServer,response -> {
if (response.toString().equalsIgnoreCase("String_Node_Str")) {
  LOG.error("String_Node_Str");
  callback.onResponse("String_Node_Str");
  return;
}
String uploadUrl=new JSONObject(response.toString()).getString("String_Node_Str");
RequestBody requestBody=new MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("String_Node_Str","String_Node_Str",RequestBody.create(MediaType.parse("String_Node_Str"),docBytes)).build();
Request request=new Request.Builder().url(uploadUrl).post(requestBody).build();
try {
  Connection.client.newCall(request).enqueue(new Callback(){
    @Override public void onFailure(    Call call,    IOException e){
      LOG.error("String_Node_Str",e.toString());
      callback.onResponse("String_Node_Str");
    }
    @Override public void onResponse(    Call call,    Response response) throws IOException {
      String response_uploadFileString;
      ResponseBody responseBody=response.body();
      response_uploadFileString=responseBody != null ? responseBody.string() : "String_Node_Str";
      if (response_uploadFileString.length() < 2 || response_uploadFileString.contains("String_Node_Str") || !response_uploadFileString.contains("String_Node_Str")) {
        LOG.error("String_Node_Str",response_uploadFileString);
        callback.onResponse("String_Node_Str");
        return;
      }
      JSONObject getFileStringResponse;
      try {
        getFileStringResponse=new JSONObject(response_uploadFileString);
      }
 catch (      JSONException ignored) {
        LOG.error("String_Node_Str",response_uploadFileString);
        callback.onResponse("String_Node_Str");
        return;
      }
      if (!getFileStringResponse.has("String_Node_Str")) {
        LOG.error("String_Node_Str",getFileStringResponse.toString());
        callback.onResponse("String_Node_Str");
        return;
      }
      String fileParam=getFileStringResponse.getString("String_Node_Str");
      JSONObject params_photosSaveMessagesPhoto=new JSONObject().put("String_Node_Str",fileParam);
      api.call("String_Node_Str",params_photosSaveMessagesPhoto,response1 -> {
        if (response1.toString().equalsIgnoreCase("String_Node_Str")) {
          LOG.error("String_Node_Str");
          callback.onResponse("String_Node_Str");
          return;
        }
        JSONObject response_saveMessagesPhotoe=new JSONArray(response1.toString()).getJSONObject(0);
        int ownerId=response_saveMessagesPhotoe.getInt("String_Node_Str"), id=response_saveMessagesPhotoe.getInt("String_Node_Str");
        String attach="String_Node_Str" + ownerId + '_'+ id;
        callback.onResponse(attach);
      }
);
    }
  }
);
}
  finally {
  Connection.client.connectionPool().evictAll();
}
}
);
}
}