Program: 146485
Project: 146485
Buggy source:
@Override protected void onHandleIntent(Intent intent){
  SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(this);
  Set<String> x=sh.getStringSet("String_Node_Str",new HashSet<String>());
  String[] pairs=x.toArray(new String[x.size()]);
  ConnectivityManager connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo networkInfo=connMgr.getActiveNetworkInfo();
  String url=BASE_URL;
  for (  String xx : pairs) {
    url+=xx.replace("String_Node_Str","String_Node_Str").toLowerCase(Locale.US) + "String_Node_Str";
  }
  SimpleRequest reqSim=new SimpleRequest();
  if (networkInfo != null && networkInfo.isConnected()) {
    JSONObject data=null;
    try {
      data=reqSim.makeRequest(url);
    }
 catch (    JSONException e) {
      e.printStackTrace();
    }
    if (data != null && data.optInt("String_Node_Str",1) != 0) {
      ArrayList<Ticker> tickers=new ArrayList<>();
      for (@SuppressWarnings("String_Node_Str") Iterator<String> iterator=data.keys(); iterator.hasNext(); ) {
        String key=iterator.next();
        JSONObject pairData=data.optJSONObject(key);
        Ticker ticker=new Ticker(key);
        ticker.setUpdated(pairData.optLong("String_Node_Str"));
        ticker.setAvg(pairData.optDouble("String_Node_Str"));
        ticker.setBuy(pairData.optDouble("String_Node_Str"));
        ticker.setSell(pairData.optDouble("String_Node_Str"));
        ticker.setHigh(pairData.optDouble("String_Node_Str"));
        ticker.setLast(pairData.optDouble("String_Node_Str"));
        ticker.setLow(pairData.optDouble("String_Node_Str"));
        ticker.setVol(pairData.optDouble("String_Node_Str"));
        ticker.setVolCur(pairData.optDouble("String_Node_Str"));
        tickers.add(ticker);
      }
      String message=checkNotifiers(tickers,TickersStorage.loadLatestData());
      if (message.length() != 0) {
        NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
        NotificationCompat.Builder nb=new NotificationCompat.Builder(this).setContentTitle(getResources().getString(R.string.app_name)).setSmallIcon(R.drawable.ic_launcher).setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)).setContentText(message.substring(0,message.length() - 2));
        notificationManager.notify(ConstantHolder.ALARM_NOTIF_ID,nb.build());
      }
      Map<String,Ticker> newData=new HashMap<>();
      for (      Ticker ticker : tickers) {
        newData.put(ticker.getPair(),ticker);
      }
      TickersStorage.saveData(newData);
      LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("String_Node_Str"));
    }
  }
 else {
    new Handler().post(new Runnable(){
      @Override public void run(){
      }
    }
);
  }
}

Fixed version (ground truth):
@Override protected void onHandleIntent(Intent intent){
  SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(this);
  Set<String> x=sh.getStringSet("String_Node_Str",new HashSet<String>());
  if (x.size() == 0) {
    return;
  }
  String[] pairs=x.toArray(new String[x.size()]);
  ConnectivityManager connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo networkInfo=connMgr.getActiveNetworkInfo();
  String url=BASE_URL;
  for (  String xx : pairs) {
    url+=xx.replace("String_Node_Str","String_Node_Str").toLowerCase(Locale.US) + "String_Node_Str";
  }
  SimpleRequest reqSim=new SimpleRequest();
  if (networkInfo != null && networkInfo.isConnected()) {
    JSONObject data=null;
    try {
      data=reqSim.makeRequest(url);
    }
 catch (    JSONException e) {
      e.printStackTrace();
    }
    if (data != null && data.optInt("String_Node_Str",1) != 0) {
      ArrayList<Ticker> tickers=new ArrayList<>();
      for (@SuppressWarnings("String_Node_Str") Iterator<String> iterator=data.keys(); iterator.hasNext(); ) {
        String key=iterator.next();
        JSONObject pairData=data.optJSONObject(key);
        Ticker ticker=new Ticker(key);
        ticker.setUpdated(pairData.optLong("String_Node_Str"));
        ticker.setAvg(pairData.optDouble("String_Node_Str"));
        ticker.setBuy(pairData.optDouble("String_Node_Str"));
        ticker.setSell(pairData.optDouble("String_Node_Str"));
        ticker.setHigh(pairData.optDouble("String_Node_Str"));
        ticker.setLast(pairData.optDouble("String_Node_Str"));
        ticker.setLow(pairData.optDouble("String_Node_Str"));
        ticker.setVol(pairData.optDouble("String_Node_Str"));
        ticker.setVolCur(pairData.optDouble("String_Node_Str"));
        tickers.add(ticker);
      }
      String message=checkNotifiers(tickers,TickersStorage.loadLatestData());
      if (message.length() != 0) {
        NotificationManager notificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
        NotificationCompat.Builder nb=new NotificationCompat.Builder(this).setContentTitle(getResources().getString(R.string.app_name)).setSmallIcon(R.drawable.ic_launcher).setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)).setContentText(message.substring(0,message.length() - 2));
        notificationManager.notify(ConstantHolder.ALARM_NOTIF_ID,nb.build());
      }
      Map<String,Ticker> newData=new HashMap<>();
      for (      Ticker ticker : tickers) {
        newData.put(ticker.getPair(),ticker);
      }
      TickersStorage.saveData(newData);
      LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("String_Node_Str"));
    }
  }
 else {
    new Handler().post(new Runnable(){
      @Override public void run(){
      }
    }
);
  }
}