Program: 164483
Project: 164483
Buggy source:
private void fetchProfile(String username){
  ApiClient.getService().getProfile(username).enqueue(new Callback<UserResponse>(){
    @Override public void onResponse(    Response<UserResponse> response,    Retrofit retrofit){
      if (isDestroyed() || isFinishing())       return;
      if (response != null && response.body() != null) {
        UserResponse userResponse=response.body();
        if (mSelectedUser != null) {
          mSelectedUser.copy(userResponse.data);
        }
 else {
          mSelectedUser=userResponse.data;
        }
        mSelectedUser.setLastSeen(System.currentTimeMillis());
        if (mSelectedUser.isSelf(app) && !TextUtils.isEmpty(mSelectedUser.getAccessToken())) {
          SqlHelper.getInstance(getApplicationContext()).updateUserInfo(mSelectedUser);
        }
 else {
          SqlHelper.getInstance(getApplicationContext()).insertProfile(mSelectedUser);
        }
        mAdapter=new ProfilePager(getApplicationContext(),getFragmentManager(),mSelectedUser);
        mPager.setAdapter(mAdapter);
        mSlidingTabs.setupWithViewPager(mPager);
        mMultiView.setViewState(MultiStateView.VIEW_STATE_CONTENT);
        supportInvalidateOptionsMenu();
      }
 else {
        ViewUtils.setErrorText(mMultiView,R.id.errorMessage,R.string.error_generic);
        mMultiView.setViewState(MultiStateView.VIEW_STATE_ERROR);
      }
    }
    @Override public void onFailure(    Throwable t){
      ViewUtils.setErrorText(mMultiView,R.id.errorMessage,ApiClient.getErrorCode(t));
      mMultiView.setViewState(MultiStateView.VIEW_STATE_ERROR);
    }
  }
);
}

Fixed version (ground truth):
private void fetchProfile(final String username){
  ApiClient.getService().getProfile(username).enqueue(new Callback<UserResponse>(){
    @Override public void onResponse(    Response<UserResponse> response,    Retrofit retrofit){
      if (isDestroyed() || isFinishing())       return;
      if (response != null && response.body() != null) {
        UserResponse userResponse=response.body();
        if (mSelectedUser != null) {
          mSelectedUser.copy(userResponse.data);
        }
 else {
          mSelectedUser=userResponse.data;
        }
        mSelectedUser.setLastSeen(System.currentTimeMillis());
        if (mSelectedUser.isSelf(app) && !TextUtils.isEmpty(mSelectedUser.getAccessToken())) {
          SqlHelper.getInstance(getApplicationContext()).updateUserInfo(mSelectedUser);
        }
 else {
          SqlHelper.getInstance(getApplicationContext()).insertProfile(mSelectedUser);
        }
        mAdapter=new ProfilePager(getApplicationContext(),getFragmentManager(),mSelectedUser);
        mPager.setAdapter(mAdapter);
        mSlidingTabs.setupWithViewPager(mPager);
        mMultiView.setViewState(MultiStateView.VIEW_STATE_CONTENT);
        supportInvalidateOptionsMenu();
      }
 else {
        ViewUtils.setErrorText(mMultiView,R.id.errorMessage,getString(R.string.profile_not_found,username));
        mMultiView.setViewState(MultiStateView.VIEW_STATE_ERROR);
      }
    }
    @Override public void onFailure(    Throwable t){
      ViewUtils.setErrorText(mMultiView,R.id.errorMessage,ApiClient.getErrorCode(t));
      mMultiView.setViewState(MultiStateView.VIEW_STATE_ERROR);
    }
  }
);
}