Program: 13916
Project: 13916
Buggy source:
private void setPreferencesFromSiteSettings(){
  mLocationPref.setChecked(mSiteSettings.getLocation());
  changeEditTextPreferenceValue(mTitlePref,mSiteSettings.getTitle());
  changeEditTextPreferenceValue(mTaglinePref,mSiteSettings.getTagline());
  changeEditTextPreferenceValue(mAddressPref,mSiteSettings.getAddress());
  changeEditTextPreferenceValue(mUsernamePref,mSiteSettings.getUsername());
  changeEditTextPreferenceValue(mPasswordPref,mSiteSettings.getPassword());
  changeLanguageValue(mSiteSettings.getLanguageCode());
  setDetailListPreferenceValue(mPrivacyPref,String.valueOf(mSiteSettings.getPrivacy()),mSiteSettings.getPrivacyDescription());
  setCategories();
  setPostFormats();
  setAllowComments(mSiteSettings.getAllowComments());
  setSendPingbacks(mSiteSettings.getSendPingbacks());
  setReceivePingbacks(mSiteSettings.getReceivePingbacks());
  setDetailListPreferenceValue(mSortByPref,String.valueOf(mSiteSettings.getCommentSorting()),mSiteSettings.getSortingDescription());
  int approval=mSiteSettings.getManualApproval() ? mSiteSettings.getUseCommentWhitelist() ? 0 : -1 : 1;
  setDetailListPreferenceValue(mWhitelistPref,String.valueOf(approval),getWhitelistSummary(approval));
  String s=StringUtils.getQuantityString(getActivity(),R.string.site_settings_multiple_links_summary_zero,R.string.site_settings_multiple_links_summary_one,R.string.site_settings_multiple_links_summary_other,mSiteSettings.getMultipleLinks());
  mMultipleLinksPref.setSummary(s);
  mIdentityRequiredPreference.setChecked(mSiteSettings.getIdentityRequired());
  mUserAccountRequiredPref.setChecked(mSiteSettings.getUserAccountRequired());
  mThreadingPref.setSummary(mSiteSettings.getThreadingDescription());
  mCloseAfterPref.setSummary(mSiteSettings.getCloseAfterDescriptionForPeriod());
  mPagingPref.setSummary(mSiteSettings.getPagingDescription());
  mRelatedPostsPref.setSummary(mSiteSettings.getRelatedPostsDescription());
  mModerationHoldPref.setSummary(mSiteSettings.getModerationHoldDescription());
  mBlacklistPref.setSummary(mSiteSettings.getBlacklistDescription());
}

Fixed version (ground truth):
private void setPreferencesFromSiteSettings(){
  mLocationPref.setChecked(mSiteSettings.getLocation());
  mOptimizeImage.setChecked(mSiteSettings.getOptmizeImage());
  changeEditTextPreferenceValue(mTitlePref,mSiteSettings.getTitle());
  changeEditTextPreferenceValue(mTaglinePref,mSiteSettings.getTagline());
  changeEditTextPreferenceValue(mAddressPref,mSiteSettings.getAddress());
  changeEditTextPreferenceValue(mUsernamePref,mSiteSettings.getUsername());
  changeEditTextPreferenceValue(mPasswordPref,mSiteSettings.getPassword());
  changeLanguageValue(mSiteSettings.getLanguageCode());
  setDetailListPreferenceValue(mPrivacyPref,String.valueOf(mSiteSettings.getPrivacy()),mSiteSettings.getPrivacyDescription());
  setCategories();
  setPostFormats();
  setAllowComments(mSiteSettings.getAllowComments());
  setSendPingbacks(mSiteSettings.getSendPingbacks());
  setReceivePingbacks(mSiteSettings.getReceivePingbacks());
  setDetailListPreferenceValue(mSortByPref,String.valueOf(mSiteSettings.getCommentSorting()),mSiteSettings.getSortingDescription());
  int approval=mSiteSettings.getManualApproval() ? mSiteSettings.getUseCommentWhitelist() ? 0 : -1 : 1;
  setDetailListPreferenceValue(mWhitelistPref,String.valueOf(approval),getWhitelistSummary(approval));
  String s=StringUtils.getQuantityString(getActivity(),R.string.site_settings_multiple_links_summary_zero,R.string.site_settings_multiple_links_summary_one,R.string.site_settings_multiple_links_summary_other,mSiteSettings.getMultipleLinks());
  mMultipleLinksPref.setSummary(s);
  mIdentityRequiredPreference.setChecked(mSiteSettings.getIdentityRequired());
  mUserAccountRequiredPref.setChecked(mSiteSettings.getUserAccountRequired());
  mThreadingPref.setSummary(mSiteSettings.getThreadingDescription());
  mCloseAfterPref.setSummary(mSiteSettings.getCloseAfterDescriptionForPeriod());
  mPagingPref.setSummary(mSiteSettings.getPagingDescription());
  mRelatedPostsPref.setSummary(mSiteSettings.getRelatedPostsDescription());
  mModerationHoldPref.setSummary(mSiteSettings.getModerationHoldDescription());
  mBlacklistPref.setSummary(mSiteSettings.getBlacklistDescription());
}