Program: 14913
Project: 14913
Buggy source:
@Override protected void onPostExecute(final List<Object> userBlogList){
  if (mSetupBlog.isHttpAuthRequired()) {
    if (getActivity() == null) {
      return;
    }
    mSetupBlog.setHttpAuthRequired(false);
    AlertDialog.Builder alert=new AlertDialog.Builder(getActivity());
    alert.setTitle(R.string.http_authorization_required);
    View httpAuth=getActivity().getLayoutInflater().inflate(R.layout.alert_http_auth,null);
    final EditText usernameEditText=(EditText)httpAuth.findViewById(R.id.http_username);
    final EditText passwordEditText=(EditText)httpAuth.findViewById(R.id.http_password);
    alert.setView(httpAuth);
    final SetupBlogTask self=this;
    alert.setPositiveButton(R.string.sign_in,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int whichButton){
        SetupBlogTask setupBlogTask=new SetupBlogTask();
        setupBlogTask.setHttpCredentials(usernameEditText.getText().toString(),passwordEditText.getText().toString());
        setupBlogTask.execute();
      }
    }
);
    alert.setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int whichButton){
      }
    }
);
    alert.show();
    endProgress();
    return;
  }
  if (userBlogList == null && mErrorMsgId != 0) {
    FragmentTransaction ft=getFragmentManager().beginTransaction();
    NUXDialogFragment nuxAlert;
    if (mErrorMsgId == R.string.account_two_step_auth_enabled) {
      nuxAlert=NUXDialogFragment.newInstance(getString(R.string.nux_cannot_log_in),getString(mErrorMsgId),getString(R.string.nux_tap_continue),R.drawable.nux_icon_alert,true,getString(R.string.visit_security_settings),NUXDialogFragment.ACTION_OPEN_URL,"String_Node_Str");
    }
 else {
      if (mErrorMsgId == R.string.username_or_password_incorrect) {
        showUsernameError(mErrorMsgId);
        showPasswordError(mErrorMsgId);
        mErrorMsgId=0;
        endProgress();
        return;
      }
 else {
        nuxAlert=NUXDialogFragment.newInstance(getString(R.string.nux_cannot_log_in),getString(mErrorMsgId),getString(R.string.nux_tap_continue),R.drawable.nux_icon_alert);
      }
    }
    nuxAlert.show(ft,"String_Node_Str");
    mErrorMsgId=0;
    endProgress();
    return;
  }
  if (mSetupBlog.getXmlrpcUrl().contains("String_Node_Str")) {
    SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
    SharedPreferences.Editor editor=settings.edit();
    editor.putString(WordPress.WPCOM_USERNAME_PREFERENCE,mSetupBlog.getUsername());
    editor.putString(WordPress.WPCOM_PASSWORD_PREFERENCE,WordPressDB.encryptPassword(mSetupBlog.getPassword()));
    editor.commit();
    WordPress.restClient.get("String_Node_Str",new RestRequest.Listener(){
      @Override public void onResponse(      JSONObject jsonObject){
        ReaderUserActions.setCurrentUser(jsonObject);
      }
    }
,null);
  }
  if (userBlogList != null) {
    if (getActivity() != null) {
      getActivity().setResult(Activity.RESULT_OK);
      getActivity().finish();
    }
  }
 else {
    endProgress();
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(final List<Object> userBlogList){
  if (mSetupBlog.isHttpAuthRequired()) {
    if (getActivity() == null) {
      return;
    }
    mSetupBlog.setHttpAuthRequired(false);
    AlertDialog.Builder alert=new AlertDialog.Builder(getActivity());
    alert.setTitle(R.string.http_authorization_required);
    View httpAuth=getActivity().getLayoutInflater().inflate(R.layout.alert_http_auth,null);
    final EditText usernameEditText=(EditText)httpAuth.findViewById(R.id.http_username);
    final EditText passwordEditText=(EditText)httpAuth.findViewById(R.id.http_password);
    alert.setView(httpAuth);
    final SetupBlogTask self=this;
    alert.setPositiveButton(R.string.sign_in,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int whichButton){
        SetupBlogTask setupBlogTask=new SetupBlogTask();
        setupBlogTask.setHttpCredentials(usernameEditText.getText().toString(),passwordEditText.getText().toString());
        setupBlogTask.execute();
      }
    }
);
    alert.setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int whichButton){
      }
    }
);
    alert.show();
    endProgress();
    return;
  }
  if (userBlogList == null && mErrorMsgId != 0) {
    FragmentTransaction ft=getFragmentManager().beginTransaction();
    NUXDialogFragment nuxAlert;
    if (mErrorMsgId == R.string.account_two_step_auth_enabled) {
      nuxAlert=NUXDialogFragment.newInstance(getString(R.string.nux_cannot_log_in),getString(mErrorMsgId),getString(R.string.nux_tap_continue),R.drawable.nux_icon_alert,true,getString(R.string.visit_security_settings),NUXDialogFragment.ACTION_OPEN_URL,"String_Node_Str");
    }
 else {
      if (mErrorMsgId == R.string.username_or_password_incorrect) {
        showUsernameError(mErrorMsgId);
        showPasswordError(mErrorMsgId);
        mErrorMsgId=0;
        endProgress();
        return;
      }
 else {
        nuxAlert=NUXDialogFragment.newInstance(getString(R.string.nux_cannot_log_in),getString(mErrorMsgId),getString(R.string.nux_tap_continue),R.drawable.nux_icon_alert);
      }
    }
    ft.add(nuxAlert,"String_Node_Str");
    ft.commitAllowingStateLoss();
    mErrorMsgId=0;
    endProgress();
    return;
  }
  if (mSetupBlog.getXmlrpcUrl().contains("String_Node_Str")) {
    SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getActivity());
    SharedPreferences.Editor editor=settings.edit();
    editor.putString(WordPress.WPCOM_USERNAME_PREFERENCE,mSetupBlog.getUsername());
    editor.putString(WordPress.WPCOM_PASSWORD_PREFERENCE,WordPressDB.encryptPassword(mSetupBlog.getPassword()));
    editor.commit();
    WordPress.restClient.get("String_Node_Str",new RestRequest.Listener(){
      @Override public void onResponse(      JSONObject jsonObject){
        ReaderUserActions.setCurrentUser(jsonObject);
      }
    }
,null);
  }
  if (userBlogList != null) {
    if (getActivity() != null) {
      getActivity().setResult(Activity.RESULT_OK);
      getActivity().finish();
    }
  }
 else {
    endProgress();
  }
}