Program: 157257
Project: 157257
Buggy source:
@Override protected void onLoadSettingsRequired(SharedPreferences sp){
  super.onLoadSettingsRequired(sp);
  mVibrationDuration=Integer.parseInt(sp.getString(getString(R.string.settings_key_vibrate_on_key_press_duration),getString(R.string.settings_default_vibrate_on_key_press_duration)));
  mSoundOn=sp.getBoolean(getString(R.string.settings_key_sound_on),getResources().getBoolean(R.bool.settings_default_sound_on));
  if (mSoundOn) {
    Logger.i(TAG,"String_Node_Str");
    try {
      mAudioManager.loadSoundEffects();
    }
 catch (    SecurityException e) {
      Logger.w(TAG,"String_Node_Str",e);
      mSoundOn=false;
    }
  }
  boolean customVolume=sp.getBoolean("String_Node_Str",false);
  int newVolume;
  if (customVolume) {
    newVolume=sp.getInt("String_Node_Str",0) + 1;
    Logger.i(TAG,"String_Node_Str" + newVolume + "String_Node_Str");
  }
 else {
    Logger.i(TAG,"String_Node_Str");
    newVolume=-1;
  }
  mSoundVolume=newVolume;
  mShowKeyboardIconInStatusBar=sp.getBoolean(getString(R.string.settings_key_keyboard_icon_in_status_bar),getResources().getBoolean(R.bool.settings_default_keyboard_icon_in_status_bar));
  if (mShowKeyboardIconInStatusBar) {
    setKeyboardStatusIcon();
  }
 else {
    mInputMethodManager.hideStatusIcon(mImeToken);
  }
  mAutoCap=sp.getBoolean("String_Node_Str",true);
  mShowSuggestions=sp.getBoolean("String_Node_Str",true);
  if (!mShowSuggestions) {
    closeDictionaries();
  }
  final String autoPickAggressiveness=sp.getString(getString(R.string.settings_key_auto_pick_suggestion_aggressiveness),getString(R.string.settings_default_auto_pick_suggestion_aggressiveness));
  final int calculatedCommonalityMaxLengthDiff;
  final int calculatedCommonalityMaxDistance;
switch (autoPickAggressiveness) {
case "String_Node_Str":
    calculatedCommonalityMaxLengthDiff=0;
  calculatedCommonalityMaxDistance=0;
mAutoComplete=false;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=1;
calculatedCommonalityMaxDistance=1;
mAutoComplete=true;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=3;
calculatedCommonalityMaxDistance=4;
mAutoComplete=true;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=5;
calculatedCommonalityMaxDistance=5;
mAutoComplete=true;
break;
default :
calculatedCommonalityMaxLengthDiff=2;
calculatedCommonalityMaxDistance=3;
mAutoComplete=true;
}
mAutoCorrectOn=mAutoComplete=mAutoComplete && mShowSuggestions;
mQuickFixes=sp.getBoolean("String_Node_Str",true);
mAllowSuggestionsRestart=sp.getBoolean(getString(R.string.settings_key_allow_suggestions_restart),getResources().getBoolean(R.bool.settings_default_allow_suggestions_restart));
mSuggest.setCorrectionMode(mQuickFixes,mShowSuggestions,calculatedCommonalityMaxLengthDiff,calculatedCommonalityMaxDistance,sp.getInt(getString(R.string.settings_key_min_length_for_word_correction__),2));
setInitialCondensedState(getResources().getConfiguration());
}

Fixed version (ground truth):
@Override protected void onLoadSettingsRequired(SharedPreferences sp){
  super.onLoadSettingsRequired(sp);
  mVibrationDuration=Integer.parseInt(sp.getString(getString(R.string.settings_key_vibrate_on_key_press_duration),getString(R.string.settings_default_vibrate_on_key_press_duration)));
  mSoundOn=sp.getBoolean(getString(R.string.settings_key_sound_on),getResources().getBoolean(R.bool.settings_default_sound_on));
  if (mSoundOn) {
    Logger.i(TAG,"String_Node_Str");
    try {
      mAudioManager.loadSoundEffects();
    }
 catch (    SecurityException e) {
      Logger.w(TAG,"String_Node_Str",e);
      mSoundOn=false;
    }
  }
  boolean customVolume=sp.getBoolean("String_Node_Str",false);
  int newVolume;
  if (customVolume) {
    newVolume=sp.getInt("String_Node_Str",0) + 1;
    Logger.i(TAG,"String_Node_Str" + newVolume + "String_Node_Str");
  }
 else {
    Logger.i(TAG,"String_Node_Str");
    newVolume=-1;
  }
  mSoundVolume=newVolume;
  mShowKeyboardIconInStatusBar=sp.getBoolean(getString(R.string.settings_key_keyboard_icon_in_status_bar),getResources().getBoolean(R.bool.settings_default_keyboard_icon_in_status_bar));
  if (mShowKeyboardIconInStatusBar) {
    setKeyboardStatusIcon();
  }
 else {
    mInputMethodManager.hideStatusIcon(mImeToken);
  }
  mAutoCap=sp.getBoolean("String_Node_Str",true);
  mShowSuggestions=sp.getBoolean("String_Node_Str",true);
  if (!mShowSuggestions) {
    closeDictionaries();
  }
  final String autoPickAggressiveness=sp.getString(getString(R.string.settings_key_auto_pick_suggestion_aggressiveness),getString(R.string.settings_default_auto_pick_suggestion_aggressiveness));
  final int calculatedCommonalityMaxLengthDiff;
  final int calculatedCommonalityMaxDistance;
switch (autoPickAggressiveness) {
case "String_Node_Str":
    calculatedCommonalityMaxLengthDiff=0;
  calculatedCommonalityMaxDistance=0;
mAutoComplete=false;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=1;
calculatedCommonalityMaxDistance=1;
mAutoComplete=true;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=3;
calculatedCommonalityMaxDistance=4;
mAutoComplete=true;
break;
case "String_Node_Str":
calculatedCommonalityMaxLengthDiff=5;
calculatedCommonalityMaxDistance=5;
mAutoComplete=true;
break;
default :
calculatedCommonalityMaxLengthDiff=2;
calculatedCommonalityMaxDistance=3;
mAutoComplete=true;
}
mAutoCorrectOn=mAutoComplete=mAutoComplete && mShowSuggestions;
mQuickFixes=sp.getBoolean("String_Node_Str",true);
mAllowSuggestionsRestart=sp.getBoolean(getString(R.string.settings_key_allow_suggestions_restart),getResources().getBoolean(R.bool.settings_default_allow_suggestions_restart));
mSuggest.setCorrectionMode(mQuickFixes,mShowSuggestions,calculatedCommonalityMaxLengthDiff,calculatedCommonalityMaxDistance,sp.getInt(getString(R.string.settings_key_min_length_for_word_correction__),2));
setInitialCondensedState(sp,getResources().getConfiguration());
}