Source:
<code>public void refreshPersonDetails() { if (!isAdded()) return; Person person = loadPerson(); if (person != null) { int avatarSz = getResources().getDimensionPixelSize(R.dimen.people_avatar_sz); String avatarUrl = GravatarUtils.fixGravatarUrl(person.getAvatarUrl(), avatarSz); mAvatarImageView.setImageUrl(avatarUrl, WPNetworkImageView.ImageType.AVATAR); mDisplayNameTextView.setText(StringUtils.unescapeHTML(person.getDisplayName())); mRoleTextView.setText(StringUtils.capitalize(person.getRole())); <START> if (!person.getUsername().isEmpty()) { <END> mUsernameTextView.setVisibility(View.VISIBLE); mUsernameTextView.setText(String.format("@%s", person.getUsername())); } else { mUsernameTextView.setVisibility(View.GONE); } if (person.isFollower() || person.isEmailFollower()) { mSubscribedTextView.setVisibility(View.VISIBLE); String dateSubscribed = SimpleDateFormat.getDateInstance().format(person.getDateSubscribed()); String dateText = getString(R.string.follower_subscribed_since, dateSubscribed); mSubscribedTextView.setText(dateText); } else { mSubscribedTextView.setVisibility(View.GONE); } if (person.isFollower() || person.isEmailFollower()) { mRoleContainer.setVisibility(View.GONE); } else { mRoleContainer.setVisibility(View.VISIBLE); setupRoleContainerForCapability(); } } else { AppLog.w(AppLog.T.PEOPLE, "Person returned null from DB for personID: " + mPersonID + " & localTableBlogID: " + mLocalTableBlogID); } }</code><technical_language>TextUtils.isEmpty(person.getUsername()) prevent a NPE happening</technical_language>

Target:
public void refreshPersonDetails() { if (!isAdded()) return; Person person = loadPerson(); if (person != null) { int avatarSz = getResources().getDimensionPixelSize(R.dimen.people_avatar_sz); String avatarUrl = GravatarUtils.fixGravatarUrl(person.getAvatarUrl(), avatarSz); mAvatarImageView.setImageUrl(avatarUrl, WPNetworkImageView.ImageType.AVATAR); mDisplayNameTextView.setText(StringUtils.unescapeHTML(person.getDisplayName())); mRoleTextView.setText(StringUtils.capitalize(person.getRole())); if (!TextUtils.isEmpty(person.getUsername())) { mUsernameTextView.setText(String.format("@%s", person.getUsername())); } if (mPersonType == Person.PersonType.USER) { mRoleContainer.setVisibility(View.VISIBLE); setupRoleContainerForCapability(); mSubscribedDateContainer.setVisibility(View.GONE); } else { mRoleContainer.setVisibility(View.GONE); mSubscribedDateContainer.setVisibility(View.VISIBLE); if (mPersonType == Person.PersonType.FOLLOWER) { mSubscribedDateTitleView.setText(R.string.title_follower); } else if (mPersonType == Person.PersonType.EMAIL_FOLLOWER) { mSubscribedDateTitleView.setText(R.string.title_email_follower); } String dateSubscribed = SimpleDateFormat.getDateInstance().format(person.getDateSubscribed()); String dateText = getString(R.string.follower_subscribed_since, dateSubscribed); mSubscribedDateTextView.setText(dateText); } int padding = mPersonType == Person.PersonType.EMAIL_FOLLOWER ? (int) getResources().getDimension(R.dimen.margin_small) : 0; changeDisplayNameTopPadding(padding); } else { AppLog.w(AppLog.T.PEOPLE, "Person returned null from DB for personID: " + mPersonID + " & localTableBlogID: " + mLocalTableBlogID); } }