code: public DuplicationReport monitorDuplication() {
          log.info("starting duplication monitor");
          DuplicationReport report = new DuplicationReport();
  
          for (String host : dupHosts.keySet()) {
              DuplicationInfo info = new DuplicationInfo(host);
              try {
                  // Connect to storage providers
                  ContentStoreManager storeManager = getStoreManager(host);
                  ContentStore primary = storeManager.getPrimaryContentStore();
                  String primaryStoreId = primary.getStoreId();
                  List<ContentStore> secondaryList =
                      getSecondaryStores(storeManager, primaryStoreId);
  
                  // Get primary space listing and count
                  List<String> primarySpaces = getSpaces(host, primary);
                  countSpaces(host, info, primary, primarySpaces, true);
  
                  // Get space listing and space counts for secondary providers
                  for (ContentStore secondary : secondaryList) {
                      List<String> secondarySpaces = getSpaces(host, secondary);
                      if (primarySpaces.size() != secondarySpaces.size()) {
                          info.addIssue("The spaces listings do not match " +
                                        "between primary and secondary " +
                                        "provider: " +
                                        secondary.getStorageProviderType());
                      }
                      // Determine item count for secondary provider spaces
                      countSpaces(host, info, secondary, secondarySpaces, false);
                  }
  
                  // Compare the space counts between providers
                  compareSpaces(primaryStoreId, info);
              } catch (Exception e) {
                  String error = e.getClass() + " exception encountered while " +
                                 "running dup monitor for host " + host +
                                 ". Exception message: " + e.getMessage();
                  log.error(error);
                  info.addIssue(error);
              } finally {
                  report.addDupInfo(host, info);
              }
          }
  
          return report;
      }
docs: This method performs the duplication checks. These checks compare
  the number of content items in identically named spaces.
  
  @return DuplicationReport report