private SortedMap<String, List<Map<String, String>>> createResultForOperationSystems(Set<?> set) {
    SortedMap<String, List<Map<String, String>>> result = new TreeMap<>();
    for (Object entry : set) {
      if (entry instanceof Map) {
        Map<?, ?> map = (Map<?, ?>) entry;
        String osType = (String) map.get(OperatingSystemResourceProvider.OPERATING_SYSTEM_OS_TYPE_PROPERTY_ID);
        if (!result.containsKey(osType)) {
          result.put(osType, new LinkedList<>());
        }
        if (map.get("repositories") instanceof Set) {
          Set<?> repos = (Set<?>) map.get("repositories");
          for (Object repo : repos) {
            if (repo instanceof Map) {
              Map<String, String> resultMap = buildResultRepo((Map<String, String>) repo);
              result.get(osType).add(resultMap);
            }
          }
        }
      }
    }
    return result;
  }
Returns repos for the set of operating systems
@param set
@return
ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java