code: private Set<CmsUUID> getIdsOfPublishResourcesWhichAreBothNewAndDeleted(
          List<CmsPublishedResource> publishedResources) {
  
          Set<CmsUUID> result = new HashSet<CmsUUID>();
          Set<CmsUUID> deletedSet = new HashSet<CmsUUID>();
          for (CmsPublishedResource pubRes : publishedResources) {
              if (pubRes.getState().isNew()) {
                  result.add(pubRes.getStructureId());
              }
              if (pubRes.getState().isDeleted()) {
                  deletedSet.add(pubRes.getStructureId());
              }
          }
          result.retainAll(deletedSet);
          return result;
      }
docs: Gets all structure ids for which published resources of both states 'new' and 'deleted' exist in the given list.<p>
  
  @param publishedResources a list of published resources
  
  @return the set of structure ids that satisfy the condition above