Program: 13662
Project: 13662
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ((WordPress)getApplication()).component().inject(this);
  mDispatcher.register(this);
  String pluginName;
  if (savedInstanceState == null) {
    mSite=(SiteModel)getIntent().getSerializableExtra(WordPress.SITE);
    pluginName=getIntent().getStringExtra(KEY_PLUGIN_NAME);
  }
 else {
    mSite=(SiteModel)savedInstanceState.getSerializable(WordPress.SITE);
    pluginName=savedInstanceState.getString(KEY_PLUGIN_NAME);
  }
  if (mSite == null) {
    ToastUtils.showToast(this,R.string.blog_not_found,Duration.SHORT);
    finish();
    return;
  }
  mPlugin=mPluginStore.getSitePluginByName(mSite,pluginName);
  if (mPlugin == null) {
    ToastUtils.showToast(this,R.string.plugin_not_found,Duration.SHORT);
    finish();
    return;
  }
  if (savedInstanceState == null) {
    mIsActive=mPlugin.isActive();
    mIsAutoUpdateEnabled=mPlugin.isAutoUpdateEnabled();
    mDispatcher.dispatch(PluginActionBuilder.newFetchWporgPluginAction(mPlugin.getSlug()));
  }
 else {
    mIsConfiguringPlugin=savedInstanceState.getBoolean(KEY_IS_CONFIGURING_PLUGIN);
    mIsUpdatingPlugin=savedInstanceState.getBoolean(KEY_IS_UPDATING_PLUGIN);
    mIsRemovingPlugin=savedInstanceState.getBoolean(KEY_IS_REMOVING_PLUGIN);
    mIsActive=savedInstanceState.getBoolean(KEY_IS_ACTIVE);
    mIsAutoUpdateEnabled=savedInstanceState.getBoolean(KEY_IS_AUTO_UPDATE_ENABLED);
    mIsShowingRemovePluginConfirmationDialog=savedInstanceState.getBoolean(KEY_IS_SHOWING_REMOVE_PLUGIN_CONFIRMATION_DIALOG);
  }
  mPluginInfo=PluginUtils.getPluginInfo(mPluginStore,mPlugin);
  setContentView(R.layout.plugin_detail_activity);
  Toolbar toolbar=findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    actionBar.setTitle(mPlugin.getDisplayName());
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setElevation(0);
  }
  setupViews();
  if (mIsShowingRemovePluginConfirmationDialog) {
    confirmRemovePlugin();
  }
  if (mIsRemovingPlugin) {
    showRemovePluginProgressDialog();
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ((WordPress)getApplication()).component().inject(this);
  mDispatcher.register(this);
  String pluginName;
  if (savedInstanceState == null) {
    mSite=(SiteModel)getIntent().getSerializableExtra(WordPress.SITE);
    pluginName=getIntent().getStringExtra(KEY_PLUGIN_NAME);
  }
 else {
    mSite=(SiteModel)savedInstanceState.getSerializable(WordPress.SITE);
    pluginName=savedInstanceState.getString(KEY_PLUGIN_NAME);
  }
  if (mSite == null) {
    ToastUtils.showToast(this,R.string.blog_not_found,Duration.SHORT);
    finish();
    return;
  }
  mPlugin=mPluginStore.getSitePluginByName(mSite,pluginName);
  if (mPlugin == null) {
    ToastUtils.showToast(this,R.string.plugin_not_found,Duration.SHORT);
    finish();
    return;
  }
  if (savedInstanceState == null) {
    mIsActive=mPlugin.isActive();
    mIsAutoUpdateEnabled=mPlugin.isAutoUpdateEnabled();
    mDispatcher.dispatch(PluginActionBuilder.newFetchWporgPluginAction(mPlugin.getSlug()));
  }
 else {
    mIsConfiguringPlugin=savedInstanceState.getBoolean(KEY_IS_CONFIGURING_PLUGIN);
    mIsUpdatingPlugin=savedInstanceState.getBoolean(KEY_IS_UPDATING_PLUGIN);
    mIsRemovingPlugin=savedInstanceState.getBoolean(KEY_IS_REMOVING_PLUGIN);
    mIsActive=savedInstanceState.getBoolean(KEY_IS_ACTIVE);
    mIsAutoUpdateEnabled=savedInstanceState.getBoolean(KEY_IS_AUTO_UPDATE_ENABLED);
    mIsShowingRemovePluginConfirmationDialog=savedInstanceState.getBoolean(KEY_IS_SHOWING_REMOVE_PLUGIN_CONFIRMATION_DIALOG);
  }
  mWPOrgPlugin=PluginUtils.getWPOrgPlugin(mPluginStore,mPlugin);
  setContentView(R.layout.plugin_detail_activity);
  Toolbar toolbar=findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    actionBar.setTitle(mPlugin.getDisplayName());
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setElevation(0);
  }
  setupViews();
  if (mIsShowingRemovePluginConfirmationDialog) {
    confirmRemovePlugin();
  }
  if (mIsRemovingPlugin) {
    showRemovePluginProgressDialog();
  }
}