Program: 56393
Project: 56393
Buggy source:
public static void upgrade(Context context,final JobQueue jobQueue){
  legacyUpgrade(context,jobQueue);
  final int currentVersion=Settings.get(context).getInt(SETTINGS_VERSION,-1);
  if (currentVersion == -1) {
    Settings.get(context).edit().putInt(SETTINGS_VERSION,VERSION).putInt(Settings.VERSION_CODE,BuildConfig.VERSION_CODE).apply();
    return;
  }
  if (currentVersion < VERSION) {
    if (currentVersion < 1) {
      if (Jobs.usesScheduler()) {
        if (TraktLinkSettings.isLinked(context)) {
          Account account=Accounts.getAccount(context);
          ContentResolver.removePeriodicSync(account,BuildConfig.PROVIDER_AUTHORITY,new Bundle());
          ContentResolver.setSyncAutomatically(account,BuildConfig.PROVIDER_AUTHORITY,false);
          ContentResolver.setIsSyncable(account,BuildConfig.PROVIDER_AUTHORITY,0);
        }
      }
    }
    if (currentVersion < 2) {
      Settings.get(context).edit().remove("String_Node_Str").remove("String_Node_Str").remove("String_Node_Str").remove("String_Node_Str").apply();
      Timestamps.get(context).edit().remove(Timestamps.SHOWS_LAST_UPDATED).remove(Timestamps.MOVIES_LAST_UPDATED).apply();
      final long lastUpdated=System.currentTimeMillis() - DateUtils.WEEK_IN_MILLIS;
      Timestamps.get(context).edit().putLong(Timestamps.SHOWS_LAST_UPDATED,lastUpdated).putLong(Timestamps.MOVIES_LAST_UPDATED,lastUpdated).apply();
    }
    Settings.get(context).edit().putInt(SETTINGS_VERSION,VERSION).apply();
  }
  Settings.get(context).edit().putInt(Settings.VERSION_CODE,BuildConfig.VERSION_CODE).apply();
}

Fixed version (ground truth):
public static void upgrade(Context context,final JobQueue jobQueue){
  legacyUpgrade(context,jobQueue);
  final int currentVersion=Settings.get(context).getInt(SETTINGS_VERSION,-1);
  if (currentVersion == -1) {
    Settings.get(context).edit().putInt(SETTINGS_VERSION,VERSION).putInt(Settings.VERSION_CODE,BuildConfig.VERSION_CODE).apply();
    return;
  }
  if (currentVersion < VERSION) {
    if (currentVersion < 1) {
      if (Jobs.usesScheduler()) {
        if (TraktLinkSettings.isLinked(context)) {
          Account account=Accounts.getAccount(context);
          ContentResolver.removePeriodicSync(account,BuildConfig.PROVIDER_AUTHORITY,new Bundle());
          ContentResolver.setSyncAutomatically(account,BuildConfig.PROVIDER_AUTHORITY,false);
          ContentResolver.setIsSyncable(account,BuildConfig.PROVIDER_AUTHORITY,0);
        }
      }
    }
    if (currentVersion < 2) {
      Settings.get(context).edit().remove("String_Node_Str").remove("String_Node_Str").remove("String_Node_Str").remove("String_Node_Str").apply();
      Timestamps.get(context).edit().remove(Timestamps.SHOWS_LAST_UPDATED).remove(Timestamps.MOVIES_LAST_UPDATED).apply();
      final long lastUpdated=System.currentTimeMillis() - DateUtils.WEEK_IN_MILLIS;
      Timestamps.get(context).edit().putLong(Timestamps.SHOWS_LAST_UPDATED,lastUpdated).putLong(Timestamps.MOVIES_LAST_UPDATED,lastUpdated).apply();
    }
    if (currentVersion < 3) {
      jobQueue.add(new SyncEpisodesRatings());
    }
    Settings.get(context).edit().putInt(SETTINGS_VERSION,VERSION).apply();
  }
  Settings.get(context).edit().putInt(Settings.VERSION_CODE,BuildConfig.VERSION_CODE).apply();
}