public static Map<String, String> computeAliases(PluginScanResult scanResult) {
        Map<String, Set<String>> aliasCollisions = new HashMap<>();
        scanResult.forEach(pluginDesc -> {
            aliasCollisions.computeIfAbsent(simpleName(pluginDesc), ignored -> new HashSet<>()).add(pluginDesc.className());
            aliasCollisions.computeIfAbsent(prunedName(pluginDesc), ignored -> new HashSet<>()).add(pluginDesc.className());
        });
        Map<String, String> aliases = new HashMap<>();
        for (Map.Entry<String, Set<String>> entry : aliasCollisions.entrySet()) {
            String alias = entry.getKey();
            Set<String> classNames = entry.getValue();
            if (classNames.size() == 1) {
                aliases.put(alias, classNames.stream().findAny().get());
            } else {
                log.debug("Ignoring ambiguous alias '{}' since it refers to multiple distinct plugins {}", alias, classNames);
            }
        }
        return aliases;
    }
Remove the plugin type name at the end of a plugin class name, if such suffix is present.
This method is meant to be used to extract plugin aliases.

@param plugin the plugin descriptor.
@return the pruned simple class name of the plugin.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java