Program: 157299
Project: 157299
Buggy source:
private void upgradeSettingsValues(SharedPreferences sp){
  Logger.d(TAG,"String_Node_Str");
  int configurationVersion=sp.getInt(CONFIGURATION_VERSION,9);
  if (configurationVersion < 1) {
    boolean oldLandscapeFullScreenValue=sp.getBoolean("String_Node_Str",mContext.getResources().getBoolean(R.bool.settings_default_landscape_fullscreen));
    Logger.i(TAG,"String_Node_Str");
    Editor e=sp.edit();
    e.putBoolean(mContext.getString(R.string.settings_key_landscape_fullscreen),oldLandscapeFullScreenValue);
    e.remove("String_Node_Str");
    e.commit();
  }
  if (configurationVersion < 2) {
    Logger.i(TAG,"String_Node_Str");
    Editor e=sp.edit();
    e.putString("String_Node_Str",mContext.getString(R.string.settings_default_portrait_keyboard_height_factor));
    e.putString("String_Node_Str",mContext.getString(R.string.settings_default_landscape_keyboard_height_factor));
    e.commit();
  }
  if (configurationVersion < 3) {
    Editor e=sp.edit();
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ECLAIR_MR1) {
      Logger.i(TAG,"String_Node_Str");
      final String bottomRowKey=mContext.getString(R.string.settings_key_ext_kbd_bottom_row_key);
      String currentBottomRowId=sp.getString(bottomRowKey,mContext.getString(R.string.settings_default_ext_kbd_bottom_row_key));
      String newBottomRowId="String_Node_Str";
      if (currentBottomRowId.equals("String_Node_Str")) {
        newBottomRowId="String_Node_Str";
      }
 else       if (currentBottomRowId.equals("String_Node_Str")) {
        newBottomRowId="String_Node_Str";
      }
      if (!TextUtils.isEmpty(newBottomRowId)) {
        Logger.i(TAG,"String_Node_Str" + currentBottomRowId + "String_Node_Str"+ newBottomRowId+ "String_Node_Str");
        e.putString(bottomRowKey,newBottomRowId);
      }
    }
    e.commit();
  }
  if (configurationVersion < 4) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_landscape_fullscreen),mContext.getResources().getBoolean(R.bool.settings_default_landscape_fullscreen));
    e.commit();
  }
  if (configurationVersion < 5) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_workaround_disable_rtl_fix),getAlwaysUseDrawTextDefault());
    e.commit();
  }
  if (configurationVersion < 6) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_allow_suggestions_restart));
    e.commit();
  }
  if (configurationVersion < 7) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_ordered_active_quick_text_keys));
    e.commit();
  }
  if (configurationVersion < 8) {
    final boolean autoPick=sp.getBoolean("String_Node_Str",true);
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove("String_Node_Str");
    if (autoPick) {
      e.putString(mContext.getString(R.string.settings_key_next_word_suggestion_aggressiveness),mContext.getString(R.string.settings_default_auto_pick_suggestion_aggressiveness));
      Logger.i(TAG,"String_Node_Str");
    }
 else {
      e.putString(mContext.getString(R.string.settings_key_next_word_suggestion_aggressiveness),"String_Node_Str");
      Logger.i(TAG,"String_Node_Str");
    }
    e.commit();
  }
  if (configurationVersion < 9) {
    final boolean swapSpace=sp.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str");
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove("String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_bool_should_swap_punctuation_and_space),swapSpace);
    e.commit();
  }
  if (configurationVersion < 10) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_ordered_active_quick_text_keys));
    e.commit();
  }
  Editor e=sp.edit();
  e.putInt(CONFIGURATION_VERSION,10);
  e.commit();
}

Fixed version (ground truth):
private void upgradeSettingsValues(SharedPreferences sp){
  Logger.d(TAG,"String_Node_Str");
  int configurationVersion=sp.getInt(CONFIGURATION_VERSION,9);
  if (configurationVersion < 1) {
    boolean oldLandscapeFullScreenValue=sp.getBoolean("String_Node_Str",mContext.getResources().getBoolean(R.bool.settings_default_landscape_fullscreen));
    Logger.i(TAG,"String_Node_Str");
    Editor e=sp.edit();
    e.putBoolean(mContext.getString(R.string.settings_key_landscape_fullscreen),oldLandscapeFullScreenValue);
    e.remove("String_Node_Str");
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 2) {
    Logger.i(TAG,"String_Node_Str");
    Editor e=sp.edit();
    e.putString("String_Node_Str",mContext.getString(R.string.settings_default_portrait_keyboard_height_factor));
    e.putString("String_Node_Str",mContext.getString(R.string.settings_default_landscape_keyboard_height_factor));
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 3) {
    Editor e=sp.edit();
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ECLAIR_MR1) {
      Logger.i(TAG,"String_Node_Str");
      final String bottomRowKey=mContext.getString(R.string.settings_key_ext_kbd_bottom_row_key);
      String currentBottomRowId=sp.getString(bottomRowKey,mContext.getString(R.string.settings_default_ext_kbd_bottom_row_key));
      String newBottomRowId="String_Node_Str";
      if (currentBottomRowId.equals("String_Node_Str")) {
        newBottomRowId="String_Node_Str";
      }
 else       if (currentBottomRowId.equals("String_Node_Str")) {
        newBottomRowId="String_Node_Str";
      }
      if (!TextUtils.isEmpty(newBottomRowId)) {
        Logger.i(TAG,"String_Node_Str" + currentBottomRowId + "String_Node_Str"+ newBottomRowId+ "String_Node_Str");
        e.putString(bottomRowKey,newBottomRowId);
      }
    }
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 4) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_landscape_fullscreen),mContext.getResources().getBoolean(R.bool.settings_default_landscape_fullscreen));
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 5) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_workaround_disable_rtl_fix),getAlwaysUseDrawTextDefault());
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 6) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_allow_suggestions_restart));
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 7) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_ordered_active_quick_text_keys));
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 8) {
    final boolean autoPick=sp.getBoolean("String_Node_Str",true);
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove("String_Node_Str");
    if (autoPick) {
      e.putString(mContext.getString(R.string.settings_key_next_word_suggestion_aggressiveness),mContext.getString(R.string.settings_default_auto_pick_suggestion_aggressiveness));
      Logger.i(TAG,"String_Node_Str");
    }
 else {
      e.putString(mContext.getString(R.string.settings_key_next_word_suggestion_aggressiveness),"String_Node_Str");
      Logger.i(TAG,"String_Node_Str");
    }
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 9) {
    final boolean swapSpace=sp.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str");
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove("String_Node_Str");
    e.putBoolean(mContext.getString(R.string.settings_key_bool_should_swap_punctuation_and_space),swapSpace);
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  if (configurationVersion < 10) {
    Editor e=sp.edit();
    Logger.i(TAG,"String_Node_Str");
    e.remove(mContext.getString(R.string.settings_key_ordered_active_quick_text_keys));
    SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
  }
  Editor e=sp.edit();
  e.putInt(CONFIGURATION_VERSION,10);
  SharedPreferencesCompat.EditorCompat.getInstance().apply(e);
}