Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate License Matches on License Detection View #567

Closed
AyanSinhaMahapatra opened this issue Apr 26, 2023 · 2 comments · Fixed by #569
Closed

Duplicate License Matches on License Detection View #567

AyanSinhaMahapatra opened this issue Apr 26, 2023 · 2 comments · Fixed by #569
Assignees
Labels

Comments

@AyanSinhaMahapatra
Copy link
Member

Description

Here for the license detection with identifier: apache_2_0-921dec4f-d240-dc2d-2900-d39127ffbeea the top level detection is:

"license_detections": [
    {
      "identifier": "apache_2_0-921dec4f-d240-dc2d-2900-d39127ffbeea",
      "license_expression": "apache-2.0",
      "detection_count": 180,
      "detection_log": []
    },

And a file level detection is:

      "detected_license_expression": "apache-2.0",
      "detected_license_expression_spdx": "Apache-2.0",
      "license_detections": [
        {
          "license_expression": "apache-2.0",
          "matches": [
            {
              "score": 98.91,
              "start_line": 4,
              "end_line": 14,
              "matched_length": 91,
              "match_coverage": 100.0,
              "matcher": "2-aho",
              "license_expression": "apache-2.0",
              "rule_identifier": "apache-2.0_843.RULE",
              "rule_relevance": 100,
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_843.RULE",
              "matched_text": "The [Netty] Project licenses this file to you under the Apache License,\n * version 2.0 (the \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at:\n *\n *   https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations\n * under the License."
            }
          ],
          "detection_log": [],
          "identifier": "apache_2_0-921dec4f-d240-dc2d-2900-d39127ffbeea"
        }
      ],

So there is only 1 LicenseMatch object in this License Detection. And so in the matches table it should show only that one match. And not 180 matches which are the same details repeated again and again.

scancode-worbench-matches-duplicate

See the corresponding scancode result JSON
netty-common-4.1.66.Final-sources.jar-v32rc4results.zip

@OmkarPh
Copy link
Collaborator

OmkarPh commented May 14, 2023

we can close this, as it's fixed & available in https://github.com/nexB/scancode-workbench/releases/tag/v4.0.0rc3

@OmkarPh
Copy link
Collaborator

OmkarPh commented Jul 19, 2023

The same license match is present in all files because they're unique license detections,
Earlier all of them were displayed, Now we show only one instance of this detection

@OmkarPh OmkarPh closed this as completed Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants