code: protected void compareSpaces(String primaryStoreId, DuplicationInfo info) {
          String spaces = dupHosts.get(info.getHost());
          Map<String, Long> primarySpaces = info.getSpaceCounts(primaryStoreId);
          for (String storeId : info.getStoreIds()) {
              Map<String, Long> secondarySpaces = info.getSpaceCounts(storeId);
  
              for (String spaceId : primarySpaces.keySet()) {
                  // Determine if a space comparison should occur
                  boolean doCompare = false;
                  if (null == spaces || spaces.equals(ALL_SPACES)) {
                      doCompare = true;
                  } else {
                      String[] spacesToCompare = spaces.split(",");
                      List<String> spaceList = Arrays.asList(spacesToCompare);
                      if (spaceList.contains(spaceId)) {
                          doCompare = true;
                      } else { // Check space and store IDs
                          for (String spacesSpaceId : spaceList) {
                              String[] spaceAndStoreId = spacesSpaceId.split(":");
                              if (spaceId.equals(spaceAndStoreId[0]) &&
                                  storeId.equals(spaceAndStoreId[1])) {
                                  doCompare = true;
                              }
                          }
                      }
                  }
  
                  // Do the comparison
                  if (doCompare) {
                      Long primaryCount = primarySpaces.get(spaceId);
                      Long secondaryCount = secondarySpaces.get(spaceId);
  
                      if (null == secondaryCount) {
                          info.addIssue("The secondary provider (ID=" + storeId +
                                        ") is missing space: " + spaceId);
                      } else if (!primaryCount.equals(secondaryCount)) {
                          info.addIssue("The content item counts for the space " +
                                        spaceId + " do not match between primary and secondary " +
                                        "providers. Primary count: " + primaryCount +
                                        ". Secondary (ID=" + storeId + ") " +
                                        "count: " + secondaryCount + ".");
                      }
                  }
              }
          }
      }
docs: /*
  Compare the counted number of space items between storage providers