protected static void checkDuplicateConfigurationNames(final String arg) throws IOException {
        var allConfigurationNames = new HashSet<String>();
        var failBuild = new AtomicBoolean(false);
        var pattern = Pattern.compile("@Configuration\\(value\\s+=\\s+\"(\\w+)\"");
        Files.walk(Paths.get(arg))
            .filter(f -> Files.isRegularFile(f) && f.toFile().getName().endsWith("Configuration.java"))
            .forEach(file -> {
                var text = readFile(file);
                var matcher = pattern.matcher(text);
                while (matcher.find()) {
                    var configName = matcher.group(1);
                    if (allConfigurationNames.contains(configName)) {
                        print("Found a duplicate configuration name %s in file %s", configName, file.toFile().getAbsolutePath());
                        failBuild.set(true);
                    } else {
                        allConfigurationNames.add(configName);
                    }
                }
            });
        if (failBuild.get()) {
            System.exit(1);
        }
    }
This is {@link CheckSpringConfigurationConditionals}.

@author Misagh Moayyed
@since 6.3.0
ci/checks/CheckSpringConfigurationConditionals.java