spdx / spdx/Spdx-Java-Library

Official CC-BY-4.0 license text is not being matched correctly by LicenseCompareHelper.matchingStandardLicenseIdsWithinText()

Open
#322 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug matching
Dominant language
Java
Stars
71
Forks
44
Avg merge
12h 54m
Merged PRs (30d)
7

Description

When org.spdx.utility.compare.LicenseCompareHelper.matchingStandardLicenseExceptionIdsWithinText() is run on the following CC-BY-*-4.0 license texts, it fails to find any matches:

Furthermore, org.spdx.utility.compare.LicenseCompareHelper.isStandardLicenseWithinText() is also returning false in each of these cases, however org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense() (correctly) doesn't find any differences when run on the same texts (and when provided with the appropriate CC-BY-*-4.0 org.spdx.library.model.v3_0_1.expandedlicensing.ListedLicense object).

Perhaps we should add one or more CC-BY- cases to the compare consistency unit test?

This was reproduced with Spdx-Java-Library v2.0.0 and SPDX license list v3.26.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the mismatch in LicenseCompareHelper.matchingStandardLicenseIdsWithinText(), isStandardLicenseWithinText(), and isTextStandardLicense() with the listed CC-BY-*-4.0 texts and corresponding ListedLicense objects. Review src/test/java/org/spdx/utility/compare/LicenseCompareHelperTest.java around lines 986-994 and add coverage for the compare consistency case. Done means the CC-BY variants are matched and the consistency checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.