Program: 42468
Project: 42468
Buggy source:
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int currentVersion){
  Log.w(TAG,"String_Node_Str" + oldVersion + "String_Node_Str"+ currentVersion);
  int upgradeVersion=oldVersion;
  if (upgradeVersion == 20) {
    loadVibrateSetting(db,true);
    if (Config.LOGD)     Log.d(TAG,"String_Node_Str");
    upgradeVersion=21;
  }
  if (upgradeVersion < 22) {
    upgradeVersion=22;
    upgradeLockPatternLocation(db);
  }
  if (upgradeVersion < 23) {
    db.execSQL("String_Node_Str");
    upgradeVersion=23;
  }
  if (upgradeVersion == 23) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=24;
  }
  if (upgradeVersion == 24) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str" + ConnectivityManager.DEFAULT_NETWORK_PREFERENCE + "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=25;
  }
  if (upgradeVersion == 25) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=26;
  }
  if (upgradeVersion == 26) {
    db.beginTransaction();
    try {
      createSecureTable(db);
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=27;
  }
  if (upgradeVersion == 27) {
    SQLiteStatement insertStmt=null;
    SQLiteStatement deleteStmt=null;
    db.beginTransaction();
    try {
      insertStmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      deleteStmt=db.compileStatement("String_Node_Str");
      String[] settingsToMove={Settings.Secure.ADB_ENABLED,Settings.Secure.ANDROID_ID,Settings.Secure.BLUETOOTH_ON,Settings.Secure.DATA_ROAMING,Settings.Secure.DEVICE_PROVISIONED,Settings.Secure.HTTP_PROXY,Settings.Secure.INSTALL_NON_MARKET_APPS,Settings.Secure.LOCATION_PROVIDERS_ALLOWED,Settings.Secure.LOGGING_ID,Settings.Secure.NETWORK_PREFERENCE,Settings.Secure.PARENTAL_CONTROL_ENABLED,Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE,Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL,Settings.Secure.SETTINGS_CLASSNAME,Settings.Secure.USB_MASS_STORAGE_ENABLED,Settings.Secure.USE_GOOGLE_MAIL,Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT,Settings.Secure.WIFI_ON,Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE,Settings.Secure.WIFI_WATCHDOG_AP_COUNT,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS,Settings.Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT,Settings.Secure.WIFI_WATCHDOG_MAX_AP_CHECKS,Settings.Secure.WIFI_WATCHDOG_ON,Settings.Secure.WIFI_WATCHDOG_PING_COUNT,Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS,Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS};
      for (      String setting : settingsToMove) {
        insertStmt.bindString(1,setting);
        insertStmt.execute();
        deleteStmt.bindString(1,setting);
        deleteStmt.execute();
      }
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
      if (insertStmt != null) {
        insertStmt.close();
      }
      if (deleteStmt != null) {
        deleteStmt.close();
      }
    }
    upgradeVersion=28;
  }
  if (upgradeVersion == 28 || upgradeVersion == 29) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str");
      int newValue=(1 << AudioManager.STREAM_RING) | (1 << AudioManager.STREAM_NOTIFICATION) | (1 << AudioManager.STREAM_SYSTEM);
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str"+ String.valueOf(newValue)+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=30;
  }
  if (upgradeVersion == 30) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=31;
  }
  if (upgradeVersion == 31) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.WINDOW_ANIMATION_SCALE + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.System.TRANSITION_ANIMATION_SCALE + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultAnimationSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=32;
  }
  if (upgradeVersion == 32) {
    String wifiWatchList=SystemProperties.get("String_Node_Str");
    if (!TextUtils.isEmpty(wifiWatchList)) {
      db.beginTransaction();
      try {
        db.execSQL("String_Node_Str" + Settings.Secure.WIFI_WATCHDOG_WATCH_LIST + "String_Node_Str"+ wifiWatchList+ "String_Node_Str");
        db.setTransactionSuccessful();
      }
  finally {
        db.endTransaction();
      }
    }
    upgradeVersion=33;
  }
  if (upgradeVersion == 33) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=34;
  }
  if (upgradeVersion == 34) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadSecure35Settings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=35;
  }
  if (upgradeVersion == 35) {
    upgradeVersion=36;
  }
  if (upgradeVersion == 36) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str");
      int newValue=(1 << AudioManager.STREAM_RING) | (1 << AudioManager.STREAM_NOTIFICATION) | (1 << AudioManager.STREAM_SYSTEM)| (1 << AudioManager.STREAM_SYSTEM_ENFORCED);
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str"+ String.valueOf(newValue)+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=37;
  }
  if (upgradeVersion == 37) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadStringSetting(stmt,Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS,R.string.airplane_mode_toggleable_radios);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=38;
  }
  if (upgradeVersion == 38) {
    db.beginTransaction();
    try {
      String value=mContext.getResources().getBoolean(R.bool.assisted_gps_enabled) ? "String_Node_Str" : "String_Node_Str";
      db.execSQL("String_Node_Str" + Settings.Secure.ASSISTED_GPS_ENABLED + "String_Node_Str"+ value+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=39;
  }
  if (upgradeVersion == 39) {
    db.beginTransaction();
    try {
      String value=mContext.getResources().getBoolean(R.bool.def_screen_brightness_automatic_mode) ? "String_Node_Str" : "String_Node_Str";
      db.execSQL("String_Node_Str" + Settings.System.SCREEN_BRIGHTNESS_MODE + "String_Node_Str"+ value+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=40;
  }
  if (upgradeVersion == 40) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.WINDOW_ANIMATION_SCALE + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.System.TRANSITION_ANIMATION_SCALE + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultAnimationSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=41;
  }
  if (upgradeVersion == 41) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.HAPTIC_FEEDBACK_ENABLED + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultHapticSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=42;
  }
  if (upgradeVersion == 42) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadBooleanSetting(stmt,Settings.System.NOTIFICATION_LIGHT_PULSE,R.bool.def_notification_pulse);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=43;
  }
  if (upgradeVersion == 43) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadSetting(stmt,Settings.System.VOLUME_BLUETOOTH_SCO,AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=44;
  }
  if (upgradeVersion == 44) {
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    upgradeVersion=45;
  }
  if (upgradeVersion == 45) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_AUTOSTART + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_PROMPT + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED + "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=46;
  }
  if (upgradeVersion == 46) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=47;
  }
  if (upgradeVersion == 47) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=48;
  }
  if (upgradeVersion == 48) {
    upgradeVersion=49;
  }
  if (upgradeVersion == 49) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadUISoundEffectsSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=50;
  }
  if (upgradeVersion != currentVersion) {
    Log.w(TAG,"String_Node_Str" + upgradeVersion + "String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    onCreate(db);
    String wipeReason=oldVersion + "String_Node_Str" + upgradeVersion+ "String_Node_Str"+ currentVersion;
    db.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + wipeReason + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int currentVersion){
  Log.w(TAG,"String_Node_Str" + oldVersion + "String_Node_Str"+ currentVersion);
  int upgradeVersion=oldVersion;
  if (upgradeVersion == 20) {
    loadVibrateSetting(db,true);
    if (Config.LOGD)     Log.d(TAG,"String_Node_Str");
    upgradeVersion=21;
  }
  if (upgradeVersion < 22) {
    upgradeVersion=22;
    upgradeLockPatternLocation(db);
  }
  if (upgradeVersion < 23) {
    db.execSQL("String_Node_Str");
    upgradeVersion=23;
  }
  if (upgradeVersion == 23) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=24;
  }
  if (upgradeVersion == 24) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str" + ConnectivityManager.DEFAULT_NETWORK_PREFERENCE + "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=25;
  }
  if (upgradeVersion == 25) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=26;
  }
  if (upgradeVersion == 26) {
    db.beginTransaction();
    try {
      createSecureTable(db);
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=27;
  }
  if (upgradeVersion == 27) {
    SQLiteStatement insertStmt=null;
    SQLiteStatement deleteStmt=null;
    db.beginTransaction();
    try {
      insertStmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      deleteStmt=db.compileStatement("String_Node_Str");
      String[] settingsToMove={Settings.Secure.ADB_ENABLED,Settings.Secure.ANDROID_ID,Settings.Secure.BLUETOOTH_ON,Settings.Secure.DATA_ROAMING,Settings.Secure.DEVICE_PROVISIONED,Settings.Secure.HTTP_PROXY,Settings.Secure.INSTALL_NON_MARKET_APPS,Settings.Secure.LOCATION_PROVIDERS_ALLOWED,Settings.Secure.LOGGING_ID,Settings.Secure.NETWORK_PREFERENCE,Settings.Secure.PARENTAL_CONTROL_ENABLED,Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE,Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL,Settings.Secure.SETTINGS_CLASSNAME,Settings.Secure.USB_MASS_STORAGE_ENABLED,Settings.Secure.USE_GOOGLE_MAIL,Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT,Settings.Secure.WIFI_ON,Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE,Settings.Secure.WIFI_WATCHDOG_AP_COUNT,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED,Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS,Settings.Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT,Settings.Secure.WIFI_WATCHDOG_MAX_AP_CHECKS,Settings.Secure.WIFI_WATCHDOG_ON,Settings.Secure.WIFI_WATCHDOG_PING_COUNT,Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS,Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS};
      for (      String setting : settingsToMove) {
        insertStmt.bindString(1,setting);
        insertStmt.execute();
        deleteStmt.bindString(1,setting);
        deleteStmt.execute();
      }
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
      if (insertStmt != null) {
        insertStmt.close();
      }
      if (deleteStmt != null) {
        deleteStmt.close();
      }
    }
    upgradeVersion=28;
  }
  if (upgradeVersion == 28 || upgradeVersion == 29) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str");
      int newValue=(1 << AudioManager.STREAM_RING) | (1 << AudioManager.STREAM_NOTIFICATION) | (1 << AudioManager.STREAM_SYSTEM);
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str"+ String.valueOf(newValue)+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=30;
  }
  if (upgradeVersion == 30) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=31;
  }
  if (upgradeVersion == 31) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.WINDOW_ANIMATION_SCALE + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.System.TRANSITION_ANIMATION_SCALE + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultAnimationSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=32;
  }
  if (upgradeVersion == 32) {
    String wifiWatchList=SystemProperties.get("String_Node_Str");
    if (!TextUtils.isEmpty(wifiWatchList)) {
      db.beginTransaction();
      try {
        db.execSQL("String_Node_Str" + Settings.Secure.WIFI_WATCHDOG_WATCH_LIST + "String_Node_Str"+ wifiWatchList+ "String_Node_Str");
        db.setTransactionSuccessful();
      }
  finally {
        db.endTransaction();
      }
    }
    upgradeVersion=33;
  }
  if (upgradeVersion == 33) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=34;
  }
  if (upgradeVersion == 34) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadSecure35Settings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=35;
  }
  if (upgradeVersion == 35) {
    upgradeVersion=36;
  }
  if (upgradeVersion == 36) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str");
      int newValue=(1 << AudioManager.STREAM_RING) | (1 << AudioManager.STREAM_NOTIFICATION) | (1 << AudioManager.STREAM_SYSTEM)| (1 << AudioManager.STREAM_SYSTEM_ENFORCED);
      db.execSQL("String_Node_Str" + Settings.System.MODE_RINGER_STREAMS_AFFECTED + "String_Node_Str"+ String.valueOf(newValue)+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=37;
  }
  if (upgradeVersion == 37) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadStringSetting(stmt,Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS,R.string.airplane_mode_toggleable_radios);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=38;
  }
  if (upgradeVersion == 38) {
    db.beginTransaction();
    try {
      String value=mContext.getResources().getBoolean(R.bool.assisted_gps_enabled) ? "String_Node_Str" : "String_Node_Str";
      db.execSQL("String_Node_Str" + Settings.Secure.ASSISTED_GPS_ENABLED + "String_Node_Str"+ value+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=39;
  }
  if (upgradeVersion == 39) {
    db.beginTransaction();
    try {
      String value=mContext.getResources().getBoolean(R.bool.def_screen_brightness_automatic_mode) ? "String_Node_Str" : "String_Node_Str";
      db.execSQL("String_Node_Str" + Settings.System.SCREEN_BRIGHTNESS_MODE + "String_Node_Str"+ value+ "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=40;
  }
  if (upgradeVersion == 40) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.WINDOW_ANIMATION_SCALE + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.System.TRANSITION_ANIMATION_SCALE + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultAnimationSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=41;
  }
  if (upgradeVersion == 41) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.System.HAPTIC_FEEDBACK_ENABLED + "String_Node_Str");
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadDefaultHapticSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=42;
  }
  if (upgradeVersion == 42) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadBooleanSetting(stmt,Settings.System.NOTIFICATION_LIGHT_PULSE,R.bool.def_notification_pulse);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=43;
  }
  if (upgradeVersion == 43) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadSetting(stmt,Settings.System.VOLUME_BLUETOOTH_SCO,AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=44;
  }
  if (upgradeVersion == 44) {
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    upgradeVersion=45;
  }
  if (upgradeVersion == 45) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_AUTOSTART + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_PROMPT + "String_Node_Str");
      db.execSQL("String_Node_Str" + Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED + "String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=46;
  }
  if (upgradeVersion == 46) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=47;
  }
  if (upgradeVersion == 47) {
    db.beginTransaction();
    try {
      db.execSQL("String_Node_Str");
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=48;
  }
  if (upgradeVersion == 48) {
    upgradeVersion=49;
  }
  if (upgradeVersion == 49) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadUISoundEffectsSettings(stmt);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=50;
  }
  if (upgradeVersion == 50) {
    db.beginTransaction();
    try {
      SQLiteStatement stmt=db.compileStatement("String_Node_Str" + "String_Node_Str");
      loadBooleanSetting(stmt,Settings.System.SET_INSTALL_LOCATION,R.bool.set_install_location);
      stmt.close();
      db.setTransactionSuccessful();
    }
  finally {
      db.endTransaction();
    }
    upgradeVersion=51;
  }
  if (upgradeVersion != currentVersion) {
    Log.w(TAG,"String_Node_Str" + upgradeVersion + "String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    db.execSQL("String_Node_Str");
    onCreate(db);
    String wipeReason=oldVersion + "String_Node_Str" + upgradeVersion+ "String_Node_Str"+ currentVersion;
    db.execSQL("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + wipeReason + "String_Node_Str");
  }
}