Source:
<code>public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == ACTIVITY_REQUEST_FEED_CONFIGURE && resultCode == ConfigureActivity.CONFIGURATION_CHANGED_RESULT) { coordinator.updateHiddenCards(); refresh(); } else if ((requestCode == ACTIVITY_REQUEST_SETTINGS && resultCode == SettingsActivity.ACTIVITY_RESULT_LANGUAGE_CHANGED) || requestCode == ACTIVITY_REQUEST_ADD_A_LANGUAGE) { refresh(); } else if (requestCode == ACTIVITY_REQUEST_DESCRIPTION_EDIT && resultCode == RESULT_OK) { boolean isTranslation; if (suggestedEditsCardView != null) { suggestedEditsCardView.refreshCardContent(); isTranslation = suggestedEditsCardView.isTranslation(); if (suggestedEditsCardView.getCard() != null) { FeedbackUtil.showMessage(this, isTranslation && app.language().getAppLanguageCodes().size() > 1 <START> ? (suggestedEditsCardView.getCard().getInvokeSource() == FEED_CARD_SUGGESTED_EDITS_TRANSLATE_DESC) ? getString(R.string.description_edit_success_saved_in_lang_snackbar, app.language().getAppLanguageLocalizedName(app.language().getAppLanguageCodes().get(1))) : getString(R.string.description_edit_success_saved_image_caption_in_lang_snackbar, app.language().getAppLanguageLocalizedName(app.language().getAppLanguageCodes().get(1))) <END> : (suggestedEditsCardView.getCard().getInvokeSource() == FEED_CARD_SUGGESTED_EDITS_ADD_DESC) ? getString(R.string.description_edit_success_saved_snackbar) : getString(R.string.description_edit_success_saved_image_caption_snackbar)); } } } else if (requestCode == ACTIVITY_REQUEST_SUGGESTED_EDITS_ONBOARDING && resultCode == RESULT_OK) { startDescriptionEditScreen(); } }</code><technical_language>getString() contains logic of checking InvokeSource reduce repeated app.language().getAppLanguageLocalizedName(app.language().getAppLanguageCodes().get(1)</technical_language>

Target:
public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == ACTIVITY_REQUEST_FEED_CONFIGURE && resultCode == ConfigureActivity.CONFIGURATION_CHANGED_RESULT) { coordinator.updateHiddenCards(); refresh(); } else if ((requestCode == ACTIVITY_REQUEST_SETTINGS && resultCode == SettingsActivity.ACTIVITY_RESULT_LANGUAGE_CHANGED) || requestCode == ACTIVITY_REQUEST_ADD_A_LANGUAGE) { refresh(); } else if (requestCode == ACTIVITY_REQUEST_DESCRIPTION_EDIT && resultCode == RESULT_OK) { boolean isTranslation; if (suggestedEditsCardView != null) { suggestedEditsCardView.refreshCardContent(); isTranslation = suggestedEditsCardView.isTranslation(); if (suggestedEditsCardView.getCard() != null) { FeedbackUtil.showMessage(this, isTranslation && app.language().getAppLanguageCodes().size() > 1 ? getString(suggestedEditsCardView.getCard().getInvokeSource() == FEED_CARD_SUGGESTED_EDITS_TRANSLATE_DESC ? R.string.description_edit_success_saved_in_lang_snackbar : R.string.description_edit_success_saved_image_caption_in_lang_snackbar, app.language().getAppLanguageLocalizedName(app.language().getAppLanguageCodes().get(1))) : getString(suggestedEditsCardView.getCard().getInvokeSource() == FEED_CARD_SUGGESTED_EDITS_ADD_DESC ? R.string.description_edit_success_saved_snackbar : R.string.description_edit_success_saved_image_caption_snackbar)); } } } else if (requestCode == ACTIVITY_REQUEST_SUGGESTED_EDITS_ONBOARDING && resultCode == RESULT_OK) { startDescriptionEditScreen(); } }