Source:
<code>private Set<String> validateComponents(Devfile devfile) throws DevfileFormatException { Set<String> definedAliases = new HashSet<>(); Component editorComponent = null; Map<String, Set<String>> idsPerComponentType = new HashMap<>(); for (Component component : devfile.getComponents()) { if (component.getAlias() != null && !definedAliases.add(component.getAlias())) { throw new DevfileFormatException( format("Duplicate component alias found:'%s'", component.getAlias())); } if (!idsPerComponentType .computeIfAbsent(component.getType(), __ -> new HashSet<>()) <START> .add(getIdentifiableComponentName(component))) { <END> throw new DevfileFormatException( format( "There are multiple components '%s' of type '%s' that cannot be uniquely" + " identified. Please add aliases that would distinguish the components.", getIdentifiableComponentName(component), component.getType())); } switch (component.getType()) { case EDITOR_COMPONENT_TYPE: if (editorComponent != null) { throw new DevfileFormatException( format( "Multiple editor components found: '%s', '%s'", getIdentifiableComponentName(editorComponent), getIdentifiableComponentName(component))); } editorComponent = component; break; case PLUGIN_COMPONENT_TYPE: case KUBERNETES_COMPONENT_TYPE: case OPENSHIFT_COMPONENT_TYPE: case DOCKERIMAGE_COMPONENT_TYPE: break; default: throw new DevfileFormatException( format( "Unsupported component '%s' type provided:'%s'", getIdentifiableComponentName(component), component.getType())); } } return definedAliases; }</code><technical_language>a combo "identifiable name" + "type" sense add a note java doc of Components.getIdentifiableComponentName clear IdentifiableComponentName identify component type? > Get a name identify component in devfile</technical_language>

Target:
private Set<String> validateComponents(Devfile devfile) throws DevfileFormatException { Set<String> definedAliases = new HashSet<>(); Component editorComponent = null; Map<String, Set<String>> idsPerComponentType = new HashMap<>(); for (Component component : devfile.getComponents()) { if (component.getAlias() != null && !definedAliases.add(component.getAlias())) { throw new DevfileFormatException( format("Duplicate component alias found:'%s'", component.getAlias())); } if (!idsPerComponentType .computeIfAbsent(component.getType(), __ -> new HashSet<>()) .add(getIdentifiableComponentName(component))) { throw new DevfileFormatException( format( "There are multiple components '%s' of type '%s' that cannot be uniquely" + " identified. Please add aliases that would distinguish the components.", getIdentifiableComponentName(component), component.getType())); } switch (component.getType()) { case EDITOR_COMPONENT_TYPE: if (editorComponent != null) { throw new DevfileFormatException( format( "Multiple editor components found: '%s', '%s'", getIdentifiableComponentName(editorComponent), getIdentifiableComponentName(component))); } editorComponent = component; break; case PLUGIN_COMPONENT_TYPE: case KUBERNETES_COMPONENT_TYPE: case OPENSHIFT_COMPONENT_TYPE: case DOCKERIMAGE_COMPONENT_TYPE: break; default: throw new DevfileFormatException( format( "One of the components has unsupported component type: '%s'", component.getType())); } } return definedAliases; }