private static ConfigurationMetadataSource getSource(final RawConfigurationMetadata metadata, final ConfigurationMetadataItem item) {
        if (item.getSourceType() == null) {
            return null;
        }

        val idx = item.getId().lastIndexOf('.');
        val name = idx > 0 ? item.getId().substring(0, idx) : StringUtils.EMPTY;

        return metadata.getSources().stream()
            .filter(source -> Objects.equals(source.getType(), item.getSourceType()) && name.equals(source.getGroupId()))
            .findFirst()
            .orElse(null);

    }
This is {@link CasConfigurationMetadataRepositoryJsonBuilder}
which is similar to {@link ConfigurationMetadataRepositoryJsonBuilder}
with a different implementation for the {@link #getSource(RawConfigurationMetadata, ConfigurationMetadataItem)}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-configuration-metadata-repository/src/main/java/org/springframework/boot/configurationmetadata/CasConfigurationMetadataRepositoryJsonBuilder.java