Program: 52692
Project: 52692
Buggy source:
@Override protected IStatus run(IProgressMonitor monitor){
  try {
    if (startAfterOtherJob != null)     startAfterOtherJob.join();
    Map<InvestmentPlan,List<PortfolioTransaction>> tx=new HashMap<>();
    CurrencyConverterImpl converter=new CurrencyConverterImpl(factory,getClient().getBaseCurrency());
    getClient().getPlans().stream().forEach(plan -> {
      List<PortfolioTransaction> transactions=plan.generateTransactions(converter);
      if (!transactions.isEmpty())       tx.put(plan,transactions);
    }
);
    if (!tx.isEmpty()) {
      Display.getDefault().asyncExec(() -> {
        String message;
        if (tx.size() == 1) {
          Entry<InvestmentPlan,List<PortfolioTransaction>> entry=tx.entrySet().iterator().next();
          message=MessageFormat.format(Messages.InvestmentPlanTxCreated,entry.getKey().getName(),entry.getValue().size());
        }
 else {
          int count=tx.values().stream().mapToInt(List::size).sum();
          StringBuilder builder=new StringBuilder();
          builder.append(MessageFormat.format(Messages.InvestmentPlanTxForMultiplePlansCreated,count));
          for (          Entry<InvestmentPlan,List<PortfolioTransaction>> entry : tx.entrySet())           builder.append(MessageFormat.format("String_Node_Str",entry.getKey().getName(),entry.getValue().size()));
          message=builder.toString();
        }
        int buttonIndex=MessageDialog.open(MessageDialog.INFORMATION,Display.getCurrent().getActiveShell(),Messages.LabelInfo,message,SWT.SHEET,IDialogConstants.OK_LABEL,Messages.BtnLabelOpenInvestmentPlanView);
        if (buttonIndex > 0) {
          part.activateView("String_Node_Str",null);
        }
      }
);
    }
  }
 catch (  InterruptedException ignore) {
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override protected IStatus run(IProgressMonitor monitor){
  try {
    if (startAfterOtherJob != null)     startAfterOtherJob.join();
    Map<InvestmentPlan,List<PortfolioTransaction>> tx=new HashMap<>();
    CurrencyConverterImpl converter=new CurrencyConverterImpl(factory,getClient().getBaseCurrency());
    getClient().getPlans().stream().forEach(plan -> {
      List<PortfolioTransaction> transactions=plan.generateTransactions(converter);
      if (!transactions.isEmpty())       tx.put(plan,transactions);
    }
);
    if (!tx.isEmpty()) {
      Display.getDefault().asyncExec(() -> {
        String message;
        if (tx.size() == 1) {
          Entry<InvestmentPlan,List<PortfolioTransaction>> entry=tx.entrySet().iterator().next();
          message=MessageFormat.format(Messages.InvestmentPlanTxCreated,entry.getKey().getName(),entry.getValue().size());
        }
 else {
          int count=tx.values().stream().mapToInt(List::size).sum();
          StringBuilder builder=new StringBuilder();
          builder.append(MessageFormat.format(Messages.InvestmentPlanTxForMultiplePlansCreated,count));
          for (          Entry<InvestmentPlan,List<PortfolioTransaction>> entry : tx.entrySet())           builder.append(MessageFormat.format("String_Node_Str",entry.getKey().getName(),entry.getValue().size()));
          message=builder.toString();
        }
        MessageDialog.openInformation(Display.getCurrent().getActiveShell(),Messages.LabelInfo,message);
      }
);
    }
  }
 catch (  InterruptedException ignore) {
  }
  return Status.OK_STATUS;
}