Program: 91210
Project: 91210
Buggy source:
@Override public boolean onActionItemClicked(ActionMode actionMode,MenuItem menuItem){
  final int itemId=menuItem.getItemId();
  if (itemId == R.id.miShowCoinapultDebug) {
    if (record instanceof CoinapultTransactionSummary) {
      final CoinapultTransactionSummary summary=(CoinapultTransactionSummary)record;
      new AlertDialog.Builder(_context).setMessage(summary.input.toString()).setNeutralButton(R.string.copy,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          Utils.setClipboardString(summary.input.toString(),TransactionHistoryFragment.this.getActivity());
          Toast.makeText(TransactionHistoryFragment.this.getActivity(),R.string.copied_to_clipboard,Toast.LENGTH_SHORT).show();
          dialog.dismiss();
        }
      }
).setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          dialog.dismiss();
        }
      }
).show();
    }
    return true;
  }
switch (itemId) {
case R.id.miShowDetails:
    doShowDetails(record);
  finishActionMode();
return true;
case R.id.miSetLabel:
setTransactionLabel(record);
finishActionMode();
break;
case R.id.miAddToAddressBook:
EnterAddressLabelUtil.enterAddressLabel(getActivity(),_mbwManager.getMetadataStorage(),record.destinationAddress.get(),"String_Node_Str",addressLabelChanged);
break;
case R.id.miCancelTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.remove_queued_transaction_title)).setMessage(_context.getString(R.string.remove_queued_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
boolean okay=_mbwManager.getSelectedAccount().cancelQueuedTransaction(record.txid);
dialog.dismiss();
updateTransactionHistory();
if (okay) {
Utils.showSimpleMessageDialog(getActivity(),_context.getString(R.string.remove_queued_transaction_hint));
}
 else {
new Toaster(getActivity()).toast(_context.getString(R.string.remove_queued_transaction_error),false);
}
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miDeleteUnconfirmedTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.delete_unconfirmed_transaction_title)).setMessage(_context.getString(R.string.warning_delete_unconfirmed_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
_mbwManager.getSelectedAccount().deleteTransaction(record.txid);
dialog.dismiss();
updateTransactionHistory();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miRebroadcastTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.rebroadcast_transaction_title)).setMessage(_context.getString(R.string.description_rebroadcast_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
boolean success=BroadcastTransactionActivity.callMe(getActivity(),_mbwManager.getSelectedAccount(),record.txid);
if (!success) {
Utils.showSimpleMessageDialog(getActivity(),_context.getString(R.string.message_rebroadcast_successfull));
}
dialog.dismiss();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miBumpFee:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.bump_fee_title)).setMessage(_context.getString(R.string.description_bump_fee)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
Intent intent=SendMainActivity.getIntent(getActivity(),_mbwManager.getSelectedAccount().getId(),record.txid,false);
startActivity(intent);
dialog.dismiss();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
}
return false;
}

Fixed version (ground truth):
@Override public boolean onActionItemClicked(ActionMode actionMode,MenuItem menuItem){
  final int itemId=menuItem.getItemId();
  if (itemId == R.id.miShowCoinapultDebug) {
    if (record instanceof CoinapultTransactionSummary) {
      final CoinapultTransactionSummary summary=(CoinapultTransactionSummary)record;
      new AlertDialog.Builder(_context).setMessage(summary.input.toString()).setNeutralButton(R.string.copy,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          Utils.setClipboardString(summary.input.toString(),TransactionHistoryFragment.this.getActivity());
          Toast.makeText(TransactionHistoryFragment.this.getActivity(),R.string.copied_to_clipboard,Toast.LENGTH_SHORT).show();
          dialog.dismiss();
        }
      }
).setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          dialog.dismiss();
        }
      }
).show();
    }
    return true;
  }
switch (itemId) {
case R.id.miShowDetails:
    doShowDetails(record);
  finishActionMode();
return true;
case R.id.miSetLabel:
setTransactionLabel(record);
finishActionMode();
break;
case R.id.miAddToAddressBook:
EnterAddressLabelUtil.enterAddressLabel(getActivity(),_mbwManager.getMetadataStorage(),record.destinationAddress.get(),"String_Node_Str",addressLabelChanged);
break;
case R.id.miCancelTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.remove_queued_transaction_title)).setMessage(_context.getString(R.string.remove_queued_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
boolean okay=_mbwManager.getSelectedAccount().cancelQueuedTransaction(record.txid);
dialog.dismiss();
updateTransactionHistory();
if (okay) {
Utils.showSimpleMessageDialog(getActivity(),_context.getString(R.string.remove_queued_transaction_hint));
}
 else {
new Toaster(getActivity()).toast(_context.getString(R.string.remove_queued_transaction_error),false);
}
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miDeleteUnconfirmedTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.delete_unconfirmed_transaction_title)).setMessage(_context.getString(R.string.warning_delete_unconfirmed_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
_mbwManager.getSelectedAccount().deleteTransaction(record.txid);
dialog.dismiss();
updateTransactionHistory();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miRebroadcastTransaction:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.rebroadcast_transaction_title)).setMessage(_context.getString(R.string.description_rebroadcast_transaction)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
boolean success=BroadcastTransactionActivity.callMe(getActivity(),_mbwManager.getSelectedAccount(),record.txid);
if (!success) {
Utils.showSimpleMessageDialog(getActivity(),_context.getString(R.string.message_rebroadcast_failed));
}
dialog.dismiss();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
case R.id.miBumpFee:
new AlertDialog.Builder(getActivity()).setTitle(_context.getString(R.string.bump_fee_title)).setMessage(_context.getString(R.string.description_bump_fee)).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
Intent intent=SendMainActivity.getIntent(getActivity(),_mbwManager.getSelectedAccount().getId(),record.txid,false);
startActivity(intent);
dialog.dismiss();
}
}
).setNegativeButton(R.string.no,new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
dialog.dismiss();
}
}
).create().show();
break;
}
return false;
}