code: public List<CmsResource> getResourcesWithBrokenLinks() {
  
          if (m_resourcesWithBrokenLinks == null) {
              // sort the resulting hash map
              List<String> resources = new ArrayList<String>(m_brokenRelations.keySet());
              Collections.sort(resources);
  
              m_resourcesWithBrokenLinks = new ArrayList<CmsResource>(resources.size());
              m_notVisibleResourcesCount = 0;
              // remove not visible resources
              CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible();
              String storedSiteRoot = m_cms.getRequestContext().getSiteRoot();
              try {
                  m_cms.getRequestContext().setSiteRoot("/");
                  Iterator<String> itResources = resources.iterator();
                  while (itResources.hasNext()) {
                      String resourceName = itResources.next();
                      try {
                          m_resourcesWithBrokenLinks.add(m_cms.readResource(resourceName, filter));
                      } catch (Exception e) {
                          // resource is not visible, increase count
                          m_notVisibleResourcesCount++;
                      }
                  }
              } finally {
                  m_cms.getRequestContext().setSiteRoot(storedSiteRoot);
              }
          }
          return m_resourcesWithBrokenLinks;
      }
docs: Returns all resources with broken links.<p>
  
  @return a list of {@link org.opencms.file.CmsResource} objects