docs: public static BugCollection doAnalysis(@Nonnull Project p, FindBugsProgress progressCallback) throws IOException,
      InterruptedException {
          StringWriter stringWriter = new StringWriter();
          BugCollectionBugReporter pcb = new BugCollectionBugReporter(p, new PrintWriter(stringWriter, true));
          pcb.setPriorityThreshold(Priorities.LOW_PRIORITY);
          IFindBugsEngine fb = createEngine(p, pcb);
          fb.setUserPreferences(getUserPreferences());
          fb.setProgressCallback(progressCallback);
          fb.setProjectName(p.getProjectName());
  
          fb.execute();
          String warnings = stringWriter.toString();
          if (warnings.length() > 0) {
              JTextArea tp = new JTextArea(warnings);
              tp.setEditable(false);
              JScrollPane pane = new JScrollPane(tp);
              pane.setPreferredSize(new Dimension(600, 400));
              JOptionPane.showMessageDialog(MainFrame.getInstance(),
                      pane, "Analysis errors",
                      JOptionPane.WARNING_MESSAGE);
          }
  
          return pcb.getBugCollection();
      }