Program: 146494
Project: 146494
Buggy source:
@Override protected JSONObject doInBackground(Void... params){
  Set<String> set=new HashSet<>();
  JSONObject response=null;
  for (  int x : mMap.keySet()) {
    set.add(mMap.get(x));
  }
  try {
    response=App.getPairInfo(set.toArray(new String[set.size()]));
    response=response == null ? new JSONObject() : response;
    DBWorker dbWorker=DBWorker.getInstance(mContext);
    String[] columns={"String_Node_Str","String_Node_Str"};
    Cursor cursor=dbWorker.pullWidgetData(columns);
    Map<String,Double> values=new HashMap<>();
    if (cursor.moveToFirst()) {
      while (!cursor.isAfterLast()) {
        values.put(cursor.getString(cursor.getColumnIndex(columns[0])),cursor.getDouble(cursor.getColumnIndex(columns[1])));
        cursor.moveToNext();
      }
    }
    cursor.close();
    for (@SuppressWarnings("String_Node_Str") Iterator<String> x=response.keys(); x.hasNext(); ) {
      String pair=x.next();
      String pairInDB=pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US);
      ContentValues cv=new ContentValues(4);
      double last=response.getJSONObject(pair).getDouble("String_Node_Str");
      double sell=response.getJSONObject(pair).getDouble("String_Node_Str");
      double buy=response.getJSONObject(pair).getDouble("String_Node_Str");
      cv.put("String_Node_Str",last);
      cv.put("String_Node_Str",buy);
      cv.put("String_Node_Str",sell);
      if (values.containsKey(pairInDB)) {
        if (last >= values.get(pairInDB)) {
          response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
        }
 else {
          response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
        }
      }
 else {
        response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
      }
      int result=dbWorker.updateWidgetData(cv,pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
      if (result == 0) {
        cv.put("String_Node_Str",pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
        dbWorker.insertToWidgetData(cv);
      }
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return response;
}

Fixed version (ground truth):
@Override protected JSONObject doInBackground(Void... params){
  Set<String> set=new HashSet<>();
  JSONObject response=null;
  for (  int x : mMap.keySet()) {
    set.add(mMap.get(x));
  }
  try {
    response=App.getPairInfo(set.toArray(new String[set.size()]));
    response=response == null ? new JSONObject() : response;
    Context context=mContext.get();
    if (context == null) {
      return null;
    }
    DBWorker dbWorker=DBWorker.getInstance(context);
    String[] columns={"String_Node_Str","String_Node_Str"};
    Cursor cursor=dbWorker.pullWidgetData(columns);
    Map<String,Double> values=new HashMap<>();
    if (cursor.moveToFirst()) {
      while (!cursor.isAfterLast()) {
        values.put(cursor.getString(cursor.getColumnIndex(columns[0])),cursor.getDouble(cursor.getColumnIndex(columns[1])));
        cursor.moveToNext();
      }
    }
    cursor.close();
    for (@SuppressWarnings("String_Node_Str") Iterator<String> x=response.keys(); x.hasNext(); ) {
      String pair=x.next();
      String pairInDB=pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US);
      ContentValues cv=new ContentValues(4);
      double last=response.getJSONObject(pair).getDouble("String_Node_Str");
      double sell=response.getJSONObject(pair).getDouble("String_Node_Str");
      double buy=response.getJSONObject(pair).getDouble("String_Node_Str");
      cv.put("String_Node_Str",last);
      cv.put("String_Node_Str",buy);
      cv.put("String_Node_Str",sell);
      if (values.containsKey(pairInDB)) {
        if (last >= values.get(pairInDB)) {
          response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
        }
 else {
          response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
        }
      }
 else {
        response.getJSONObject(pair).put("String_Node_Str","String_Node_Str");
      }
      int result=dbWorker.updateWidgetData(cv,pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
      if (result == 0) {
        cv.put("String_Node_Str",pair.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
        dbWorker.insertToWidgetData(cv);
      }
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return response;
}