code: public Results analyze(RuleSet ruleSet) {
          long startTime = System.currentTimeMillis();
          DirectoryResults reportResults = new DirectoryResults();
  
          int numThreads = Runtime.getRuntime().availableProcessors() - 1;
          numThreads = numThreads > 0 ? numThreads : 1;
  
          ExecutorService pool = Executors.newFixedThreadPool(numThreads);
  
          for (FileSet fileSet : fileSets) {
              processFileSet(fileSet, ruleSet, pool);
          }
  
          pool.shutdown();
  
          try {
              boolean completed = pool.awaitTermination(POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS);
              if (!completed) {
                  throw new IllegalStateException("Thread Pool terminated before comp<FileResults>letion");
              }
          } catch (InterruptedException e) {
              throw new IllegalStateException("Thread Pool interrupted before completion");
          }
  
          addDirectoryResults(reportResults);
          LOG.info("Analysis time=" + (System.currentTimeMillis() - startTime) + "ms");
          return reportResults;
      }
docs: Analyze all source code using the specified RuleSet and return the report results.
  
  @param ruleSet - the RuleSet to apply to each source component; must not be null.
  @return the results from applying the RuleSet to all of the source