Program: 171811
Project: 171811
Buggy source:
@Override protected Void doInBackground(Pair... params){
  StringBuilder jsonResult=new StringBuilder();
  StringBuilder sb=new StringBuilder(QUERY);
  sb.append("String_Node_Str");
  for (  ArrayList<Pair> pairs : parameters) {
    for (    Pair p : pairs) {
      sb.append(p.first).append("String_Node_Str").append(p.second).append("String_Node_Str");
    }
    try {
      URL url=new URL(sb.toString().substring(0,sb.toString().length() - 1));
      HttpURLConnection conn=(HttpURLConnection)url.openConnection();
      int status=conn.getResponseCode();
      InputStreamReader in;
      if (status != HttpURLConnection.HTTP_OK) {
        in=new InputStreamReader(conn.getErrorStream());
      }
 else {
        in=new InputStreamReader(conn.getInputStream());
      }
      BufferedReader jsonReader=new BufferedReader(in);
      String lineIn;
      while ((lineIn=jsonReader.readLine()) != null) {
        jsonResult.append(lineIn);
      }
      try {
        JSONArray jsonArray=new JSONArray(jsonResult.toString());
        int length=jsonArray.length();
        for (int i=0; i < length; i++) {
          JSONObject jsonObject=jsonArray.getJSONObject(i);
          long place_id=jsonObject.optLong("String_Node_Str");
          String license=jsonObject.optString("String_Node_Str");
          String osm_type=jsonObject.optString("String_Node_Str");
          long osm_id=jsonObject.optLong("String_Node_Str");
          JSONArray boundingArray=jsonObject.getJSONArray("String_Node_Str");
          BoundingBox boundingBox=new BoundingBox();
          for (int j=0; i < boundingArray.length(); i++) {
            boundingBox.setBound(i,boundingArray.optDouble(i));
          }
          double lat=jsonObject.optDouble("String_Node_Str");
          double lon=jsonObject.optDouble("String_Node_Str");
          String display_name=jsonObject.optString("String_Node_Str");
          String entityClass=jsonObject.optString("String_Node_Str");
          String type=jsonObject.optString("String_Node_Str");
          float importance=(float)jsonObject.optDouble("String_Node_Str");
          Map<String,String> tags=new HashMap<>();
          if (jsonObject.has("String_Node_Str")) {
            parseAndAddAdressTags(tags,jsonObject.getString("String_Node_Str"));
          }
          parseExtraTags(tags,jsonObject.getString("String_Node_Str"));
          queriedPlaces.add(new Place(place_id,osm_id,lat,lon,importance,license,osm_type,display_name,entityClass,type,boundingBox,tags));
        }
      }
 catch (      JSONException e) {
        Log.e(TAG,"String_Node_Str",e);
      }
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str",e);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(Pair... params){
  StringBuilder jsonResult=new StringBuilder();
  StringBuilder sb=new StringBuilder(QUERY);
  sb.append("String_Node_Str");
  for (  ArrayList<Pair> pairs : parameters) {
    for (    Pair p : pairs) {
      sb.append(p.first).append("String_Node_Str").append(p.second).append("String_Node_Str");
    }
    try {
      URL url=new URL(sb.toString().substring(0,sb.toString().length() - 1));
      HttpURLConnection conn=(HttpURLConnection)url.openConnection();
      int status=conn.getResponseCode();
      InputStreamReader in;
      if (status != HttpURLConnection.HTTP_OK) {
        in=new InputStreamReader(conn.getErrorStream());
      }
 else {
        in=new InputStreamReader(conn.getInputStream());
      }
      BufferedReader jsonReader=new BufferedReader(in);
      String lineIn;
      while ((lineIn=jsonReader.readLine()) != null) {
        jsonResult.append(lineIn);
      }
      try {
        JSONArray jsonArray=new JSONArray(jsonResult.toString());
        int length=jsonArray.length();
        for (int i=0; i < length; i++) {
          JSONObject jsonObject=jsonArray.getJSONObject(i);
          long place_id=jsonObject.optLong("String_Node_Str");
          String license=jsonObject.optString("String_Node_Str");
          String osm_type=jsonObject.optString("String_Node_Str");
          long osm_id=jsonObject.optLong("String_Node_Str");
          JSONArray boundingArray=jsonObject.getJSONArray("String_Node_Str");
          BoundingBox boundingBox=new BoundingBox();
          for (int j=0; i < boundingArray.length(); i++) {
            boundingBox.setBound(i,boundingArray.optDouble(i));
          }
          double lat=jsonObject.optDouble("String_Node_Str");
          double lon=jsonObject.optDouble("String_Node_Str");
          String display_name=jsonObject.optString("String_Node_Str");
          String entityClass=jsonObject.optString("String_Node_Str");
          String type=jsonObject.optString("String_Node_Str");
          float importance=(float)jsonObject.optDouble("String_Node_Str");
          Map<String,String> tags=new HashMap<>();
          if (jsonObject.has("String_Node_Str")) {
            parseAndAddAdressTags(tags,jsonObject.getString("String_Node_Str"));
          }
          parseExtraTags(tags,jsonObject.getString("String_Node_Str"));
          queriedPlaces.add(new Place(place_id,osm_id,lat,lon,importance,license,osm_type,display_name,entityClass,type,boundingBox,tags));
        }
      }
 catch (      JSONException e) {
        Log.e(TAG,"String_Node_Str",e);
        Toast.makeText(context,R.string.server_response_error,Toast.LENGTH_SHORT).show();
      }
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str",e);
      Toast.makeText(context,R.string.server_error,Toast.LENGTH_SHORT).show();
    }
  }
  return null;
}