private void addSiteNodeInconsistency(List inconsistencies, RegistryVO registryVO, Database db)
      throws Exception {
    try {
      String referencingEntityName = registryVO.getReferencingEntityName();
      String referencingEntityCompletingName = registryVO.getReferencingEntityCompletingName();
      Integer referencingEntityId = new Integer(registryVO.getReferencingEntityId());
      Integer referencingEntityCompletingId =
          new Integer(registryVO.getReferencingEntityCompletingId());

      if (referencingEntityCompletingName.equals(SiteNode.class.getName())) {
        SiteNodeVO siteNodeVO =
            SiteNodeController.getController()
                .getSiteNodeVOWithId(
                    new Integer(registryVO.getReferencingEntityCompletingId()), db);
        if (siteNodeVO != null) {
          LanguageVO masterLanguageVO =
              LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId());
          SiteNodeVersionVO siteNodeVersionVO =
              SiteNodeVersionController.getController()
                  .getLatestActiveSiteNodeVersionVO(db, siteNodeVO.getId());

          if (siteNodeVersionVO != null
              && siteNodeVersionVO.getId().intValue() == referencingEntityId.intValue())
            inconsistencies.add(registryVO);
        }
      } else if (referencingEntityCompletingName.equals(Content.class.getName())) {
        ContentVO contentVO =
            ContentController.getContentController()
                .getContentVOWithId(new Integer(registryVO.getReferencingEntityCompletingId()), db);
        if (contentVO != null) {
          LanguageVO masterLanguageVO =
              LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId());
          ContentVersionVO contentVersionVO =
              ContentVersionController.getContentVersionController()
                  .getLatestActiveContentVersionVO(contentVO.getId(), masterLanguageVO.getId(), db);

          if (contentVersionVO != null
              && contentVersionVO.getId().intValue() == referencingEntityId.intValue())
            inconsistencies.add(registryVO);
        }
      } else {
        logger.error(
            "The registry contained a not supported referencingEntityCompletingName:"
                + referencingEntityCompletingName);
      }
    } catch (Exception e) {
      logger.error(
          "There seems to be a problem with finding the inconsistency for registryVO "
              + registryVO.getRegistryId()
              + ":"
              + e.getMessage());
    }
  }