class ComponentIdentificationUtil {

    private ComponentIdentificationUtil() { }

    @SuppressWarnings("deprecation")
    public static boolean doesIdentityMatch(final Component a, final org.cyclonedx.model.Component b) {
        if (a == null || b == null) {
            return false;
        }
        if (isMatch(a.getPurl(), b.getPurl())) {
            return true;
        }
        if (isMatch(a.getPurlCoordinates(), b.getPurl())) {
            return true;
        }
        if (b.getSwid() != null && isMatch(a.getSwidTagId(), b.getSwid().getTagId())) {
            return true;
        }
        if (isMatch(a.getCpe(), b.getCpe())) {
            return true;
        }
        if (StringUtils.trimToEmpty(a.getGroup()).equals(StringUtils.trimToEmpty(b.getGroup()))
                && StringUtils.trimToEmpty(a.getName()).equals(StringUtils.trimToEmpty(b.getName()))
                && StringUtils.trimToEmpty(a.getVersion()).equals(StringUtils.trimToEmpty(b.getVersion()))) {
            return true;
        }
        return false;
    }

    public static boolean doesIdentityMatch(final Component a, final Component b) {<FILL_FUNCTION_BODY>}

    private static boolean isMatch(final PackageURL a, final PackageURL b) {
        if (a != null && b != null) {
            return a.canonicalize().equals(b.canonicalize());
        }
        return false;
    }

    private static boolean isMatch(final PackageURL a, final String b) {
        if (a != null && b != null) {
            try {
                return a.canonicalize().equals(new PackageURL(b).canonicalize());
            } catch (MalformedPackageURLException e) {
                return false;
            }
        }
        return false;
    }

    private static boolean isMatch(final String a, final String b) {
        if (StringUtils.trimToNull(a) != null && StringUtils.trimToNull(b) != null) {
            return StringUtils.trimToNull(a).equals(StringUtils.trimToNull(b));
        }
        return false;
    }
}

        if (a == null || b == null) {
            return false;
        }
        if (isMatch(a.getPurl(), b.getPurl())) {
            return true;
        }
        if (isMatch(a.getPurlCoordinates(), b.getPurlCoordinates())) {
            return true;
        }
        if (isMatch(a.getSwidTagId(), b.getSwidTagId())) {
            return true;
        }
        if (isMatch(a.getCpe(), b.getCpe())) {
            return true;
        }
        if (StringUtils.trimToEmpty(a.getGroup()).equals(StringUtils.trimToEmpty(b.getGroup()))
                && StringUtils.trimToEmpty(a.getName()).equals(StringUtils.trimToEmpty(b.getName()))
                && StringUtils.trimToEmpty(a.getVersion()).equals(StringUtils.trimToEmpty(b.getVersion()))) {
            return true;
        }
        return false;
    
<no_super_class>