code: public List<List<RESOURCE>> partitionMediumResources(List<RESOURCE> resources, Map<Long, Integer> days) {
  
          if (resources.isEmpty()) {
              return Collections.<List<RESOURCE>> emptyList();
          }
          RESOURCE firstRes = resources.get(0);
          int lastDay = days.get(new Long(getDateLastModified(firstRes))).intValue();
          List<List<RESOURCE>> result = new ArrayList<List<RESOURCE>>();
          List<RESOURCE> currentGroup = new ArrayList<RESOURCE>();
          result.add(currentGroup);
          for (RESOURCE res : resources) {
              LOG.debug("Processing medium-aged resource " + getRootPath(res));
              int day = days.get(new Long(getDateLastModified(res))).intValue();
              if (day != lastDay) {
                  LOG.debug("=== new group ===");
                  currentGroup = new ArrayList<RESOURCE>();
                  result.add(currentGroup);
              }
              lastDay = day;
              currentGroup.add(res);
          }
          return result;
      }
docs: Computes publish groups for a list of resources with age "medium".<p>
  
  @param resources the list of resources
  @param days a map from modification dates to the number of days since the modification
  
  @return a list of publish groups