code: public List<List<RESOURCE>> partitionYoungResources(List<RESOURCE> resources) {
  
          if (resources.isEmpty()) {
              return Collections.<List<RESOURCE>> emptyList();
          }
          List<List<RESOURCE>> result = new ArrayList<List<RESOURCE>>();
          List<RESOURCE> currentGroup = new ArrayList<RESOURCE>();
          result.add(currentGroup);
  
          long lastDate = getDateLastModified(resources.get(0));
          for (RESOURCE res : resources) {
              LOG.debug("Processing young resource " + getRootPath(res));
              long resDate = getDateLastModified(res);
              if ((lastDate - resDate) > GROUP_SESSIONS_GAP) {
                  LOG.debug("=== new group ===");
                  currentGroup = new ArrayList<RESOURCE>();
                  result.add(currentGroup);
              }
              lastDate = resDate;
              currentGroup.add(res);
          }
          return result;
      }
docs: Partitions the list of young resources into publish groups.<p>
  
  @param resources the list of resources to partition
  
  @return a partition of the resources into publish groups