Program: 88306
Project: 88306
Buggy source:
private void loadSettings(){
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  mVibrateOn=sp.getBoolean(PREF_VIBRATE_ON,false);
  mSoundOn=sp.getBoolean(PREF_SOUND_ON,false);
  mPopupOn=sp.getBoolean(PREF_POPUP_ON,true);
  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;
  mBigramSuggestionEnabled=sp.getBoolean(PREF_BIGRAM_SUGGESTIONS,true) & 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);
  mPopupOn=sp.getBoolean(PREF_POPUP_ON,mResources.getBoolean(R.bool.default_popup_preview));
  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;
  mBigramSuggestionEnabled=sp.getBoolean(PREF_BIGRAM_SUGGESTIONS,true) & mShowSuggestions;
  updateCorrectionMode();
  updateAutoTextEnabled(mResources.getConfiguration().locale);
  mLanguageSwitcher.loadLocales(sp);
}