Program: 88354
Project: 88354
Buggy source:
private void loadSettings(){
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  mVibrateOn=sp.getBoolean(PREF_VIBRATE_ON,false);
  mSoundOn=sp.getBoolean(PREF_SOUND_ON,false);
  mAutoCap=sp.getBoolean(PREF_AUTO_CAP,true);
  mQuickFixes=sp.getBoolean(PREF_QUICK_FIXES,true);
  mHasUsedVoiceInput=sp.getBoolean(PREF_HAS_USED_VOICE_INPUT,false);
  mHasUsedVoiceInputUnsupportedLocale=sp.getBoolean(PREF_HAS_USED_VOICE_INPUT_UNSUPPORTED_LOCALE,false);
  String supportedLocalesString=SettingsUtil.getSettingsString(getContentResolver(),SettingsUtil.LATIN_IME_VOICE_INPUT_SUPPORTED_LOCALES,DEFAULT_VOICE_INPUT_SUPPORTED_LOCALES);
  ArrayList<String> voiceInputSupportedLocales=newArrayList(supportedLocalesString.split("String_Node_Str"));
  mLocaleSupportedForVoiceInput=voiceInputSupportedLocales.contains(mLocale);
  mShowSuggestions=sp.getBoolean(PREF_SHOW_SUGGESTIONS,true);
  if (VOICE_INSTALLED) {
    final String voiceMode=sp.getString(PREF_VOICE_MODE,getString(R.string.voice_mode_main));
    boolean enableVoice=!voiceMode.equals(getString(R.string.voice_mode_off)) && mEnableVoiceButton;
    boolean voiceOnPrimary=voiceMode.equals(getString(R.string.voice_mode_main));
    if (mKeyboardSwitcher != null && (enableVoice != mEnableVoice || voiceOnPrimary != mVoiceOnPrimary)) {
      mKeyboardSwitcher.setVoiceMode(enableVoice,voiceOnPrimary);
    }
    mEnableVoice=enableVoice;
    mVoiceOnPrimary=voiceOnPrimary;
  }
  mAutoCorrectEnabled=sp.getBoolean(PREF_AUTO_COMPLETE,mResources.getBoolean(R.bool.enable_autocorrect)) & mShowSuggestions;
  updateCorrectionMode();
  updateAutoTextEnabled(mResources.getConfiguration().locale);
  mLanguageSwitcher.loadLocales(sp);
}

Fixed version (ground truth):
private void loadSettings(){
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  mVibrateOn=sp.getBoolean(PREF_VIBRATE_ON,false);
  mSoundOn=sp.getBoolean(PREF_SOUND_ON,false);
  mAutoCap=sp.getBoolean(PREF_AUTO_CAP,true);
  mQuickFixes=sp.getBoolean(PREF_QUICK_FIXES,true);
  mHasUsedVoiceInput=sp.getBoolean(PREF_HAS_USED_VOICE_INPUT,false);
  mHasUsedVoiceInputUnsupportedLocale=sp.getBoolean(PREF_HAS_USED_VOICE_INPUT_UNSUPPORTED_LOCALE,false);
  String supportedLocalesString=SettingsUtil.getSettingsString(getContentResolver(),SettingsUtil.LATIN_IME_VOICE_INPUT_SUPPORTED_LOCALES,DEFAULT_VOICE_INPUT_SUPPORTED_LOCALES);
  ArrayList<String> voiceInputSupportedLocales=newArrayList(supportedLocalesString.split("String_Node_Str"));
  mLocaleSupportedForVoiceInput=voiceInputSupportedLocales.contains(mInputLocale);
  mShowSuggestions=sp.getBoolean(PREF_SHOW_SUGGESTIONS,true);
  if (VOICE_INSTALLED) {
    final String voiceMode=sp.getString(PREF_VOICE_MODE,getString(R.string.voice_mode_main));
    boolean enableVoice=!voiceMode.equals(getString(R.string.voice_mode_off)) && mEnableVoiceButton;
    boolean voiceOnPrimary=voiceMode.equals(getString(R.string.voice_mode_main));
    if (mKeyboardSwitcher != null && (enableVoice != mEnableVoice || voiceOnPrimary != mVoiceOnPrimary)) {
      mKeyboardSwitcher.setVoiceMode(enableVoice,voiceOnPrimary);
    }
    mEnableVoice=enableVoice;
    mVoiceOnPrimary=voiceOnPrimary;
  }
  mAutoCorrectEnabled=sp.getBoolean(PREF_AUTO_COMPLETE,mResources.getBoolean(R.bool.enable_autocorrect)) & mShowSuggestions;
  updateCorrectionMode();
  updateAutoTextEnabled(mResources.getConfiguration().locale);
  mLanguageSwitcher.loadLocales(sp);
}