code: public static final String formatCategoryMap(Map<String, Integer> categories) {
  
          StringBuffer result = new StringBuffer(256);
          result.append("Total categories: ");
          result.append(categories.size());
          result.append('\n');
          Iterator<Map.Entry<String, Integer>> i = categories.entrySet().iterator();
          while (i.hasNext()) {
              Map.Entry<String, Integer> entry = i.next();
              result.append(CmsStringUtil.padRight(entry.getKey(), 30));
              result.append(entry.getValue().intValue());
              result.append('\n');
          }
          return result.toString();
      }
docs: Convenience method to format a map of categories in a nice 2 column list, for example
  for display of debugging output.<p>
  
  @param categories the map to format
  @return the formatted category map