docs: @CheckForNull
      private static String resolvePluginClassesDir(String bundleName, File sourceDir) {
           if (sourceDir.listFiles() == null) {
              FindbugsPlugin.getDefault().logException(new IllegalStateException("No files in the bundle!"),
                      "Failed to create temporary detector package for bundle " + sourceDir);
              return null;
          }
  
          String outputDir = getBuildDirectory(bundleName, sourceDir);
          if (outputDir.length() == 0) {
              FindbugsPlugin.getDefault().logException(new IllegalStateException("No output directory in build.properties"),
                      "No output directory in build.properties " + sourceDir);
              return null;
          }
  
          File classDir = new File(sourceDir, outputDir);
  
          if (classDir.listFiles() == null) {
              FindbugsPlugin.getDefault().logException(new IllegalStateException("No files in the bundle output dir!"),
                      "Failed to create temporary detector package for bundle " + sourceDir);
              return null;
          }
          File etcDir = new File(sourceDir, "etc");
          if (etcDir.listFiles() == null) {
              FindbugsPlugin.getDefault().logException(new IllegalStateException("No files in the bundle etc dir!"),
                      "Failed to create temporary detector package for bundle " + sourceDir);
              return null;
          }
          return classDir.getAbsolutePath();
      }