Program: 14302
Project: 14302
Buggy source:
/** 
 * Helper method to parse JSON response to REST request.
 */
private void handleResponseToWPComSettingsRequest(JSONObject response){
  if (mTitlePreference != null) {
    mTitlePreference.setEnabled(true);
    mRemoteTitle=response.optString(RestClientUtils.SITE_TITLE_KEY);
    changeEditTextPreferenceValue(mTitlePreference,mRemoteTitle);
  }
  if (mTaglinePreference != null) {
    mTaglinePreference.setEnabled(true);
    mRemoteTagline=response.optString(RestClientUtils.SITE_DESC_KEY);
    changeEditTextPreferenceValue(mTaglinePreference,mRemoteTagline);
  }
  mRemoteAddress=response.optString(RestClientUtils.SITE_URL_KEY);
  changeEditTextPreferenceValue(mAddressPreference,mRemoteAddress);
  JSONObject settingsObject=response.optJSONObject("String_Node_Str");
  if (settingsObject != null) {
    mRemoteLanguage=convertLanguageIdToLanguageCode(settingsObject.optString("String_Node_Str"));
    if (mLanguagePreference != null) {
      String[] languageCodes=getResources().getStringArray(R.array.language_codes);
      mLanguagePreference.setEntries(createLanguageDisplayStrings(languageCodes));
      mLanguagePreference.setDetails(createLanguageDetailDisplayStrings(languageCodes,mRemoteLanguage));
      mLanguagePreference.setEnabled(true);
      changeLanguageValue(mRemoteLanguage);
      mLanguagePreference.setSummary(firstLetterCapitalized(getLanguageString(mRemoteLanguage,new Locale(localeInput(mRemoteLanguage)))));
    }
    mRemotePrivacy=settingsObject.optInt("String_Node_Str");
    if (mPrivacyPreference != null) {
      mPrivacyPreference.setEnabled(true);
      mPrivacyPreference.setValue(String.valueOf(mRemotePrivacy));
    }
    changePrivacyValue(mRemotePrivacy);
  }
}

Fixed version (ground truth):
/** 
 * Helper method to parse JSON response to REST request.
 */
private void handleResponseToWPComSettingsRequest(JSONObject response){
  if (mTitlePreference != null) {
    mTitlePreference.setEnabled(true);
    mRemoteTitle=response.optString(RestClientUtils.SITE_TITLE_KEY);
    changeEditTextPreferenceValue(mTitlePreference,mRemoteTitle);
  }
  if (mTaglinePreference != null) {
    mTaglinePreference.setEnabled(true);
    mRemoteTagline=response.optString(RestClientUtils.SITE_DESC_KEY);
    changeEditTextPreferenceValue(mTaglinePreference,mRemoteTagline);
  }
  mRemoteAddress=response.optString(RestClientUtils.SITE_URL_KEY);
  changeEditTextPreferenceValue(mAddressPreference,mRemoteAddress);
  JSONObject settingsObject=response.optJSONObject("String_Node_Str");
  if (settingsObject != null) {
    mRemoteLanguage=convertLanguageIdToLanguageCode(settingsObject.optString("String_Node_Str"));
    if (mLanguagePreference != null) {
      String[] languageCodes=getResources().getStringArray(R.array.language_codes);
      mLanguagePreference.setEntries(createLanguageDisplayStrings(languageCodes));
      mLanguagePreference.setDetails(createLanguageDetailDisplayStrings(languageCodes,mRemoteLanguage));
      mLanguagePreference.setEnabled(true);
      changeLanguageValue(mRemoteLanguage);
      mLanguagePreference.setSummary(firstLetterCapitalized(getLanguageString(mRemoteLanguage,new Locale(localeInput(mRemoteLanguage)))));
    }
    mRemotePrivacy=settingsObject.optInt("String_Node_Str");
    if (mPrivacyPreference != null) {
      mPrivacyPreference.setEnabled(true);
      mPrivacyPreference.setValue(String.valueOf(mRemotePrivacy));
      mPrivacyPreference.setSummary(privacyStringForValue(mRemotePrivacy));
    }
  }
}