Program: 157584
Project: 157584
Buggy source:
private boolean loadSettings(){
  PreferenceManager.setDefaultValues(this,R.xml.prefs,false);
  boolean handled=false;
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  int newVibrationDuration=Integer.parseInt(sp.getString("String_Node_Str","String_Node_Str"));
  handled=handled || (newVibrationDuration != mVibrationDuration);
  mVibrationDuration=newVibrationDuration;
  boolean newSoundOn=sp.getBoolean("String_Node_Str",false);
  boolean soundChanged=(newSoundOn != mSoundOn);
  if (soundChanged) {
    if (newSoundOn) {
      Log.i("String_Node_Str","String_Node_Str");
      mAudioManager.loadSoundEffects();
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      mAudioManager.unloadSoundEffects();
    }
  }
  handled=handled || soundChanged;
  mSoundOn=newSoundOn;
  boolean customVolume=sp.getBoolean("String_Node_Str",true);
  float newVolume;
  if (customVolume) {
    newVolume=(float)((float)((float)sp.getInt("String_Node_Str",0)) / 12.5);
    Log.i("String_Node_Str","String_Node_Str" + newVolume);
  }
 else {
    Log.i("String_Node_Str","String_Node_Str");
    newVolume=-1;
  }
  handled=handled || (newVolume != mSoundVolume);
  mSoundVolume=newVolume;
  String newKeyboardChangeNotificationType=sp.getString("String_Node_Str",KEYBOARD_NOTIFICATION_ON_PHYSICAL);
  boolean notificationChanged=(!newKeyboardChangeNotificationType.equalsIgnoreCase(mKeyboardChangeNotificationType));
  handled=handled || notificationChanged;
  mKeyboardChangeNotificationType=newKeyboardChangeNotificationType;
  if (notificationChanged) {
    NotificationManager notificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancel(KEYBOARD_NOTIFICATION_ID);
    if (mKeyboardChangeNotificationType.equals(KEYBOARD_NOTIFICATION_ALWAYS))     notifyKeyboardChangeIfNeeded();
  }
  boolean newAutoCap=sp.getBoolean("String_Node_Str",true);
  handled=handled || (newAutoCap != mAutoCap);
  mAutoCap=newAutoCap;
  boolean newShowSuggestions=sp.getBoolean("String_Node_Str",true);
  boolean suggestionsChanged=(newShowSuggestions != mShowSuggestions);
  handled=handled || suggestionsChanged;
  mShowSuggestions=newShowSuggestions;
  if (suggestionsChanged || (!mShowSuggestions))   setMainDictionaryForCurrentKeyboard();
  boolean newAutoComplete=sp.getBoolean("String_Node_Str",true) && mShowSuggestions;
  handled=handled || (newAutoComplete != mAutoComplete);
  mAutoComplete=newAutoComplete;
  boolean newQuickFixes=sp.getBoolean("String_Node_Str",true);
  handled=handled || (newQuickFixes != mQuickFixes);
  mQuickFixes=newQuickFixes;
  mAutoCorrectOn=(mAutoComplete || mQuickFixes);
  mCorrectionMode=mAutoComplete ? 2 : (mShowSuggestions ? 1 : 0);
  boolean newUseKeyRepeat=sp.getBoolean("String_Node_Str",true);
  handled=handled || (newUseKeyRepeat != mUseKeyRepeat);
  mUseKeyRepeat=newUseKeyRepeat;
  Log.v("String_Node_Str","String_Node_Str" + mUseKeyRepeat);
  boolean newSwitchKeyboardOnSpace=sp.getBoolean("String_Node_Str",false);
  handled=handled || (newSwitchKeyboardOnSpace != mSwitchKeyboardOnSpace);
  mSwitchKeyboardOnSpace=newSwitchKeyboardOnSpace;
  boolean newSmileyOnShort=sp.getBoolean("String_Node_Str",false);
  handled=handled || (newSmileyOnShort != mSmileyOnShortPress);
  mSmileyOnShortPress=newSmileyOnShort;
  handled=handled || mConfig.handleConfigurationChange(sp);
  if (mInputView != null)   mInputView.setPreviewEnabled(mConfig.getShowKeyPreview());
  return handled;
}

Fixed version (ground truth):
private boolean loadSettings(){
  PreferenceManager.setDefaultValues(this,R.xml.prefs,false);
  boolean handled=false;
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  int newVibrationDuration=Integer.parseInt(sp.getString("String_Node_Str","String_Node_Str"));
  handled=handled || (newVibrationDuration != mVibrationDuration);
  mVibrationDuration=newVibrationDuration;
  boolean newSoundOn=sp.getBoolean("String_Node_Str",false);
  boolean soundChanged=(newSoundOn != mSoundOn);
  if (soundChanged) {
    if (newSoundOn) {
      Log.i("String_Node_Str","String_Node_Str");
      mAudioManager.loadSoundEffects();
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      mAudioManager.unloadSoundEffects();
    }
  }
  handled=handled || soundChanged;
  mSoundOn=newSoundOn;
  boolean customVolume=sp.getBoolean("String_Node_Str",true);
  float newVolume;
  if (customVolume) {
    newVolume=(float)((float)((float)sp.getInt("String_Node_Str",0)) / 12.5);
    Log.i("String_Node_Str","String_Node_Str" + newVolume);
  }
 else {
    Log.i("String_Node_Str","String_Node_Str");
    newVolume=-1;
  }
  handled=handled || (newVolume != mSoundVolume);
  mSoundVolume=newVolume;
  String newKeyboardChangeNotificationType=sp.getString("String_Node_Str",KEYBOARD_NOTIFICATION_ON_PHYSICAL);
  boolean notificationChanged=(!newKeyboardChangeNotificationType.equalsIgnoreCase(mKeyboardChangeNotificationType));
  handled=handled || notificationChanged;
  mKeyboardChangeNotificationType=newKeyboardChangeNotificationType;
  if (notificationChanged) {
    NotificationManager notificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancel(KEYBOARD_NOTIFICATION_ID);
    if (mKeyboardChangeNotificationType.equals(KEYBOARD_NOTIFICATION_ALWAYS))     notifyKeyboardChangeIfNeeded();
  }
  boolean newAutoCap=sp.getBoolean("String_Node_Str",true);
  handled=handled || (newAutoCap != mAutoCap);
  mAutoCap=newAutoCap;
  boolean newShowSuggestions=sp.getBoolean("String_Node_Str",true);
  boolean suggestionsChanged=(newShowSuggestions != mShowSuggestions);
  handled=handled || suggestionsChanged;
  mShowSuggestions=newShowSuggestions;
  if (suggestionsChanged || (!mShowSuggestions))   setMainDictionaryForCurrentKeyboard();
  boolean newAutoComplete=sp.getBoolean("String_Node_Str",true) && mShowSuggestions;
  handled=handled || (newAutoComplete != mAutoComplete);
  mAutoComplete=newAutoComplete;
  boolean newQuickFixes=sp.getBoolean("String_Node_Str",true);
  handled=handled || (newQuickFixes != mQuickFixes);
  mQuickFixes=newQuickFixes;
  mAutoCorrectOn=(mAutoComplete || mQuickFixes);
  mCorrectionMode=mAutoComplete ? 2 : (mShowSuggestions ? 1 : 0);
  boolean newSwitchKeyboardOnSpace=sp.getBoolean("String_Node_Str",false);
  handled=handled || (newSwitchKeyboardOnSpace != mSwitchKeyboardOnSpace);
  mSwitchKeyboardOnSpace=newSwitchKeyboardOnSpace;
  boolean newSmileyOnShort=sp.getBoolean("String_Node_Str",false);
  handled=handled || (newSmileyOnShort != mSmileyOnShortPress);
  mSmileyOnShortPress=newSmileyOnShort;
  handled=handled | ((AnySoftKeyboardConfiguration.AnySoftKeyboardConfigurationImpl)mConfig).handleConfigurationChange(sp);
  if (mInputView != null)   mInputView.setPreviewEnabled(mConfig.getShowKeyPreview());
  return handled;
}