private Set<Component> buildComponents(ServiceInfo service, Set<String> components) {
    Set<Component> set = new HashSet<>();

    for (String component : components) {
      ComponentInfo ci = service.getComponentByName(component);
      String display = (null == ci) ? component : ci.getDisplayName();
      set.add(new Component(component, display));
    }

    return set;
  }
@param service the service containing components
@param components the set of components in the service
@return the set of components name/display name pairs
ambari-server/src/main/java/org/apache/ambari/server/state/repository/VersionDefinitionXml.java