docs: public void work(List<WorkItem> resources) throws CoreException {
          if (resources == null || resources.isEmpty()) {
              if (DEBUG) {
                  FindbugsPlugin.getDefault().logInfo("No resources to analyse for project " + project);
              }
              return;
          }
          if (DEBUG) {
              System.out.println(resources);
          }
          st = new StopTimer();
          st.newPoint("initPlugins");
  
          // make sure it's initialized
          FindbugsPlugin.applyCustomDetectors(false);
  
          st.newPoint("clearMarkers");
  
          // clear markers
          clearMarkers(resources);
  
          st.newPoint("configureOutputFiles");
  
          final Project findBugsProject = new Project();
          findBugsProject.setProjectName(javaProject.getElementName());
          final Reporter bugReporter = new Reporter(javaProject, findBugsProject, monitor);
          if (FindBugsConsole.getConsole() != null) {
              bugReporter.setReportingStream(FindBugsConsole.getConsole().newOutputStream());
          }
          bugReporter.setPriorityThreshold(userPrefs.getUserDetectorThreshold());
  
          FindBugs.setHome(FindbugsPlugin.getFindBugsEnginePluginLocation());
  
          Map<IPath, IPath> outLocations = createOutputLocations();
  
          // collect all related class/jar/war etc files for analysis
          collectClassFiles(resources, outLocations, findBugsProject);
  
          // attach source directories (can be used by some detectors, see
          // SwitchFallthrough)
          configureSourceDirectories(findBugsProject, outLocations);
  
          if (findBugsProject.getFileCount() == 0) {
              if (DEBUG) {
                  FindbugsPlugin.getDefault().logInfo("No resources to analyse for project " + project);
              }
              return;
          }
  
          st.newPoint("createAuxClasspath");
  
          String[] classPathEntries = createAuxClasspath();
          // add to findbugs classpath
          for (String entry : classPathEntries) {
              findBugsProject.addAuxClasspathEntry(entry);
          }
  
          st.newPoint("configureProps");
          IPreferenceStore store = FindbugsPlugin.getPluginPreferences(project);
          boolean cacheClassData = store.getBoolean(FindBugsConstants.KEY_CACHE_CLASS_DATA);
  
          final FindBugs2 findBugs = new FindBugs2Eclipse(project, cacheClassData, bugReporter);
          findBugs.setNoClassOk(true);
          findBugs.setProject(findBugsProject);
          findBugs.setBugReporter(bugReporter);
          findBugs.setProgressCallback(bugReporter);
  
          findBugs.setDetectorFactoryCollection(DetectorFactoryCollection.instance());
  
          // configure detectors.
          userPrefs.setIncludeFilterFiles(relativeToAbsolute(userPrefs.getIncludeFilterFiles()));
          userPrefs.setExcludeFilterFiles(relativeToAbsolute(userPrefs.getExcludeFilterFiles()));
          userPrefs.setExcludeBugsFiles(relativeToAbsolute(userPrefs.getExcludeBugsFiles()));
          findBugs.setUserPreferences(userPrefs);
  
          // configure extended preferences
          findBugs.setAnalysisFeatureSettings(userPrefs.getAnalysisFeatureSettings());
          findBugs.setMergeSimilarWarnings(false);
  
          if(cacheClassData) {
              FindBugs2Eclipse.checkClassPathChanges(findBugs.getProject().getAuxClasspathEntryList(), project);
          }
  
          st.newPoint("runFindBugs");
          if (DEBUG) {
              FindbugsPlugin.log("Running SpotBugs");
          }
  
          runFindBugs(findBugs);
          if (DEBUG) {
              FindbugsPlugin.log("Done running SpotBugs");
          }
  
          // Merge new results into existing results
          // if the argument is project, then it's not incremental
          boolean incremental = !(resources.get(0) instanceof IProject);
          updateBugCollection(findBugsProject, bugReporter, incremental);
          st.newPoint("done");
          st = null;
          monitor.done();
      }