Program: 91149
Project: 91149
Buggy source:
private void updateIncludingMenus(){
  WalletAccount account=_focusedAccount;
  final List<Integer> menus=Lists.newArrayList();
  if (!(account instanceof ColuAccount) && !Utils.checkIsLinked(account,_mbwManager.getColuManager().getAccounts().values())) {
    menus.add(R.menu.record_options_menu);
  }
  if ((account instanceof SingleAddressAccount) || (account.isDerivedFromInternalMasterseed())) {
    menus.add(R.menu.record_options_menu_backup);
  }
  if (account instanceof SingleAddressAccount) {
    menus.add(R.menu.record_options_menu_backup_verify);
  }
  if (account instanceof ColuAccount) {
    menus.add(R.menu.record_options_menu_backup);
    menus.add(R.menu.record_options_menu_backup_verify);
  }
  if (!account.isDerivedFromInternalMasterseed()) {
    menus.add(R.menu.record_options_menu_delete);
  }
  if (account.isActive() && account.canSpend() && !(account instanceof Bip44PubOnlyAccount)) {
    menus.add(R.menu.record_options_menu_sign);
  }
  if (account.isActive()) {
    menus.add(R.menu.record_options_menu_active);
  }
  if (account.isActive() && !(account instanceof CoinapultAccount)) {
    menus.add(R.menu.record_options_menu_outputs);
  }
  if (account instanceof CoinapultAccount) {
    menus.add(R.menu.record_options_menu_set_coinapult_mail);
  }
  if (account.isArchived()) {
    menus.add(R.menu.record_options_menu_archive);
  }
  if (account.isActive() && account instanceof ExportableAccount) {
    menus.add(R.menu.record_options_menu_export);
  }
  if (account.isActive() && account instanceof Bip44Account && !(account instanceof Bip44PubOnlyAccount)&& walletManager.getActiveMasterseedAccounts().size() > 1) {
    if (!((Bip44Account)account).hasHadActivity()) {
      menus.add(R.menu.record_options_menu_hide_unused);
    }
  }
  if (RecordRowBuilder.showLegacyAccountWarning(account,_mbwManager)) {
    menus.add(R.menu.record_options_menu_ignore_warning);
  }
  if (account.getId().equals(_mbwManager.getLocalTraderManager().getLocalTraderAccountId())) {
    menus.add(R.menu.record_options_menu_detach);
  }
  ActionBarActivity parent=(ActionBarActivity)getActivity();
  Callback actionMode=new Callback(){
    @Override public boolean onCreateActionMode(    ActionMode actionMode,    Menu menu){
      for (      Integer res : menus) {
        actionMode.getMenuInflater().inflate(res,menu);
      }
      return true;
    }
    @Override public boolean onPrepareActionMode(    ActionMode actionMode,    Menu menu){
      return true;
    }
    @Override public boolean onActionItemClicked(    ActionMode actionMode,    MenuItem menuItem){
      if (_mbwManager.getWalletManager(false).getState() == WalletManager.State.SYNCHRONIZING || _mbwManager.getColuManager().getState() == WalletManager.State.SYNCHRONIZING) {
        _toaster.toast(R.string.synchronizing_please_wait,false);
        return true;
      }
      int id=menuItem.getItemId();
      if (id == R.id.miActivate) {
        activateSelected();
        return true;
      }
 else       if (id == R.id.miSetLabel) {
        setLabelOnAccount(_focusedAccount,"String_Node_Str",true);
        return true;
      }
 else       if (id == R.id.miDeleteRecord) {
        deleteSelected();
        return true;
      }
 else       if (id == R.id.miArchive) {
        archiveSelected();
        return true;
      }
 else       if (id == R.id.miHideUnusedAccount) {
        hideSelected();
        return true;
      }
 else       if (id == R.id.miExport) {
        exportSelectedPrivateKey();
        return true;
      }
 else       if (id == R.id.miIgnoreWarnings) {
        ignoreSelectedPrivateKey();
        return true;
      }
 else       if (id == R.id.miSignMessage) {
        signMessage();
        return true;
      }
 else       if (id == R.id.miDetach) {
        detachFromLocalTrader();
        return true;
      }
 else       if (id == R.id.miShowOutputs) {
        showOutputs();
        return true;
      }
 else       if (id == R.id.miMakeBackup) {
        makeBackup();
        return true;
      }
 else       if (id == R.id.miSingleKeyBackupVerify) {
        verifySingleKeyBackup();
        return true;
      }
 else       if (id == R.id.miRescan) {
        rescan();
        return true;
      }
 else       if (id == R.id.miSetMail) {
        setCoinapultMail();
        return true;
      }
 else       if (id == R.id.miVerifyMail) {
        verifyCoinapultMail();
        return true;
      }
      return false;
    }
    @Override public void onDestroyActionMode(    ActionMode actionMode){
      currentActionMode=null;
      if (_focusedAccount != null) {
        _focusedAccount=null;
        update();
      }
    }
  }
;
  currentActionMode=parent.startSupportActionMode(actionMode);
  _focusedAccount=account;
  update();
}

Fixed version (ground truth):
private void updateIncludingMenus(){
  WalletAccount account=accountListAdapter.getFocusedAccount();
  final List<Integer> menus=Lists.newArrayList();
  if (!(account instanceof ColuAccount) && !Utils.checkIsLinked(account,_mbwManager.getColuManager().getAccounts().values())) {
    menus.add(R.menu.record_options_menu);
  }
  if ((account instanceof SingleAddressAccount) || (account.isDerivedFromInternalMasterseed())) {
    menus.add(R.menu.record_options_menu_backup);
  }
  if (account instanceof SingleAddressAccount) {
    menus.add(R.menu.record_options_menu_backup_verify);
  }
  if (account instanceof ColuAccount) {
    menus.add(R.menu.record_options_menu_backup);
    menus.add(R.menu.record_options_menu_backup_verify);
  }
  if (!account.isDerivedFromInternalMasterseed()) {
    menus.add(R.menu.record_options_menu_delete);
  }
  if (account.isActive() && account.canSpend() && !(account instanceof Bip44PubOnlyAccount)) {
    menus.add(R.menu.record_options_menu_sign);
  }
  if (account.isActive()) {
    menus.add(R.menu.record_options_menu_active);
  }
  if (account.isActive() && !(account instanceof CoinapultAccount)) {
    menus.add(R.menu.record_options_menu_outputs);
  }
  if (account instanceof CoinapultAccount) {
    menus.add(R.menu.record_options_menu_set_coinapult_mail);
  }
  if (account.isArchived()) {
    menus.add(R.menu.record_options_menu_archive);
  }
  if (account.isActive() && account instanceof ExportableAccount) {
    menus.add(R.menu.record_options_menu_export);
  }
  if (account.isActive() && account instanceof Bip44Account && !(account instanceof Bip44PubOnlyAccount)&& walletManager.getActiveMasterseedAccounts().size() > 1) {
    if (!((Bip44Account)account).hasHadActivity()) {
      menus.add(R.menu.record_options_menu_hide_unused);
    }
  }
  if (RecordRowBuilder.showLegacyAccountWarning(account,_mbwManager)) {
    menus.add(R.menu.record_options_menu_ignore_warning);
  }
  if (account.getId().equals(_mbwManager.getLocalTraderManager().getLocalTraderAccountId())) {
    menus.add(R.menu.record_options_menu_detach);
  }
  ActionBarActivity parent=(ActionBarActivity)getActivity();
  Callback actionMode=new Callback(){
    @Override public boolean onCreateActionMode(    ActionMode actionMode,    Menu menu){
      for (      Integer res : menus) {
        actionMode.getMenuInflater().inflate(res,menu);
      }
      return true;
    }
    @Override public boolean onPrepareActionMode(    ActionMode actionMode,    Menu menu){
      return true;
    }
    @Override public boolean onActionItemClicked(    ActionMode actionMode,    MenuItem menuItem){
      if (_mbwManager.getWalletManager(false).getState() == WalletManager.State.SYNCHRONIZING || _mbwManager.getColuManager().getState() == WalletManager.State.SYNCHRONIZING) {
        _toaster.toast(R.string.synchronizing_please_wait,false);
        return true;
      }
      int id=menuItem.getItemId();
      if (id == R.id.miActivate) {
        activateSelected();
        return true;
      }
 else       if (id == R.id.miSetLabel) {
        setLabelOnAccount(accountListAdapter.getFocusedAccount(),"String_Node_Str",true);
        return true;
      }
 else       if (id == R.id.miDeleteRecord) {
        deleteSelected();
        return true;
      }
 else       if (id == R.id.miArchive) {
        archiveSelected();
        return true;
      }
 else       if (id == R.id.miHideUnusedAccount) {
        hideSelected();
        return true;
      }
 else       if (id == R.id.miExport) {
        exportSelectedPrivateKey();
        return true;
      }
 else       if (id == R.id.miIgnoreWarnings) {
        ignoreSelectedPrivateKey();
        return true;
      }
 else       if (id == R.id.miSignMessage) {
        signMessage();
        return true;
      }
 else       if (id == R.id.miDetach) {
        detachFromLocalTrader();
        return true;
      }
 else       if (id == R.id.miShowOutputs) {
        showOutputs();
        return true;
      }
 else       if (id == R.id.miMakeBackup) {
        makeBackup();
        return true;
      }
 else       if (id == R.id.miSingleKeyBackupVerify) {
        verifySingleKeyBackup();
        return true;
      }
 else       if (id == R.id.miRescan) {
        rescan();
        return true;
      }
 else       if (id == R.id.miSetMail) {
        setCoinapultMail();
        return true;
      }
 else       if (id == R.id.miVerifyMail) {
        verifyCoinapultMail();
        return true;
      }
      return false;
    }
    @Override public void onDestroyActionMode(    ActionMode actionMode){
      currentActionMode=null;
      if (accountListAdapter.getFocusedAccount() != null) {
        accountListAdapter.setFocusedAccount(null);
        update();
      }
    }
  }
;
  currentActionMode=parent.startSupportActionMode(actionMode);
  accountListAdapter.setFocusedAccount(account);
  update();
}